Script Login Differences
Compare the logins and users on two instances and generate a TSQL script to make them the same.
2015-02-26 (first published: 2013-11-15)
2,917 reads
Compare the logins and users on two instances and generate a TSQL script to make them the same.
2015-02-26 (first published: 2013-11-15)
2,917 reads
Determine when a Stored Procedure was created and last altered.
2015-02-25 (first published: 2013-12-26)
3,522 reads
Generate script to drop any unwanted user created statistics.
2015-02-24 (first published: 2013-12-26)
1,552 reads
I have received some comments on getting total space of table and all indexes. Therefore I rewrote previous query and it returns total space used, space used by heap table or clustered index and space used by non-clustered indexes.
2015-02-23 (first published: 2014-01-18)
3,181 reads
This function is used to calculate the actual unit of conversion for velocity/speed.
2015-02-20 (first published: 2014-12-11)
598 reads
2015-02-19 (first published: 2014-02-03)
1,955 reads
Template to create a Type 6 slowly changing dimension stored procedure
2015-02-17 (first published: 2014-02-21)
2,960 reads
This function is used to calculate the actual unit of conversion for pressure.
2015-02-13 (first published: 2014-12-12)
600 reads
2015-02-12 (first published: 2010-03-12)
5,010 reads
Rename Foreign Key Constraints in a consistent manner. Ideal for preventing constraint errors during code promotion.
2015-02-09 (first published: 2013-03-19)
1,405 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