There is a free SQL Server command line tool "SQLS*Plus" (on http://www.memfix.com ) - exactly like SQL*Plus for SQL Server. It is very flexible with data formatting (set lines size, p…
If the system database "tempdb" is defined on several data files as recommended in general, each data file is moved by a ALTER DATABASE statement. USE master; GO ALTER DATABASE tempdb …
If you are moving databases to a new drive/volume or another server (different drive letter), you will find it useful to also change the SQL Server Agent log path as well as the Database Default Loca…
Here is the script ; WITH c AS ( SELECT g.name AS [FileGroupName] ,s.type_desc ,s.physical_name AS [FileName] ,s. size * CONVERT ( FLOAT , 8) AS [ Size ] , C…
Sometimes it's useful to disable one or more constraints on a table, do something significant like a BULK INSERT / DELETE, and then re-enable the constraint(s) once you're done. You can dis…
Simple query to find the size of the indexes SELECT OBJECT_NAME(i.OBJECT_ID) AS TableName, i.name AS IndexName, i.index_id AS IndexID, 8 * SUM (a.used_pages)/1024 AS ' IndexSize in…
Finally.. the most anticipated version of sql server is ready for launch. Just few more hours..want to register for the virtual launch, click the below link Experience the excitement of the SQL Ser…
In the context of transaction processing, the acronym ACID refers to the four key properties of a transaction: atomicity, consistency, isolation, and durability. Atomicity All changes to data are …
If you don’t have any sort of auditing mechanism enabled, its really hard to find get these information. But you may get that info from the cached plan. p first step is to make sure that “optimize …
Whenever you create or recreate an SP, make sure QUOTED_IDENTIFIER is set to ON. The default value of OFF is there for backward compatibility only. Many modern features of SQL Server (such as filtere…
Did you ever noticed after adding a filtered index or a Computed column, jobs/stored procedures that were using these tables suddenly started failing with the following error Executed as user: XXXX…
In a partitioned table, the partition column must be a part of: The clustered index key. The primary key. Unique index and uniqueness constraint keys. The partition column…
Microsoft SQL Server Sustained Engineering group is pleased to announce the release of SQL Server 2008 Service Pack 3. Both the Service Pack and Feature Pack updates are available for download on the…