Viewing 15 posts - 3,976 through 3,990 (of 49,552 total)
DECLARE @MaxThought INT;
SELECT @MaxThought = MAX(thoughtid) FROM TRP_thoughts;
SELECT * FROM TRP_thoughts WHERE thoughtid = FLOOR(RAND(CHECKSUM(NEWID()))*@MaxThought)+1;
Should get you a random row each time, and is more efficient than the usual TOP...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 21, 2015 at 3:14 am
Considering that most people here probably aren't familiar with that practice exam, you may want to explain further what you're trying to do, what exactly is failing and what the...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 21, 2015 at 1:58 am
Post the checkDB output. Got an older backup?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 21, 2015 at 1:56 am
Or use a table-type parameter and use it in an IN subquery
WHERE ID IN (SELECT ID FROM @TableTypeParameter)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 20, 2015 at 3:50 am
Run the following for each DB, post the full and complete results.
DBCC CheckDB(<database name>) WITH NO_INFOMSGS, ALL_ERRORMSGS, EXTENDED_LOGICAL_CHECKS, DATA_PURITY
And maybe change your job to include the NO_INFOMGSG option. The number...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 18, 2015 at 6:15 am
The parameter -m starts SQL in single user mode, you can connect with any client tool.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 18, 2015 at 4:42 am
feersum_endjinn (12/18/2015)
I was under the impression local administrators were no longer added as sysadmins by default.
They're not.
If you restart SQL in single user mode, then, while SQL is in...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 18, 2015 at 3:39 am
Can you post the query and the 'bad' execution plan?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 18, 2015 at 1:56 am
MMartin1 (12/17/2015)
Does the SELECT 1 provide a big performance gain or just prevents a call to the disk that may get delayed?
Neither. It's there to show readers that EXISTS...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 17, 2015 at 1:14 pm
Be honest. Don't exaggerate your experience. Don't claim familiarity with things that you're not familiar with.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 17, 2015 at 7:02 am
No, it can't. You'd do that with a client timeout, though the timeout affects the entire batch sent to the server, not subprocedures.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 17, 2015 at 6:39 am
Aaah...
I'm hunting for a thread from July this year (before 18th July) on an apparent missing exclusive lock and strange lock escalation behaviour. I posted extensively to it, I know...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 17, 2015 at 3:35 am
jacksonandrew321 (12/17/2015)
Try to run the below Statement:DBCC SHRINKFILE(yourdbname_log, 1)
BACKUP LOG yourdbname WITH TRUNCATE_ONLY
DBCC SHRINKFILE(yourdbname_log, 1)
GO
Beside being appallingly bad advice (shrinking a log to 0 just forces SQL to spend a...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 17, 2015 at 2:02 am
I don't know merge replication, you should have said in the initial post it was for merge replication, not snapshot replication.
I suspect the error means exactly what it says.
the version...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 17, 2015 at 1:59 am
Yes, it's bad practice. SA is well known, and with the brute-forcing capabilities these days, 15 characters is not a strong password. It's known to be an admin account, it...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 17, 2015 at 1:55 am
Viewing 15 posts - 3,976 through 3,990 (of 49,552 total)