Copy Triggers from One DB to Another
A simple script that transfers triggers from one database to another.
2013-03-04 (first published: 2013-02-12)
4,089 reads
A simple script that transfers triggers from one database to another.
2013-03-04 (first published: 2013-02-12)
4,089 reads
2013-02-28 (first published: 2013-02-12)
1,183 reads
ERRORFILE and MAXERRORS option are rarely used important arguments in BULK INSERT so, I will try to highlight the use of these arguments in this script.
2013-02-27 (first published: 2013-02-14)
6,171 reads
The script works through the CMS you have set up to manage your environment and gathers various server information.
2013-02-26 (first published: 2013-02-05)
1,696 reads
List all active Jobs in SQL Server with the details of the schedule.
2013-02-25 (first published: 2013-02-07)
1,326 reads
2013-02-22 (first published: 2013-02-05)
1,824 reads
A script to get the fragmentation of indexes in a database and then rebuild or reorganise accordingly
2013-02-19 (first published: 2013-01-29)
2,147 reads
2013-02-18 (first published: 2013-01-25)
2,806 reads
Script to generate script to detach or attach user databases
2013-02-15 (first published: 2013-01-29)
6,140 reads
Script to reorganize all indexes on all tables in user databases
2013-02-14 (first published: 2013-01-31)
3,304 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