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 MoreYear: 2014
Setting SQL Alias with PowerShell
Sal Young
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 MoreCómo Cambiar el Propietario de Una Base de Datos
Sal Young
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 MoreChange Database Ownership
Sal Young
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 MoreCars and Coffee, Dallas – July 2014
Sal Young
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