14,274 reputation
22452
bio website sqlsalt.com
location
age
visits member for 1 year, 10 months
seen 14 mins ago
stats profile views 408

SQL Server Premier Field Engineer at Microsoft.

Twitter: @SQLife
Blog: http://sqlsalt.com
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.


Apr
6
comment How to assign CTRL+F1 to sp_whoisactive in ssms 2012?
@AaronBertrand Isn't that unnecessary, as a prefix of sp_ causes SQL Server to look in the master database first anyways?
Apr
6
comment How to assign CTRL+F1 to sp_whoisactive in ssms 2012?
Does that stored procedure actually exist in your instance? That is not an ms-shipped SP. Can you run it manually?
Apr
6
comment Exporting SQL Server 2008 R2 Activity Monitor Log
I'm pretty sure the Activity monitor just pulls the root of its data from sys.dm_exec_query_stats (and obviously with sys.dm_exec_sql_text). As for a way to directly import it form Activity Monitor? I don't think that's possible. But you could just work with the direct DMV to get the data.
Apr
5
revised querying multiple values from one column
edited tags
Apr
5
revised querying multiple values from one column
added 73 characters in body
Apr
5
answered querying multiple values from one column
Apr
5
comment CTE Running in Infinite Loop
You would find that as your ID is joined to a Parent_ID, and somewhere in that chain the Parent_ID is joined to a same ID. That would be the cause of the loop.
Apr
3
comment How can I set the index fill factor back to server default?
@DForck42 I can't recreate that behavior.
Apr
3
comment Web application using SQL Server 2008 starts hanging
On the client side, you can use the FireBug plugin for Firefox. It's a great tool that allows you to see the request, time spent, etc. It very well may be getting held up at the database. When this happens you need to look at the user connections to see their wait type and if they're blocked.
Apr
3
comment Web application using SQL Server 2008 starts hanging
How do you know it's latency on the database side? Have you traced watched the HTTP request(s)?
Apr
3
comment Copy a SQL Server 2000 database to another box without interrupting the backup chain
@WarriorBob Just schedule the backup to occur right before your 3rd party software runs the backup. No need to physically be there.
Apr
3
revised How can I set the index fill factor back to server default?
added 96 characters in body
Apr
3
answered How can I set the index fill factor back to server default?
Apr
3
revised Union of Columns
added 308 characters in body
Apr
3
answered Union of Columns
Apr
3
comment How to change ANSI_NULLS option for a table?
Ah, good point. Thanks for the pointer!
Apr
3
comment How to change ANSI_NULLS option for a table?
Isn't ANSI_NULLS a connection-specific setting? In other words, even with a table that is created with ANSI_NULLS OFF, if the connection has ANSI_NULLS ON it will regard SELECT statements with ANSI_NULLS ON
Apr
3
comment Move data from one table to other in batch's
I'm going out on a limb here, but I'd be willing to bet you have underlying issues. What do you mean, "crash"?? Did your log file reach max size? Do you not have auto growth turned on (not a bad thing, unless you don't monitor log file consumption)? Did you actually run out of space in your partition?
Apr
3
comment Move data from one table to other in batch's
Also, the OP should consider disabling the indexes and then rebuilding them once the data has been moved. No need to add the overhead of index inserts during this process.
Apr
2
comment Move data from one table to other in batch's
Are the source and destination tables in the same database?