2011-06-13 (first published: 2008-04-19)
5,874 reads
2011-06-13 (first published: 2008-04-19)
5,874 reads
A stored procedure for restoring a database up to the latest log backup from a file folder. Compatible with the backups made by standard SQL maintenance plan.
2011-06-10 (first published: 2011-05-27)
1,605 reads
When creating a backup that will be restored to a development database, you may need to mask PII information. This script will help you with that.
2011-06-09 (first published: 2011-05-25)
1,491 reads
Easily remove duplicate records without temp tables by using a CTE.
2011-06-07 (first published: 2008-03-19)
6,959 reads
2011-06-03 (first published: 2008-08-18)
1,123 reads
2011-06-02 (first published: 2008-04-24)
9,326 reads
2011-06-01 (first published: 2007-09-02)
10,507 reads
2011-05-30 (first published: 2011-05-23)
2,442 reads
Script generator to restore to a new DB. Designed on Ola Hallengren's backup solution.
2011-05-27 (first published: 2011-05-20)
977 reads
This procedure works like the sp_spaceused procedure but this one shows statistics for all tables in the selected database or for all databases (excluding tempdb and model).
2011-05-25 (first published: 2008-03-05)
10,234 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