2008-12-23 (first published: 2008-11-10)
2,965 reads
2008-12-23 (first published: 2008-11-10)
2,965 reads
Lists Schema/Object of tables that are missing a Primary Key or Clustered Index, along with aggregate data for size, rows, indexes, and columns.
2009-10-02 (first published: 2008-11-05)
1,190 reads
Searches for tables who's names contain the search string. Gives Aggregate Size, Rows, Index, and Column information as well.
2009-10-20 (first published: 2008-11-04)
945 reads
A great article that should answer all your questions about the transaction log from MVP Gail Shaw. A must read for all DBAs.
2012-01-03 (first published: 2008-10-31)
73,625 reads
2013-12-06 (first published: 2008-10-16)
34,142 reads
2009-04-17 (first published: 2008-10-15)
1,134 reads
To increase SQL Server disk space, 'shrink the database' task is used. But the tests in this tip using autogrowth prove that 'shrink database' poorly impacts SQL performance.
2008-10-14
4,484 reads
Unless you are the Database Administrator or the Application Analyst for a particular database you are usually oblivious to the naming conventions of the databases that support the applications you rely upon daily. This is why it is important to have the metadata repository in place to provide that translation when the need arises.
2008-09-11
2,992 reads
I have a stored procedure I want to run when SQL Server starts. Is there a way to execute this procedure automatically each time the SQL Server service is started?
2008-09-11
3,855 reads
This article illustrates how to create a simple procedure to kill many sessions at the same time, kill a range of sessions and kill all of the sessions connecting to a database.
2008-09-10
4,612 reads
By Steve Jones
This is timely, as I’m currently on a boat in the Adriatic taking a...
You can find the slides and SQL scripts for my session “Spice up your...
By SQLPals
How to Clear the SSMS Cache (SSMS 21 and Later) Updated...
Comments posted to this topic are about the item Using CHOOSE()
Comments posted to this topic are about the item Re-Seeding a Broken Log Shipping...
Comments posted to this topic are about the item The DBA is Dead! Long...
We have this code that sets some status values and then queries them using the CHOOSE() function in SQL Server 2025.
CREATE TABLE Status
(
StatusID INT,
StatusDescription VARCHAR(20)
);
GO
INSERT dbo.Status
(
StatusID,
StatusDescription
)
VALUES
(0, 'Uncategorized'),
(1, 'Active'),
(2, 'Inactive'),
(3, 'Temp');
GO
SELECT CHOOSE(StatusID, 'Unknown', 'Active', 'Inactive', 'Temporary')
FROM Status;
When the SELECT runs, what is returned? See possible answers