23,378 reputation
33981
bio website blogs.msdn.com/b/sql_pfe_blog
location In the Ocean somewhere...
age
visits member for 3 years, 1 month
seen 15 mins ago

SQL Server Premier Field Engineer at Microsoft.

Twitter: @SQLife
Blog: http://blogs.msdn.com/b/sql_pfe_blog/
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.


Feb
1
revised Select Into a table on server1 from server2 without using 'Linked Servers'
edited tags
Feb
1
comment Select Into a table on server1 from server2 without using 'Linked Servers'
Which RDBMS are you using?
Feb
1
revised Get counts grouped by month and year
deleted 4 characters in body; edited tags
Feb
1
revised Get counts grouped by month and year
added 4 characters in body
Feb
1
answered Get counts grouped by month and year
Feb
1
comment Simple Select * on SQL Server 2008 R2 table of 1812 rows is taking 3 minutes to load
@AlexErwin There you go, now you just need to drill down into what session is holding that lock.
Feb
1
comment Simple Select * on SQL Server 2008 R2 table of 1812 rows is taking 3 minutes to load
During this operation what do you see this waiting on? Use sys.dm_os_waiting_tasks to get this information. Also, can you give us the actual execution plan? I believe you have posted the estimated plan.
Feb
1
comment What is correct process to physically move an availability replica to another location
Please define "moving". Will a completely different server become a secondary replica? Or will the current secondary replica just be down and then come back up?
Jan
31
comment error altering database collation
Well, I'll clear up the mystery. Somebody is connected to the database (maybe even you?). Whenever you connect to a database (besides the master database) a shared lock will be granted on the database. This is so the database doesn't get dropped or restored while there are currently users. So, you need to find out the session and take action.
Jan
31
comment error altering database collation
What spid(s) have a lock currently on the database? You can find this information from sys.dm_tran_locks.
Jan
31
revised Index Key Column Order
deleted 5 characters in body
Jan
31
comment SQL Database automatic back up
What does select @@version return?
Jan
31
comment SQL Database automatic back up
Good point by Ali. My answer assumes SQL Server and a non-Express edition.
Jan
31
answered SQL Database automatic back up
Jan
30
revised Index Key Column Order
added 159 characters in body
Jan
30
comment Index Key Column Order
@Wojteq They are undocumented. See here: blogs.msdn.com/b/sqlserverstorageengine/archive/2006/12/13/…
Jan
30
revised Index Key Column Order
deleted 2 characters in body; edited title
Jan
30
answered Non-Clustered-Index on a temporary table
Jan
30
revised Index Key Column Order
added 699 characters in body
Jan
30
answered Index Key Column Order