Technical Article

Restore 2000 DB to 2005

This script was designed to restore a backup of a SQL Server 2000 database from disk file to SQL Server 2005.Unfortunatelly the RESTORE will leave land mines for you to find the hard way, this script was updated to fix all that I have found:Change CONCAT_NULL_YIELDS_NULL ON, PAGE_VERIFY CHECKSUM, Compatibility level to 90, remove the […]

4 (1)

2007-09-14

4,513 reads

Technical Article

Overcome BCP limitations for output to CSV file

This is an example to overcome short comings when using BCP to create a 'proper' CSV file. The view vw_Customers_RAW is used in order to provide a method of creating the column heading row and to enclose columns with embedded comma with double quotes, which are not options in BCP. There are more generic methods […]

1 (1)

2006-07-03 (first published: )

2,935 reads

Technical Article

Global System UDF to return ISO Date string

Updated for Permission assignment change 1/11/1006. Ok, I'll bet that you are asking, What is a Global System UDF, right? By Global I mean that the UDF is available from any database on the server. By System I mean that the two part naming rule does not apply to this scalar function. The UDF conversion […]

5 (1)

2006-01-26 (first published: )

429 reads

Technical Article

Create Excel XLS from T-SQL

This is a T-SQL script that uses OLE, ADO, Jet4 ISAM, and Linked Server to create and populate an Excel Workbook (XLS) file from T-SQL query. If the Excel Worksheet exists, the query will append to the "table". The code is designed to be used by SQL Agent and to append to the step output […]

2006-01-18 (first published: )

10,904 reads

Technical Article

Blocked Process script for deadlock correction

This script was created to find an application problem that was causing SQL Server blocked processes. The BlockedProcess table is created to log both the blocker and blocked processes. The sp_BlockedProcess stored procedure is created to handle the situation by: inserting all processes affected by the blocking, notifying the blocking application user, emailing the admins […]

5 (2)

2005-12-01 (first published: )

4,145 reads

Technical Article

Get Column Lists script

This is a script like Column_Gitter by Rick Bolin (RickInMesa), it differs in the fact that it does not use cursors, it optionally adds the table name, it handles UDDT (User Defined Data Types) properly, and handles the new SQL Server 2000 datatypes.Usage: Open this script in QA, Change QA to the desired Database, Edit […]

5 (1)

2003-09-24

710 reads

Technical Article

Restore DB from Disk File script

This script was designed to restore a backup of a production database from disk file, handle multiple DB files, move the files to new location, with new database name that is customized for the date of the backup, create any missing logins, and fix any user accounts that are orphaned by differing SIDs from the […]

2003-04-24

1,050 reads

Blogs

Truncating very large transaction log in full recovery mode

By

While I always configure transaction log backups for every database in non-simple recovery model,...

Autonomous Driving Around London

By

There’s a video of Bill Gates taking a drive in an autonomous car around...

Best way to monitor high worker thread on SQL Server

By

It is common to see high worker count issue on the production server and...

Read the latest Blogs

Forums

Remove the Dynamic code from my SQL sproc

By GrassHopper

I have a stored procedure that was created to run dynamically.  Other than me...

predictive query plan

By Arsh

Dear Friends, Please advise if there is a way to get a query plan...

Significance of Historical waits report in SQL server Performance dashboard

By IT researcher

I have the following historical wait report for my SQL server. I have noticed...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers