24,413 reputation
34284
bio website blogs.msdn.com/b/sql_pfe_blog
location In the Ocean somewhere...
age
visits member for 3 years, 3 months
seen 2 hours 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
19
revised What are the implications of changing the SQL Server Service Logon Account?
added 815 characters in body
Feb
19
comment Log all errors in queries
You can capture the XE event error_reported. Create a session for that event, specify a predicate (unless you want this for all databases) and have a file as the target for later consumption/analysis.
Feb
19
comment Multiple primary keys
It's a composite key. I'm no InnoDB expert (or even user) but unless it is much different from traditional RDBMSes, a table can only have one PK. In this case it looks like multiple columns make up the one PK on this table. This is a composite key.
Feb
19
answered What are the implications of changing the SQL Server Service Logon Account?
Feb
19
comment AlwaysOn Availability Groups: Confusion with some concepts
Cluster1 would be the computer name object of the cluster, and the cluster service or application computer object would be the CNO for the listener, for example.
Feb
19
comment AlwaysOn Availability Groups: Confusion with some concepts
Neither Joe or Cluster1 need the permission, that's where pre-staging the cluster object names within AD would come into play.
Feb
19
answered AlwaysOn Availability Groups: Confusion with some concepts
Feb
18
comment ORDER BY clause is allowed over column that is not in SELECT list?
I must be misunderstanding the question then. In order to do the sort, that data will have to be available (I.e. The output of the scan operation).
Feb
18
answered ORDER BY clause is allowed over column that is not in SELECT list?
Feb
18
revised Everyone warns against shrinking a database, but will it work in my case? 1 GB db with tables removed now 100 MB
deleted 1 characters in body; edited tags; edited title
Feb
18
revised What's the point of WHERE 1=2 for SELECT INTO table query
edited title
Feb
18
comment Stored Procedure as Create Table proxy?
@AaronBertrand Good point, I've edited/fixed. A bad habit I need to correct :-)
Feb
18
revised Stored Procedure as Create Table proxy?
added 28 characters in body
Feb
18
answered Everyone warns against shrinking a database, but will it work in my case? 1 GB db with tables removed now 100 MB
Feb
18
revised Logical reads amount difference with almost identical indexes
deleted 22 characters in body
Feb
17
comment Restore SQL Server database from .sql files
You can surely execute a SQL script file from sqlcmd, but the real question is how did you script this out? Sequence does matter here (think foreign key relationships), as well as if the scripts contain all DDL. If you did the "Generate scripts..." from SSMS you should be fine. But the true backup and restore should have been more traditional with native full/diff/tran log backups.
Feb
15
revised SQL Server 2008 Restore from D2D
added 20 characters in body
Feb
15
comment Stored Procedure as Create Table proxy?
For what it's worth, I just used OWNER in my example. That can be a few possibilities.
Feb
14
revised Stored Procedure as Create Table proxy?
edited tags
Feb
14
revised Stored Procedure as Create Table proxy?
added 6 characters in body