Scripts

Technical Article

BCP OUT all table data in your Database

Data Recovery is vital. This script will cursor through your database and BCP OUT the table data to a directory specifically for each day of the week (in numbers - where 1 = Sunday and 7 = Saturday) in order to have table recoverability up to 7 days. The first step is to create the […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2006-05-11 (first published: )

716 reads

Technical Article

Server Backup History Report (updated 2006-04-11)

Server Backup History Report (Full DB Backups only) 1. lists all databases with no backup history 2. lists last backup for other databases includes Date, User, Size, Duration, Age, Finish Date & Location Includes system databases Excludes TempDB Excludes backup history data where backupmediafamily.device_type = 7 these are typically created by Veritas BackupExec Tested on […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(3)

You rated this post out of 5. Change rating

2006-04-28 (first published: )

4,604 reads

Technical Article

To move all the table data from database to xls or

To move all the table data from database to xls or doc or txt files tableMany times we come accross to move data from database to external files such as word,xls or data files. Here is the script that move all tables data to specified files. Target file names are the table names. specify the […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2006-04-27 (first published: )

1,711 reads

Technical Article

Update a table column with a sequence number v3

Both Sachinvaishnav and Mark Chad have submitted scripts to populate a column with a sequence number. The first solution uses a cursor; the second uses the SQL 2005 ROW_NUMBER() function.v1:http://www.sqlservercentral.com/scripts/viewscript.asp?scriptid=1643v2:http://www.sqlservercentral.com/scripts/viewscript.asp?scriptid=1664Since neither script requires a specific order for the sequence number, the same result can be achieved with a single UPDATE statement.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2006-04-26 (first published: )

426 reads

Technical Article

Determine Distance Between Any Two Locations

This function allows you to calculate the distance in miles or kilometers between any two points on the earth. I created to calculate the distance between two zip codes but is can be used for any two coordinates for which latitude and longitude is known.NOTE: A database for the coordinates of any US postal code […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(4)

You rated this post out of 5. Change rating

2006-04-25 (first published: )

1,300 reads

Technical Article

script to create default stored procs

The following script will write basic update insert and delete stored procedures for a given table.It will add comments to the sp's with the autyhors name and also script a single grant statement for a given database user.I find this script extremely useful for both rad development and keeping consistency in my naming and structure […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2006-04-21 (first published: )

585 reads

Blogs

Microsoft Tools for Making Data AI-Ready

By

Making Data AI-Ready, Part 2 (This is the second article in a three-part series...

Local Models Using GPUs with Ollama

By

Can you use your GPUs when running a local model under Ollama? You can,...

Don’t Fear the Technology

By

The concern that a particular technology is going to destroy the world seems to...

Read the latest Blogs

Forums

Moving Beyond the Reboot: Finding the Culprit Behind Memory Pressure

By Pablo Echeverria

Comments posted to this topic are about the item Moving Beyond the Reboot: Finding...

Reserved Words I

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Reserved Words I

Get Along

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Get Along

Visit the forum

Question of the Day

Reserved Words I

Which of these are not reserved words?

See possible answers