Scripts

Technical Article

Find possible missing foreign key relationships

This procedure is intended for single column primary key relationships.First we will create two table functions. The first finds a list of all tables with their primary key columns. The second finds all existing foreign key relationships with their table and column names. Finally we find all tables with primary key column names that do […]

5 (2)

You rated this post out of 5. Change rating

2007-02-26 (first published: )

929 reads

Technical Article

MEDIAN sp for SQL 2000

I wrote this to calculate the median on a record set. All you need to pass is the table name and column name. If you would like to filter the record set, create a view that displays the correct record.The limitation of not being able to pass arrays to Stored procedure or functions was the […]

You rated this post out of 5. Change rating

2007-02-23 (first published: )

651 reads

Technical Article

Switch Databases

This script changes the physical, logical and file names of a database.  It stores the current database until the next time the script is run, and creates a dummy database for the next update.  The intent was to have minimal downtime even though the load (import, snapshot, etc.) may take a long time.  Three copies […]

You rated this post out of 5. Change rating

2007-02-22 (first published: )

620 reads

Technical Article

FULL SERVER DOCUMENTATION -- HTML  and revised

Revise note: 1. reformat the result into HTML page.2. added script to find sql server service account, sqlserver agent account.3. added script to find sql server authentication mode.4. added script to find sql server startup parameters5. added table of contents and hyperlinks.6. add DOS batch script to run the script on all servers.     TRY […]

5 (1)

You rated this post out of 5. Change rating

2007-02-20 (first published: )

1,428 reads

Technical Article

Idera SQLSafe SP

Useful for Idera SQLSafe backups. Great software but the GUI and maintenance plan generation are a little quirky. You can easily modify this for Full, Log, Encryption, etc. - Example:EXEC usp_SS_FullBackup @dbsvrname='YOURSERVERNAME',@dbname='Northwind',@path='C:\Northwind_Full_',@description='Full Backups for Northwind'

1 (1)

You rated this post out of 5. Change rating

2007-02-19 (first published: )

476 reads

Technical Article

CHECKSUM replacement for IMAGE

As we all know, BINARY_CHECKSUM ignores columns of data type IMAGE.This code is 100% compatible with MS original. That is, the result is identical.You can use it "as is", or you can use it to see that MS function does not produce that unique values one could expect.

You rated this post out of 5. Change rating

2007-02-15 (first published: )

183 reads

Blogs

Webcast Tomorrow on SQL Server Disaster Recovery

By

Tomorrow, November 19, 2024, at 1 PM EST, I'm giving a webcast on SQL...

SQL Server Quickie #48 – Azure SQL Managed Instance

By

Today I have uploaded SQL Server Quickie #48 to YouTube. This time I’m talking...

Spark Connect Dotnet November 2024 Where are we?

By

All Spark Connect Posts Introduction There have been quite a few changes in the last...

Read the latest Blogs

Forums

Agent job security account

By onkarnath.tiwary

Hi All, I have few sql server agent scheduled jobs which are supposed to...

How to manage Time zone changes for countries

By gauravkumar9

Hello Everyone, I am using Microsoft SQL Azure (RTM) - 12.0.2000.8, as of October...

How much transaction logs generated by hourly/daily

By JasonO

For MSSQL is there any queries or methods for me to pull historical data...

Visit the forum

Question of the Day

What's the Ceiling?

What do I get as the results from this code?

SELECT CEILING (999.999), CEILING (-999.999);

See possible answers