2012-11-30 (first published: 2012-11-03)
1,110 reads
2012-11-30 (first published: 2012-11-03)
1,110 reads
This function return the text format of a month calendar. It could be useful for sending through emails when you do do not have other tools, but T-SQL to send text emails.
2012-11-29 (first published: 2012-10-31)
1,978 reads
Stored proc for scripting out full CREATE INDEX statements from your table indexes with all filegroup, filter and WITH parameters.
2012-11-27 (first published: 2012-10-18)
2,598 reads
This script will provide a dynamic mechanism to decide between REBUILDING an index or simply REORGANIZING an index. Tested and approved for SQL Server 2005 & 2008 Standard or Enterprise or R2.
2012-11-26 (first published: 2012-10-18)
3,950 reads
This script will tell you how many indexes there are for a single table and also it specifically shows how many non clustered index, and also which tables have a heap index.
2012-11-23 (first published: 2012-10-17)
1,342 reads
This script will produce the top 10 wait state issues along with their descriptions.
2012-11-22 (first published: 2012-10-22)
1,791 reads
2012-11-21 (first published: 2012-10-02)
1,610 reads
2012-11-16 (first published: 2012-10-02)
1,237 reads
Constructs a restore script for all databases on the server from backup history.
2012-11-12 (first published: 2012-09-26)
1,247 reads
Find all columns containing a string value across all tables and schemas.
2012-11-07 (first published: 2012-10-12)
2,144 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