Year: 2014

Compress All Tables in Database

Sal Young | November 11th, 2014


PROBLEM: I need to find out all the tables in a database that are not using data compression. SOLUTION: Here is the T-SQL code to list all tables in a database that are not compressed. The script below will take care of generating the T-SQL commands necessary to compress all tables that are not already […]

Read More

DB_RecentFileGrowth

Sal Young | September 5th, 2014


Read More

Setting SQL Alias with PowerShell

Sal Young | September 2nd, 2014


PROBLEM: The SQL Servers instances I manage have long cryptic names that are almost impossible to memorize and too many keystrokes to type; besides, I rather use my memory for other things. How can I set up aliases for all the SQL instances I manage in a quick an easy manner? SOLUTION: The configuration of […]

Read More

Cómo Cambiar el Propietario de Una Base de Datos

Sal Young | August 28th, 2014


PROBLEMA: Tengo base de datos donde el propietario no es “sa”, cómo puedo cambiar el propietario de varias bases de datos a “sa” de una forma dinámica. SOLUCION: Yo utilizo el cmdlet Get-SqlDatabase del módulo SqlServer para capturar las bases de datos de una instancia de SQL Server. Entonces hago una búsqueda en el objeto […]

Read More

Change Database Ownership

Sal Young | August 28th, 2014


PROBLEM: Database ownership is set to the user who created or restored the database and I want to change it to “SA”. SOLUTION: I use the Get-SqlDatabase cmdlet from SqlServer module to capture the list of databases from the SQL instance. I then pipe and search for databases where the “.owner” property is not “sa”. […]

Read More

Cars and Coffee, Dallas – July 2014

Sal Young | June 8th, 2014


 Dodge SRT V10 Viper Gen 4 This Saturday I went to the Cars and Coffee event which happens the first Saturday of every month where thousands of car enthusiasts gather at the Classic BMW of Plano to see some of the most exotic vehicles in north Texas.  You are sure to find classic vehicles from […]

Read More