SQL Server Questions Answered http://sqlmag.com/blog/10118/feed en Recovering a database with a missing transaction log http://sqlmag.com/blog/recovering-database-missing-transaction-log <div class="node-body blog-body">Usually when a database has open transactions and the server crashes, crash recovery will run on the affected database and roll back the open transactions. </div> <div class="og_rss_groups"><ul class="links"><li class="og_links first last"><a href="/blog/sql-server-questions-answered">SQL Server Questions Answered</a></li> </ul></div><p><a href="http://sqlmag.com/blog/recovering-database-missing-transaction-log" target="_blank">read more</a></p> http://sqlmag.com/blog/recovering-database-missing-transaction-log#comments Database Administration backup Computing Cross-platform software Data management database database Database Administration Database management systems Databases Extensible Storage Engine Microsoft Microsoft SQL Server Query languages recovery server crash SQL SQL Server 2005 storage SUSPECT state transaction log Transaction processing SQL Server Questions Answered Tue, 31 Jul 2012 14:58:00 +0000 10173 at http://sqlmag.com Is the recovery interval guaranteed? http://sqlmag.com/blog/recovery-interval-guaranteed <div class="node-body blog-body">The recovery interval is not guaranteed in any way—it’s simply a goal.</div> <div class="og_rss_groups"><ul class="links"><li class="og_links first last"><a href="/blog/sql-server-questions-answered">SQL Server Questions Answered</a></li> </ul></div><p><a href="http://sqlmag.com/blog/recovery-interval-guaranteed" target="_blank">read more</a></p> http://sqlmag.com/blog/recovery-interval-guaranteed#comments Database Administration Algorithms for Recovery and Isolation Exploiting Semantics Cross-platform software database Database Administration Database management systems Databases Microsoft SQL Server SQL transaction log Transaction processing SQL Server Questions Answered Fri, 27 Jul 2012 06:12:00 +0000 10143 at http://sqlmag.com Avoiding logging for user operations http://sqlmag.com/blog/avoiding-logging-user-operations <div class="node-body blog-body"> Why does SQL Server insist on logging all operations, and is it likely that there will be an option to disable logging in future? </div> <div class="og_rss_groups"><ul class="links"><li class="og_links first last"><a href="/blog/sql-server-questions-answered">SQL Server Questions Answered</a></li> </ul></div><p><a href="http://sqlmag.com/blog/avoiding-logging-user-operations" target="_blank">read more</a></p> http://sqlmag.com/blog/avoiding-logging-user-operations#comments Database Administration Database Administration Database management systems Databases IBM software Microsoft SQL Server SQL transaction log Transaction processing SQL Server Questions Answered Wed, 18 Jul 2012 05:31:00 +0000 10619 at http://sqlmag.com Locking and DBCC CHECKDB http://sqlmag.com/blog/locking-and-dbcc-checkdb <div class="node-body blog-body">From SQL Server 2000 onwards, DBCC CHECKDB runs online by default. Even in SQL Server 2000 though, DBCC CHECKDB still took Schema-Stability locks on tables that were being checked as it could not cope with their metadata changing during a running consistency check.</div> <div class="og_rss_groups"><ul class="links"><li class="og_links first last"><a href="/blog/sql-server-questions-answered">SQL Server Questions Answered</a></li> </ul></div><p><a href="http://sqlmag.com/blog/locking-and-dbcc-checkdb" target="_blank">read more</a></p> http://sqlmag.com/blog/locking-and-dbcc-checkdb#comments Database Administration Computing Concurrency control Cross-platform software Data management database Database Administration Database Console Commands Database management systems Databases DBCC CHECKDB Lock metadata Microsoft SQL Server Query languages Schema-Stability locks SQL Server 2000 SQL Server 2005 SQL Server 2012 storage SQL Server Questions Answered Wed, 04 Jul 2012 04:06:00 +0000 10196 at http://sqlmag.com Filtering out benign waits http://sqlmag.com/blog/filtering-out-benign-waits <div class="node-body blog-body">The simple answer is that not all waits need to be analyzed when doing performance troubleshooting. </div> <div class="og_rss_groups"><ul class="links"><li class="og_links first last"><a href="/blog/sql-server-questions-answered">SQL Server Questions Answered</a></li> </ul></div><p><a href="http://sqlmag.com/blog/filtering-out-benign-waits" target="_blank">read more</a></p> http://sqlmag.com/blog/filtering-out-benign-waits#comments Database Performance Tuning Database Administration Database Administration Microsoft SQL Server Microsoft SQL Server Performance tuning performance tuning performance tuning scripts scripts SQL Server 2012 SQL Server 2012 Waits waits SQL Server Questions Answered Wed, 27 Jun 2012 12:46:00 +0000 10387 at http://sqlmag.com Altering execution priority using Resource Governor http://sqlmag.com/blog/altering-execution-priority-using-resource-governor <div class="node-body blog-body">Most people know that Resource Governor allows you to specify CPU and memory limits when contention for these resources occurs, but it’s a little-known fact that you can configure relative priorities as well. </div> <div class="og_rss_groups"><ul class="links"><li class="og_links first last"><a href="/blog/sql-server-questions-answered">SQL Server Questions Answered</a></li> </ul></div><p><a href="http://sqlmag.com/blog/altering-execution-priority-using-resource-governor" target="_blank">read more</a></p> http://sqlmag.com/blog/altering-execution-priority-using-resource-governor#comments Database Performance Tuning Database Administration Concurrency control Concurrent computing CPU Database Administration load memory limits Microsoft SQL Server Performance tuning queries Rate-monotonic scheduling Resource Resource Governor Scheduling SQL Server 2008 Enterprise Edition Thread workloads SQL Server Questions Answered Wed, 20 Jun 2012 19:16:00 +0000 10597 at http://sqlmag.com Beware of trying to upgrade a database with a read-only filegroup http://sqlmag.com/blog/beware-trying-upgrade-database-read-only-filegroup <div class="node-body blog-body">Upgrade does not work with read-only filegroups. If you try to take a SQL Server 2008 R2 database with a read-only filegroup and attach it to SQL Server 2012, you’ll see errors. </div> <div class="og_rss_groups"><ul class="links"><li class="og_links first last"><a href="/blog/sql-server-questions-answered">SQL Server Questions Answered</a></li> </ul></div><p><a href="http://sqlmag.com/blog/beware-trying-upgrade-database-read-only-filegroup" target="_blank">read more</a></p> http://sqlmag.com/blog/beware-trying-upgrade-database-read-only-filegroup#comments Database Administration database Database Administration Database management systems Microsoft SQL Server Null Query languages read-only filegroup SQL SQL Server 2008 R2 SQL Server 2012 Technology_Internet Windows NT windows server SQL Server Questions Answered Tue, 19 Jun 2012 15:42:00 +0000 10234 at http://sqlmag.com How record DELETEs can cause index fragmentation http://sqlmag.com/blog/how-record-deletes-can-cause-index-fragmentation <div class="node-body blog-body">Record deletion can indeed cause fragmentation. There are two kinds of fragmentation described by SQL Server Books Online: logical fragmentation and low page density.</div> <div class="og_rss_groups"><ul class="links"><li class="og_links first last"><a href="/blog/sql-server-questions-answered">SQL Server Questions Answered</a></li> </ul></div><p><a href="http://sqlmag.com/blog/how-record-deletes-can-cause-index-fragmentation" target="_blank">read more</a></p> http://sqlmag.com/blog/how-record-deletes-can-cause-index-fragmentation#comments Database Performance Tuning Database Administration Data cluster data cluster Database Administration File system fragmentation file system fragmentation index fragmentation index fragmentation Microsoft SQL Server Microsoft SQL Server Performance tuning SQL Server Questions Answered Thu, 14 Jun 2012 05:53:00 +0000 10148 at http://sqlmag.com Why do TRUNCATE and DROP TABLE complete so fast? http://sqlmag.com/blog/why-do-truncate-and-drop-table-complete-so-fast <div class="node-body blog-body">In SQL Server 2000 SP3 the deferred drop mechanism was introduced. This works by unhooking the allocations for a table and placing them on the deferred drop queue.</div> <div class="og_rss_groups"><ul class="links"><li class="og_links first last"><a href="/blog/sql-server-questions-answered">SQL Server Questions Answered</a></li> </ul></div><p><a href="http://sqlmag.com/blog/why-do-truncate-and-drop-table-complete-so-fast" target="_blank">read more</a></p> http://sqlmag.com/blog/why-do-truncate-and-drop-table-complete-so-fast#comments Database Administration Computer science Computing Concurrency control Cross-platform software Data Definition Language Data management Database Administration Databases Lock Microsoft SQL Server Query languages SQL Truncate SQL Server Questions Answered Fri, 08 Jun 2012 15:27:00 +0000 10524 at http://sqlmag.com Do log records ever move in the transaction log? http://sqlmag.com/blog/do-log-records-ever-move-transaction-log <div class="node-body blog-body">Why is it that sometimes when I try to shrink a transaction log file, the shrink fails? Why can’t SQL Server just move log records to the start of the transaction log? </div> <div class="og_rss_groups"><ul class="links"><li class="og_links first last"><a href="/blog/sql-server-questions-answered">SQL Server Questions Answered</a></li> </ul></div><p><a href="http://sqlmag.com/blog/do-log-records-ever-move-transaction-log" target="_blank">read more</a></p> http://sqlmag.com/blog/do-log-records-ever-move-transaction-log#comments Database Administration Database Administration Database management systems Database management systems Logarithm Logarithm transaction log transaction log Transaction processing Transaction processing virtual log files virtual log files VLF VLF SQL Server Questions Answered Tue, 29 May 2012 10:30:00 +0000 10581 at http://sqlmag.com SUSPECT vs. RECOVERY_PENDING http://sqlmag.com/blog/suspect-vs-recoverypending <div class="node-body blog-body">From SQL Server 2005 onwards (when the metadata subsystem inside SQL Server was extensively rewritten), the database management portion of the Storage Engine has surfaced a variety of new states in the sys.databases catalog view. The SUSPECT and RECOVERY_PENDING statuses are needed because they describe quite different states of the database.</div> <div class="og_rss_groups"><ul class="links"><li class="og_links first last"><a href="/blog/sql-server-questions-answered">SQL Server Questions Answered</a></li> </ul></div><p><a href="http://sqlmag.com/blog/suspect-vs-recoverypending" target="_blank">read more</a></p> http://sqlmag.com/blog/suspect-vs-recoverypending#comments Database Administration Backup backup Cross-platform software Cross-platform software Data management Data management database database Database Administration Database management systems Database management systems Database transaction Database transaction Databases Databases Microsoft SQL Server Microsoft SQL Server Rollback Rollback SQL SQL transaction log transaction log Transaction processing Transaction processing SQL Server Questions Answered Wed, 23 May 2012 19:19:00 +0000 10242 at http://sqlmag.com Curious Case of the missing SOS_SCHEDULER_YIELD waits http://sqlmag.com/blog/curious-case-missing-sosscheduleryield-waits <div class="node-body blog-body">Many of the monitoring scripts/tools for looking at wait statistics aggregate all the wait statistics and return the top 95% of all waits occurring, sorted by most prevalent waits by total wait time.</div> <div class="og_rss_groups"><ul class="links"><li class="og_links first last"><a href="/blog/sql-server-questions-answered">SQL Server Questions Answered</a></li> </ul></div><p><a href="http://sqlmag.com/blog/curious-case-missing-sosscheduleryield-waits" target="_blank">read more</a></p> http://sqlmag.com/blog/curious-case-missing-sosscheduleryield-waits#comments Database Performance Tuning Database Administration Database Administration Microsoft SQL Server monitoring scripts Microsoft SQL Server monitoring scripts Performance tuning performance tuning performance tuning Statistics statistics tools tools Waits waits SQL Server Questions Answered Wed, 16 May 2012 18:43:00 +0000 10544 at http://sqlmag.com Physical ordering of records in an index http://sqlmag.com/blog/physical-ordering-records-index <div class="node-body blog-body">Learn how how Microsoft SQL Server maintains the ordering of record storage in indexes including at what point the records get moved around on the index pages so that they're stored in the correct order for a SELECT to retrieve them.</div> <div class="og_rss_groups"><ul class="links"><li class="og_links first last"><a href="/blog/sql-server-questions-answered">SQL Server Questions Answered</a></li> </ul></div><p><a href="http://sqlmag.com/blog/physical-ordering-records-index" target="_blank">read more</a></p> http://sqlmag.com/blog/physical-ordering-records-index#comments Database Administration Data management Data types Database Administration database administration Extensible Storage Engine Index indexes Microsoft Pointer record storage SELECT SQL Server Technology_Internet SQL Server Questions Answered Wed, 09 May 2012 10:18:00 +0000 10331 at http://sqlmag.com Is my master database really corrupt? http://sqlmag.com/blog/my-master-database-really-corrupt <div class="node-body blog-body">It’s becoming increasingly common these days for DBAs to want to offload consistency checking of production databases to a secondary server, so that the heavy resource usage associated with running DBCC CHECKDB does not affect the production workload. The practice of verifying backup integrity is also increasingly prevalent.</div> <div class="og_rss_groups"><ul class="links"><li class="og_links first last"><a href="/blog/sql-server-questions-answered">SQL Server Questions Answered</a></li> </ul></div><p><a href="http://sqlmag.com/blog/my-master-database-really-corrupt" target="_blank">read more</a></p> http://sqlmag.com/blog/my-master-database-really-corrupt#comments Database Backup and Recovery Database Administration corrupt database corrupt database Database Administration database backup database backup master database master database Microsoft SQL Server Microsoft SQL Server SQL Server Questions Answered Thu, 26 Apr 2012 15:12:00 +0000 10443 at http://sqlmag.com How to prevent table scans when searching LOB data? http://sqlmag.com/blog/how-prevent-table-scans-when-searching-lob-data <div class="node-body blog-body">If a SELECT has the LOB column in the WHERE clause then the query plan will involve a table scan – as you cannot create a nonclustered index over a LOB column.</div> <div class="og_rss_groups"><ul class="links"><li class="og_links first last"><a href="/blog/sql-server-questions-answered">SQL Server Questions Answered</a></li> </ul></div><p><a href="http://sqlmag.com/blog/how-prevent-table-scans-when-searching-lob-data" target="_blank">read more</a></p> http://sqlmag.com/blog/how-prevent-table-scans-when-searching-lob-data#comments Database Performance Tuning Database Administration data data database Database Administration index table index table Lob LOB Microsoft SQL Server Microsoft SQL Server Performance tuning relational table relational table select SELECT update queries update queries Waits waits WHERE clause WHERE clause SQL Server Questions Answered Tue, 17 Apr 2012 14:29:00 +0000 10416 at http://sqlmag.com