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 MoreSetting 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 MoreTable Variables 101
Sal Young
Table variables fall in one of those areas where lack of knowledge and understanding can get you in trouble. I’m leaving the creative part of getting in trouble up to you and here, I will show you a few things I didn’t know about table variables. Table variables exist in tempdb regardless of their size. […]
Read MoreHeard Museum, McKinney, Texas
Sal Young
The Heard Nature Science & Wildlife Sanctuary is located in the city of McKinney just east of I75 and south of HWY 121. With close to 290 acres of land and 6 plus miles of meticulous well-carved trails, this sanctuary was made possible by the generosity of Miss Bessie Heard. I had the opportunity to […]
Read More2012 SQL in the City – Austin, TX
Sal Young
Bull Creek Park in Austin, TX At the beginning of October 2012 I traveled to Austin, TX for the RedGate SQL in the City event. I made the trip to Austin a few days before the conference to visit with family and go to some of the parks in the area. My first stop was at Bull […]
Read More