Transaction Log Notes
* Checkpoints commit all dirty pages to disk. Therefore the very last checkpoint is the true starting point for SQL Server to start…
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 MoreThis is a DBCC command I learned from Brent Ozar’s Indexing video. To get statistics on an index, simply use:
1 |
DBCC SHOW_STATISTICS ('Person.Person', IX_Person_LastName_FirstName_MiddleName); |
Views –…
Read MoreHere is the SQL to display the last LSN applied to the database (think log-shipping)
1 2 3 4 5 |
SELECT redo_start_lsn FROM sys.master_files WHERE database_id = DB_ID('SecondaryDatabaseName') AND type = 0 |
Views – 2824
Read MorePlanned Relocation Procedure First, let’s get the information we will need to write the T-SQL script to alter the databases. Use the script…
Read MorePer the MSDN article below, accounts used to perform log-shipping tasks must be a member of the ‘sysadmin’ server role group: “The log-shipping…
Read MoreHere is some simple T-SQL to enable or disable a SQL login account:
1 2 3 4 5 6 7 |
-- Disable the login ALTER LOGIN [someLogin] DISABLE GO -- Enable the login ALTER LOGIN [someLogin] ENABLE GO |
Views – 1822
Read MoreHere is a great step-by-step blog post on how to use SQL Server and WordPress: Installing WordPress on SQL Server Views –…
Read MoreSQL Server 2012 Posted from TechNet The Transact-SQL programming language provides DBCC statements that act as Database Console Commands for SQL Server. Database…
Read MoreWhen you restore a transaction log using the NORECOVERY option, SQL Server does not need to analyze the transaction log and roll back…
Read More