SQL Server coding and naming conventions and best practices and guidelines
Here is a good blog post on SQL Server coding and naming conventions: Database coding conventions, best practices, programming guidelines Views – 3003
Read MoreAll things SQL Server
Here is a good blog post on SQL Server coding and naming conventions: Database coding conventions, best practices, programming guidelines Views – 3003
Read MoreBelow is my posting on dealing with upgrading your SQL Server to either 2012 or 2014 and having to deal with databases that…
Read MoreThis code will do the following: 1. Display the current INDENT_CURRENT value for the identity column for the specified table. This value should…
Read MoreHere is a good article on syncing SQL logins across servers with the same SIDS to log-shipped databases will propagate the correct access…
Read MoreHere is one way to take a database offline. This will prevent any reads, writes or even a connection to it (including any…
Read MoreDBCC activecursors [(spid)] DBCC addextendedproc (function_name, dll_name) DBCC addinstance (objectname, instancename) DBCC adduserobject (name) DBCC auditevent (eventclass, eventsubclass, success, loginname, rolename, dbusername, loginid)…
Read MoreReading the SQL Server Log file – and undocumented command
1 2 3 4 5 6 7 8 9 10 11 12 |
SELECT [Current LSN], [Operation], [Transaction ID], [Parent Transaction ID], [Begin Time], [Transaction Name], [Transaction SID], [Lock Information], [Description] FROM fn_dblog(NULL, NULL) WHERE [Operation] IN ('LOP_BEGIN_XACT', 'LOP_COMMIT_XACT', 'LOP_MODIFY_ROW', 'LOP_DELETE_ROWS', 'LOB_INSERT_ROWS') |
to get all the column, execute this:
1 2 3 |
SELECT TOP 100 * FROM fn_dblog(NULL, NULL) ORDER BY [Current LSN] DESC |
Here is a blog…
Read MoreHere is what to do when the tempDB log file runs out of space. You will not be able to run any sp_Who*…
Read More* Checkpoints commit all dirty pages to disk. Therefore the very last checkpoint is the true starting point for SQL Server to start…
Read MoreHere are a few SQL commands that you can use if you simply want to delete a database that is in “Recovering” or…
Read More