27,119 reputation
54890
bio website tstringer.azurewebsites.net
location In the Ocean somewhere...
age
visits member for 3 years, 9 months
seen 5 hours ago

SQL Server Support Escalation Engineer at Microsoft.

Twitter: @SQLife
Blog: http://tstringer.azurewebsites.net
Email: sqlsalt [at] outlook [dot] com

Disclaimer
The views expressed on my posts on this site are mine alone and do not reflect the views of my company. All posts of mine are provided "AS IS" with no warranties, and confers no rights.

The following disclaimer applies to all code, scripts and demos available on my posts:

This Sample Code is provided for the purpose of illustration only and is not intended to be used in a production environment. THIS SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. We grant You a nonexclusive, royalty-free right to use and modify the Sample Code and to reproduce and distribute the object code form of the Sample Code, provided that You agree: (i) to not use Our name, logo, or trademarks to market Your software product in which the Sample Code is embedded; (ii) to include a valid copyright notice on Your software product in which the Sample Code is embedded; and (iii) to indemnify, hold harmless, and defend Us and Our suppliers from and against any claims or lawsuits, including attorneys’ fees, that arise or result from the use or distribution of the Sample Code.


May
28
answered Copy database to local from server
May
28
revised Check server activity with code
edited title
May
27
answered How to restore SQL Server database with mirroring
May
24
revised Query without having to specify table's schema
deleted 2 characters in body
May
24
answered Query without having to specify table's schema
May
24
comment Partial rollback doesn't decrement trancount
+1 for "there is no such thing as a nested transaction."
May
23
comment When should I use the shrink option
No problem, glad to help!
May
23
comment When should I use the shrink option
file continues to be 10 GB. In that case, you may want to shrink that file in order to reclaim space to have free space left on that drive. Again, this is just a simple example.
May
23
comment When should I use the shrink option
It's not that the log is no longer usable (as it'll always be so). Say your transaction log is on a 10 GB volume. During normal operations and routine log backups, your log file is usually 500 MB. But say a transaction log backup job fails consistently, or there is an open transaction. These situations will prevent SQL Server from reusing the transaction log, and depending on your autogrowth settings your log file could fill up the drive (also depends on the maxsize setting). So say your log file grows to 10 GB filling up the drive. You alleviate the problem, but your physical NTFS 1/2
May
23
revised Dropping and recreating indexes
edited title
May
23
comment Dropping and recreating indexes
This question is too broad. You need to first determine the cause for the lack of performance before making a blanket statement that index recreation and stats update will/won't help.
May
23
comment When should I use the shrink option
The hard requirement is when the business/application team makes a demand that is non negotiable. Another case would be where your log file may completely fill the drive (due to no log reuse) and you may want to reclaim for a little free space buffer. These situations will be rare, but they can/will happen. These (and a few others) are the exceptions to the rule.
May
23
answered When should I use the shrink option
May
23
comment Troubleshooting SOS_SCHEDULER_YIELD wait
That would do it :-) Glad you got it figured out.
May
22
comment Troubleshooting SOS_SCHEDULER_YIELD wait
You're saying you re-ran the same workload in off hours. Take a look at the CPU time demand for that workload. They may not necessarily be unrelated.
May
22
revised Troubleshooting SOS_SCHEDULER_YIELD wait
edited title
May
22
comment Troubleshooting SOS_SCHEDULER_YIELD wait
Also notice that your signal wait time seems to be a large portion of your wait time (it's inclusive in wait time), further indicating CPU pressure.
May
22
comment Troubleshooting SOS_SCHEDULER_YIELD wait
Some things to check: See if other processes are consuming a significant amount of CPU time, check current waiting tasks with sys.dm_os_waiting_tasks and see what their wait types are. Look for heavy CPU consumers like a large number of compilations and recompilations. Check virtual file stats, blocking, and other generic troubleshooting. Look into the plan cache (or use an XE session) to get high CPU consuming queries, etc. Lots of troubleshooting, and SOS_SCHEDULER_YIELD isn't necessarily always accompanied with consistent non-zero value for runnable_tasks_count.
May
22
awarded  Popular Question
May
22
comment Is there a way to generate an execution plan for a stored procedure before executing it?
msdn.microsoft.com/en-us/library/ms191194.aspx