Showing posts from April, 2009

Generate restore scripts from backup history

Over the years I' found this to be a very hand stored proc to generate the required SQL Server T-SQL RESTORE commands to recreate a recovered database out of the latest backup info: dumps to d…

How to use SQL Server T-SQL cursors

The general advice within the SQL Server community is do not use any T-SQL cursors at any time. Coding guidelines: - Avoid using cursors and try solve the problem by using set based operations. - Try…

How to configure SQL Server TempDB

As a general guideline, create one data file for each CPU on the server. Note that a dual-core CPU is considered to be two CPUs. Logical procs (hyperthreading) do not only create one Log file Do n…

UPDATE STATISTICS undocumented options

If you read the Books Online page describing the UPDATE STATISTICS command, you will see that there are some undocumented options.   UPDATE STATISTICS table | view     [         {             …

How to Read Statistics Profile

In SQL Server, "Statistics Profile" is a mode in which a query is run where you can see the number of invocations of each physical plan operator in the tree. Instead of running a que…
Subscribe Our Newsletter