2013-10-22 (first published: 2007-10-10)
30,349 reads
2013-10-22 (first published: 2007-10-10)
30,349 reads
I have used the following function to convert dates according to desired textual formats that were not immediately available in the standard styles on offer.
2013-10-18 (first published: 2013-10-01)
2,070 reads
This script selects clustered indexes containing only a uniqueidentifier column
2013-10-17 (first published: 2013-10-02)
1,256 reads
This script finds the size of all indexes in a database along with the table and the filegroup on which the index resides.
2013-10-15 (first published: 2013-09-23)
1,905 reads
Top 5 expensive Queries from a Write IO perspective
2013-10-03 (first published: 2013-09-09)
2,403 reads
Lists details for all indexes on one or more tables / schemas, including row count and size. The non-pivot version also gives data type and other details for the columns.
2013-10-02 (first published: 2008-08-01)
3,767 reads
The below written query helps us find the most expensive queries from a read IO perspective. The DMV that we have used in this script is sys.dm_exec_query_stats and the function that we have used is sys.dm_exec_sql_text.
2013-09-27 (first published: 2013-09-09)
2,674 reads
This script will determine the SQL Server version and edition in order to find out if BACKUP COMPRESSION is available.
2013-09-25 (first published: 2013-09-10)
950 reads
This script is a universal foreach stored procedure. You can loop through everything with the help of if.
2013-09-24 (first published: 2013-09-10)
1,864 reads
Displays the information of the date of the latest backup that was done back to @daysago. When value is -0 it gives you all the backup information. The script also gives information on databases that never have been backed up.
2013-09-20 (first published: 2013-08-30)
1,613 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