Modify All Database Data and Logfile Names
This script modifies all dtabase .mdf and .ldf to have a standardized name of DatabaseName_Data and DatabaseName_Log.
2011-08-08 (first published: 2011-07-28)
974 reads
This script modifies all dtabase .mdf and .ldf to have a standardized name of DatabaseName_Data and DatabaseName_Log.
2011-08-08 (first published: 2011-07-28)
974 reads
2011-08-05 (first published: 2011-07-23)
2,289 reads
2011-08-04 (first published: 2011-07-25)
3,334 reads
These scripts will extract security for Windows Logins, Database Users, Roles, Objects and SQL Logins.
2011-08-03 (first published: 2011-07-28)
2,227 reads
2011-08-02 (first published: 2011-07-28)
3,055 reads
2011-08-01 (first published: 2011-07-28)
3,217 reads
This script will rename the Primary keys to standard notation - PK_TableName
2011-07-29 (first published: 2010-02-09)
1,724 reads
A quick and simple SysProcess query which will display most of the common parameters of interest.
2011-07-28 (first published: 2011-07-23)
1,421 reads
Verifies that a specified login name exists and has correct settings.
2011-07-27 (first published: 2011-07-11)
1,771 reads
This script will gather a number of Server Information items that are useful in baselining a SQL Server.
2011-07-25 (first published: 2010-01-19)
7,434 reads
By DesertDBA
I did not expect 27 responses to my T-SQL Tuesday #204 invitation, but it...
Should you adopt an off-the-shelf AI tool, partner with a specialist, build in-house, or...
By ReviewMyDB
Part 1 of my What's New in SQL Server for the Developer series. IIF,...
Comments posted to this topic are about the item Switching Schema II
Comments posted to this topic are about the item A Practical Approach to Automating...
Comments posted to this topic are about the item Data Lost in the Cloud
I run this query:
SELECT s.name AS schemaname , o.name AS objectname FROM sys.objects o INNER JOIN sys.schemas s ON s.schema_id = o.schema_id WHERE o.name = 'Beer'I get two rows back for the objects, named dbo.beer and etl.beer. Both the tables have identical schemas and are not partitioned. There are 25 rows in dbo.beer and 0 rows in etl.beer. I run this code:
ALTER TABLE dbo.beer switch TO etl.beerWhat happens? See possible answers