Trace Flags for SQL Server 2012
DRAFT Here is a lot of info about SQL Server Trace Flags and their usage: Links Finding out who dropped a table using…
Read MoreAll things SQL Server
DRAFT Here is a lot of info about SQL Server Trace Flags and their usage: Links Finding out who dropped a table using…
Read MoreI will post some of my findings about trusted foreign keys and constants here since this has become a minor issue at work.…
Read MoreI am doing some research on how to implement auditing of schema and security changes and will use this post to track notes…
Read MoreI recently had a situation where a database that was set to SIMPLE recovery mode had an ever-growing log file. I had tried…
Read MoreHere is where SQL Server stores any pages it has identified as suspect:
1 2 |
SELECT * FROM msdb.dbo.suspect_pages sp |
Views – 2246
Read MoreThe possible values in the State and State_Desc columns of sys.databases are: 0 = ONLINE 1 = RESTORING 2 = RECOVERING 3 =…
Read MoreThe order in which we write T-SQL queries happen in this order:
1 2 3 4 5 6 |
SELECT FROM WHERE GROUP BY HAVING ORDER BY |
however, the order the Query Processor on SQL Server processes…
Read MoreHere is a nifty query that will display all the tables and columns set as IDENTITY in a given database:
1 2 3 4 5 6 7 8 9 10 11 |
USE AdventureWorks2012 GO SELECT OBJECT_NAME(object_id) AS 'table_name', name AS 'column_name', seed_value, increment_value, last_value, is_not_for_replication FROM sys.identity_columns ORDER BY 1 |
Views –…
Read MoreThis post is consisted of mostly direct quotes from the article posted at the bottom of the page. I put them here to…
Read MoreI follow a few rules: 1. Primary keys should be as small as necessary. Prefer a numeric type because numeric types are stored…
Read More