Hi Experts,
can i know what are the disadvantages by using the stored procedures ?
Thanks in Advance.
Hi Experts,
can i know what are the disadvantages by using the stored procedures ?
Thanks in Advance.
Good Day Everyone,
I keep getting this error on my SQL Server on average by the hour. This is a SQL2014 server with the latest sp (virtual).
DESCRIPTION: TCP connection closed but a child process of SQL Server may be holding a duplicate of the connection's socket. Consider enabling the TcpAbortiveClose SQL Server registry setting and restarting SQL Server. If the problem persists, contact Technical Support.
I verified no antivirus is causing the issue. I verified CPU, memory everything in tact. Server is behaving normal for clients except our middle tier agent and web servers disconnect every once in a while but it does not align with every instance this error occurs. Any assistance or words of wisdom would be appreciated.
Have a pleasant day.
Best,
Frank
A SQL Server MVP or MSFT Eng should be replying soon as well. Hope this helps. Frank Garcia *** Please select "Vote As Helpful" if the information provided was helpful to you. If an answer to your issue solved the problem then please mark it as"Propose As Answer" located at the bottom. Thank you. ***
Hi
I have a SQL Cluster with two nodes using SQL 2016 Std.
On the inactive node I get lots of errors saying "initerrlog: Could not open error log file 'D:\SQL\MSSQL13.MSSQLSERVER\MSSQL\Log\ERRORLOG'. Operating system error = 3(The system cannot find the path specified.)."
I get about 10 per minute. Since the node I'm getting this on is inactive and therefore none of the SQL Services are running I'm bit confused as to why I get the error at all.
I should say that the SQL Cluster uses Shared Disks (not CSVs).
Any help would be appreciated
Rich
Dear Experts,
I'm facing the issues in temp DB. which is growing suddenly and reserving all the available space in disk.
This I'm facing once in a week. In this case Shrink also not working and there is no blocked transactions as well in temp DB.
To release the occupied space I must restart the SQL services.
I have tried to run a SQL profiler but i couldn't found the exact reason.
There are three major applications connected to the database AX, CRM and SP.
please advice if anyone experienced and resolved the same issue.
Thanks & Regards,
All,
I'm posting this question here even though it is more of a AzureDevOps question but nevertheless it is related to SQLServer and I could not find an exclusive forum for AzureDevOps.
We have to implement CI/CD for our SQLServer 2012 database releases. We used to use TFS but now we have migrated to VSTS platform and now we are working on the Database CI/CD design. We decided that we will be using the State-Based approach using the SQLPackage to deploy the differential scripts from the project and in this Phase I of our project, we are not considering Unit Testing.
We have identified two tools primarily to use in our pipeline ie, SQLPackage and MSBuild. We will use SQLPackage to build the Test Bed for the database against which we will be targeting the planned changes and we will be using MSBuild to create off of the database solution/Project that the developers would check in. We will eventually deploy the changes using SQLPackage as it can apply the differences against the target environment (Test Build, Stage and Prod).
In the Publish phase of the SQLPackage, we will put in lot of restrictions such as
[1] Ignore Logins
[2] Ignore Users
[3] Ignore Database creation
I just wanted to hear from others their experiences and lessons learnt.. Let me know if I'm missing anything.
Thanks,
rgn
Hi guys,
I have a database with QS enabled with the follow settings;
-2016SP1CU7 standard edition
-operation mode RW
-data flush interval 15 min
-statistics collection interval 1 day
-max size 200 MB
-querystore capture mode auto
-size based cleanup mode auto
-stale query threshold 30 days
The size of the database is around 790 GB.
Thé query store used is 11GB !!!!
I wonder why this is happening. Can somebody tell me what is possibly wrong? Can I purge query data without any problems or set it to read-only? Is this probably a bug? Has anybody seen this before? And if so what is/was the solution?
kind regards
Marco
From the following link
"A parsed document is stored in the internal cache of SQL Server. The MSXML parser uses one-eighth the total memory available for SQL Server. To avoid running out of memory, runsp_xml_removedocument to free up the memory. "
1. does it mean using "Total server memory" of SQL server ? or memory that not govern by "max server memory"?
2. Can check how many memory used by MSXML parser currently ?
3. I got "XML document could not be created because of server memory is low" . So what's need to check ?
VVinayPrasad
1. Added 2 extra tempDB files across 2 logical drives.
2. Restarted SQL Service or the server
3. The 2 extra files disappear from tempDB. However, they still on the hard drive.
??? Why did they disappear and is there a way to tell SQL to keep them around?
I noticed also that sys.sysaltfiles still has the file names so they can't be added back in under the same names.
I have MSSQL 2012 and windows 2012
Workflow:
On April 29th I created a new temporal table named [dbo].[FactPersonnelScheduleDetails_Current] with a default history table named [History].[FactPersonnelScheduleDetails_Current].
This table is in a data warehouse that performs several merge statements on an hourly basis.
Twice now since implementing this table 4 days ago, the merge transaction has failed with the following error: "Attempting to set a non-NULL-able column's value to NULL"
The History table has one user-defined index. As soon as I drop that index, I can the successfully complete the merge.
Any suggestions why the MERGE is failing when I have a user defined index created on the history table, but works when I remove the user defined index?
CREATE TABLE [dbo].[FactPersonnelScheduleDetails_Current] ( [ScheduleCellKey] INT NOT NULL, [ScheduleCellID] INT NOT NULL, [DBID] SMALLINT NOT NULL, [ScheduleDetailsID] INT NOT NULL, [RecordNumber] SMALLINT NULL, [WorkDate] DATE NULL, [WorkDateKey] INT NULL, [WeekStartDate] DATE NULL, [DayOfTheWeek] VARCHAR(50) NULL, [WorkDayNumber] TINYINT NULL, [MasterScheduleCellKey] INT NULL, [WorkingScheduleMatchesMasterScheduleFlag] VARCHAR(3) NULL, [DateWorkingScheduleNoLongerMatchesMaster] DATETIME2(7) NULL, [IsHoliday] VARCHAR(3) NULL, [JobPostDetailID] INT NULL, [JobPostDetailKey] INT NULL, [JobNumber] VARCHAR(10) NOT NULL, [JobKey] INT NOT NULL, [JobTierKey] INT NOT NULL, [EmployeeNumber] INT NULL, [EmployeeKey] INT NULL, [CategoriesDetailID] INT NULL, [BillCategory] VARCHAR(50) NULL, [HoursTypeID] SMALLINT NULL, [HoursTypeDescription] VARCHAR(50) NULL, [PaycheckDescriptionId] SMALLINT NULL, [PaycheckDescription] VARCHAR(50) NULL, [RecordTypeID] TINYINT NULL, [Hours] DECIMAL(19,4) NULL, [InTime] TIME(3) NULL, [InTimeString] VARCHAR(8) NULL, [InDateTime] DATETIME NULL, [OutTime] TIME(3) NULL, [OutTimeString] VARCHAR(8) NULL, [OutDateTime] DATETIME NULL, [LunchHours] DECIMAL(19,4) NULL, [NextDay] VARCHAR(3) NOT NULL, [PayRate] MONEY NULL, [SpecialPayRate] VARCHAR(3) NOT NULL, [ForceOTToThisJob] VARCHAR(3) NOT NULL, [OvertimeHours] DECIMAL(19,4) NULL, [DoubletimeHours] DECIMAL(19,4) NULL, [InvoiceNumber] INT NULL, [InvoiceDescription] VARCHAR(100) NULL, [TierDescription] VARCHAR(100) NULL, [BillRate] MONEY NULL, [SpecialBillRate] VARCHAR(3) NOT NULL, [BillingPayRate] MONEY NULL, [NonBillableTypeID] SMALLINT NULL, [NonBillableTypeDescription] VARCHAR(50) NULL, [LastChangedBy] VARCHAR(20) NULL, [LastChangedDate] DATETIME NULL, [DaysBetweenWorkDateAndModifiedDate] INT NULL, [UpdatedToTKHours] VARCHAR(3) NULL, [SpecialInvoiceDescription] VARCHAR(3) NULL, [SpecialTierDescription] VARCHAR(3) NULL, [InvoiceDetailID] INT NULL, [TTMStatusID] INT NULL, [IsConfirmed] VARCHAR(3) NULL, [DateConfirmed] DATETIME NULL, [IsPublished] VARCHAR(3) NULL, [AcceptedTypeForPSTT] TINYINT NULL, [TeamTimeAcceptedTypeDescription] VARCHAR(50) NULL, [UserName] VARCHAR(20) NULL, [DateChanged] datetime NULL, [Notes] VARCHAR(255) NULL, [SystemNotes] VARCHAR(8000) NULL, [ETLDateChanged] DATETIME2(7) NOT NULL DEFAULT (sysdatetime()), [RecordInsertTimestamp] DATETIME2(7) NOT NULL DEFAULT (sysdatetime()), [RecordUpdateTimestamp] DATETIME2(7) NOT NULL DEFAULT (sysdatetime()), SysStartTime datetime2(0) GENERATED ALWAYS AS ROW START CONSTRAINT DF_SysStart DEFAULT SYSUTCDATETIME(), SysEndTime datetime2(0) GENERATED ALWAYS AS ROW END CONSTRAINT DF_SysEnd DEFAULT CONVERT(datetime2 (0), '9999-12-31 23:59:59'), PERIOD FOR SYSTEM_TIME (SysStartTime, SysEndTime), CONSTRAINT PK_FactPersonnelScheduleDetails_Current PRIMARY KEY NONCLUSTERED (ScheduleCellKey)) WITH (SYSTEM_VERSIONING = ON (HISTORY_TABLE = History.FactPersonnelScheduleDetails_Current)); CREATE CLUSTERED INDEX [IX01_FactPersonnelScheduleDetails_Current] ON [dbo].[FactPersonnelScheduleDetails_Current] (WorkDateKey,DBID); CREATE NONCLUSTERED INDEX [IX02_FactPersonnelScheduleDetails_Current] ON [dbo].[FactPersonnelScheduleDetails_Current] (JobKey) INCLUDE (ScheduleCellKey,DBID,WeekStartDate,JobTierKey,EmployeeKey,Hours,WorkingScheduleMatchesMasterScheduleFlag); CREATE NONCLUSTERED INDEX [IX03_FactPersonnelScheduleDetails_Current] ON [dbo].[FactPersonnelScheduleDetails_Current] (RecordUpdateTimestamp,MasterScheduleCellKey) INCLUDE (ScheduleCellKey,WeekStartDate,DayOfTheWeek,JobPostDetailKey,JobKey,EmployeeKey,CategoriesDetailID,Hours,InTime,OutTime,NextDay,PayRate,SpecialPayRate,ForceOTToThisJob,BillRate,SpecialBillRate,NonBillableTypeID,ETLDateChanged,RecordNumber,WorkingScheduleMatchesMasterScheduleFlag); CREATE NONCLUSTERED INDEX [IX04_FactPersonnelScheduleDetails_Current] ON [dbo].[FactPersonnelScheduleDetails_Current] (WorkingScheduleMatchesMasterScheduleFlag) INCLUDE (ScheduleCellKey,DBID,WeekStartDate,JobKey,JobTierKey,EmployeeKey,DateWorkingScheduleNoLongerMatchesMaster); CREATE NONCLUSTERED INDEX [IX01_FactPersonnelScheduleDetails_Current] ON [History].[FactPersonnelScheduleDetails_Current] (WorkDateKey,DBID) INCLUDE (ScheduleCellKey,WeekStartDate,JobKey,JobTierKey,EmployeeKey,Hours,SysStartTime,SysEndTime);
Hi Team,
we planning to keep primary secondary <g class="gr_ gr_57 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="57" id="57">db</g> copy in primary data <g class="gr_ gr_113 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" data-gr-id="113" id="113">center</g>..and planning to keep one more DR copy in <g class="gr_ gr_205 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id="205" id="205">secondary</g> data <g class="gr_ gr_210 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" data-gr-id="210" id="210">center</g>. Please suggest ..DR copy also consider as core <g class="gr_ gr_424 gr-alert gr_spell gr_inline_cards gr_disable_anim_appear ContextualSpelling ins-del multiReplace" data-gr-id="424" id="424">basedlicense</g> ??
Thanks
Kural
Hi,
I have BBC database, but in my database there are multiple tables in which column level collation is different-different.
Now i want to set that all columns has same collation setting from all tables of BBC database.
Using Alter table syntax ( Alter table table_name Alter column column_name datatype collate collation_name null)
i have found that if there is primary key or index is present then I have to delete that first , then & then only
I am able to change my collation.
Please help me how to do it for all columns for all tables else I have to do it one by one manually.
Change database / column collation from SQL_Latin1_General_CP1_CI_AS vs Latin1_General_BIN2
1. what's the sorting difference?
2. what's the character size difference ?
3. what's the steps the change the collation ? for database it should be easy, for column collation , how to change at once?
4. Are there character conversion need ?will there be character corruption during the collation change/?
Hello when issuing an ALTER INDEX (REBUILT OR REORG) without specifying online or offline option...is the default ONLINE ?
Thanks in advance.
After installing SQL Server 2016 SP2 in oneof the server, sql services are failed to restart: got below error
Starting execution of PRE_MSDB.SQLHello Forum
We are using 2014 SQL Server Availability Groups. One of our previous DBA's has devised a Backup Script which essentially performs Full and Differential Backups on the Primary replica, and TL backup on the Read Only replica.
Is there a way to share the backup history between the replicas, so that if we need to do a PIT restore with the GUI, all backup history is available?
Please click "Mark As Answer" if my post helped. Tony C.
Hi Experts,
in one of the Production server having SSIS packages in SSIS db , i have occured the following wait type as shown in picture.
can i know which causes this issue and how can i over come this wait type in sql server.
Thanks in Advance.
Hi
I'm working on a system which has around 370m records in a non partitioned table. Queries against this table suck.
After doing some analysis it's fairly obvious that nearly all queries on this table, are for data that is < 10 days old, we have roughly 31 months of data in the table. There are a small number of reports that can be run against this, typically looking at 6-12 months of data.
Currently all of the Data that is < 10 days old is queried by a transaction ID and reports queries always have date range params.
I'm looking to split the table into a small table with the hot data in and archive the data after 10 days as this should significantly improve the performance of all normal user based transactions.
I'm looking to create a partitioned table, with each partition containing one months data. The current thought is we'd have separate files for each years worth of data, each containing 12 partitions. This would allow older data to be stored on slower/cheaper storage.
I have created file groups to represent each year, we'll have data for.
I have added a file to the db for each file group and created a partition function along the lines of:
CREATE PARTITION FUNCTION AuditLog_PFN_P1 (datetime2)
AS RANGE RIGHT FOR VALUES (
'20160101',
'20160201',
'20160301',
'20160401',.....)
What i would like to achieve is putting all of 2016's data into one file, 2017's into another file etc.
Where i'm struggling is working out how to assign all of 2016s partitions to a particular file.
Please let me know a) if this can be done and b) if there are any major issues with this approach.
Thanks and regards
Matt