Who did what?
This select will show the last sql statement for every open session plus many helpfull information.
2012-01-13 (first published: 2008-03-04)
4,261 reads
This select will show the last sql statement for every open session plus many helpfull information.
2012-01-13 (first published: 2008-03-04)
4,261 reads
Display row value as a TABLE column using SQL select statement
2012-01-12 (first published: 2007-10-26)
4,755 reads
2012-01-11 (first published: 2008-04-16)
5,189 reads
Using this script you can create a list of sql commands for foreign keys manipulation.
2012-01-10 (first published: 2007-11-02)
5,479 reads
2012-01-09 (first published: 2007-11-13)
4,945 reads
2012-01-06 (first published: 2008-02-15)
7,332 reads
2012-01-05 (first published: 2011-12-09)
2,611 reads
Script to restore the LATEST full and differential backups from a SQL Server 2008 R2 backup device.
2012-01-04 (first published: 2011-12-13)
2,219 reads
This script will be useful to quickly check incase of any blocking or log wait occurs
2011-12-30 (first published: 2011-12-05)
1,550 reads
The following script can be used to determine the list of enabled SQL Agent Jobs, their start time, average run duration and next run date.
2011-12-29 (first published: 2011-11-30)
2,199 reads
By Steve Jones
I was experimenting with CHOOSE() recently after I was asked a question. In a...
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...
Has anyone ever seen this before? I have sysadmin permission on a server. I...
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...
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