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)

You rated this post out of 5. Change rating

2007-09-14

4,515 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)

You rated this post out of 5. Change rating

2006-07-03 (first published: )

3,010 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)

You rated this post out of 5. Change rating

2006-01-26 (first published: )

430 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 […]

You rated this post out of 5. Change rating

2006-01-18 (first published: )

12,750 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)

You rated this post out of 5. Change rating

2005-12-01 (first published: )

4,169 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)

You rated this post out of 5. Change rating

2003-09-24

712 reads

Technical Article

List of all tables in DB, with row count sp

This stored procedure will list all user tables in the current database, along with the number of rows in the table. This version uses dynamic SQL to retrieve the number of rows, to overcome the need for an index on all tables. I use this to document legacy databases, I find that they may have […]

5 (1)

You rated this post out of 5. Change rating

2003-04-24

709 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 […]

You rated this post out of 5. Change rating

2003-04-24

1,057 reads

Blogs

Building a Docker image with Docker Build Cloud

By

In a previous blog post we went through how to build a Docker container...

Top 8 Courses to Learn SQL for Data Science in 2024 & Beyond

By

Businesses are drowning in data, but starving for insights. That's where SQL experts swoop...

Going to Cloud? Look at the Shared Responsibility Model

By

The bottom line here is this: the idea that a CSP takes care of...

Read the latest Blogs

Forums

Aligning Compatibility Version

By BOR15K

I have joined a new project, where the business uses Azure SQL Hyperscale for...

azure synapse analytics

By river1

Dears, Hope this message finds you well I did not see in this foruns...

Restore dbs

By mtz676

The below code works for backup files only from local drives. When replaced with...

Visit the forum

Question of the Day

Initial Config of tempdb

What are the initial config sizes for the tempdb primary data files, secondary data files, and log files in SQL Server 2022?

See possible answers