Tara Kizer Blog

Tara Kizer

32-bit/64-bit aliases

We don't use the default port for SQL Server for security reasons, so we usually have to explicitly tell the client how to connect to SQL Server by creating an alias on the client machine. Read more →

Defragment Indexes stored procedure

UPDATE: This stored procedure has been updated. This stored procedure defragments indexes in SQL Server 2005. It utilizes sys.dm_db_index_physical_stats, a dynamic management function, to retrieve the fragmentation levels. If you plan to use DETAILED for @statsMode, you may want to consider running the query that builds the #FragIndex table on a database snapshot. Read more →

Defragmenting indexes in SQL Server 2005

To defragment your indexes, we now use ALTER INDEX in SQL Server 2005 rather than DBCC DBREINDEX and DBCC INDEXDEFRAG, which have both been deprecated in 2005. The REBUILD option of ALTER INDEX is equivalent to the old DBCC DBREINDEX; the REORGANIZE option of ALTER INDEX is equivalent to the old DBCC INDEXDEFRAG. Read more →

KILL spids

To quickly disconnect all non admins from a database, I use this: ALTER DATABASE Database1 SET RESTRICTED_USER WITH ROLLBACK IMMEDIATE ALTER DATABASE Database2 SET RESTRICTED_USER WITH ROLLBACK IMMEDIATE One of the development teams recently requested that their production databases be copied to a development server on a weekly basis. Read more →

Size Comparison Tool

I've been trying to determine what new cell phone I want to get since my current personal one is pretty old. One of the most important features that I am considering is its size. Read more →

Spam Comments

I deleted a few hundred spam comments today from my posts. I hadn't kept up with deleting them, so I had quite a bit of work to do today. Due to the amount of spam my posts have received, I've decided to close comments after 90 days so that the amount of spam is reduced. Read more →

Connect to console via RDP

Do you ever need to connect to the console of a server? Are you too lazy to go to the server to do it? If so, then check this out from a cmd window: Read more →

Management Studio slowness

We've been having performance problems on a new 64-bit SQL Server 2005 cluster in our test environment. We opened a ticket with Microsoft to assist us with this. After modifying several things, the only thing that was slow was Management Studio. Read more →

Generating SQL Scripts in SQL Server 2005

In SQL Server 2000, you could generate a SQL script easily using the Generate SQL Script wizard. You could get to it from pretty much anywhere from within Enterprise Manager. For instance, you can get to it by right clicking on any object in the database, then selecting All Tasks, and then selecting Generate SQL Script. Read more →