Viewing 15 posts - 1 through 15 (of 184 total)
Thanks for the info. I will look into that.
January 6, 2020 at 2:23 pm
"Use DBName" is an excellent practice and will serve you well.
This, for instance, will fail at the Use statement if the DB doesn't exist and nothing else will execute.
August 7, 2019 at 2:46 pm
I will try this when I get back from vacation.
May 13, 2017 at 8:18 am
Code change was: Delete A From ACSLog.dbo.AuditLog A With (Rowlock) Inner Join ACSLog_Archive.dbo.AuditLog B On A.AuditLogID = B.AuditLogID OPTION (MAXDOP 1)
Delete A From ACSLog.dbo.AuditLog A With (Rowlock) Inner Join ACSLog_Archive.dbo.AuditLog B On A.AuditLogID = B.AuditLogID OPTION (MAXDOP 1)
February 24, 2017 at 12:28 pm
This VM has 6 CPUs. I have at least two data files for TempDB on all servers. This server has 4 data files, of 3.2G, 3G, 36.8G, and 10G.
February 24, 2017 at 8:04 am
Well, learned something new. It is working and working very fast. 1000 records in 3 seconds or less, and 50,000 in, well, it started at 106 seconds vs. the previous...
February 24, 2017 at 5:46 am
If you look at the code I posted I was doing the delete with a join. Delete A From ACSLog.dbo.AuditLog A With (Rowlock) Inner Join ACSLog_Archive.dbo.AuditLog B...
February 24, 2017 at 5:19 am
Yes, sort of. The archive DB only has 90 days worth of history in it. Each quarter we back up the DB and store it offline in case it is...
February 23, 2017 at 2:17 pm
Code:Set NOCOUNT ONdeclare @enddate datetime, @NumRecordsToGet int, @FirstDayOfQuarter datetimeDeclare @NumRecords Int, @NumAffected IntDeclare @Err Int, @ErrMsg VarChar(255), @Body1 VarChar(500), @Email VarChar(2000)
February 23, 2017 at 1:24 pm
Adding the estimated query plans for two options, 1. Current design, with a join on delete, and 2. with mod to use Delete where not in(select from....FYI, while I...
February 23, 2017 at 11:32 am
Thanks for the reply. I cannot get the archival query to execute at this time because it can never get a memory grant from SQL Server, so I cannot check...
February 23, 2017 at 8:04 am
1. The server is Enterprise Edition. I would love to give the server more RAM, but people other than the DBA's dictate how much RAM the servers get and we...
February 23, 2017 at 5:56 am
A reboot overnight seems to have cured the problem.
April 7, 2015 at 6:09 am
Have you tried installing SQL 2005 on your box? I have 2005, 2008, and 2012 version of SQL Server and BIDS installed on mine. I know I installed 2005 after...
April 6, 2015 at 7:45 am
If you have to limit TempDB due to space constraints, you gotta do what you gotta do. This will result in failures on the app side if it cannot use...
October 8, 2014 at 12:58 pm