Foreign Key DDL wizard

This script can be run when you want to do batch processing on a database, such as a dynamic truncate statement for all tables in your database.  This script will actually script all the Foreign Keys in your database, and then store them into a table called FOREIGN_KEY_TEMP.  It will then generate, and execute, all […]

2004-01-22

214 reads

Generate all database foreign keys

This script will create another script that has all foreign key DDL that exists in a given database.   You only have to run this, and then select the results of this script and paste it into another query window, or if for some reason you have lost your DDL this will enable you to retrieve […]

2003-11-12

225 reads

Blogs

How to put a SQL Server Database into Recovery Pending

By

You might be asking why on earth would you want to get a database...

Daily Coping 30 Jul 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

SQL Server on Linux Storage Secrets on Microsoft Channel 9

By

I’m thrilled to have recently released a video with Microsoft’s Data Exposed on Channel...

Read the latest Blogs

Forums

Having sum(amount) = 0 returns negatives as well.

By C-M-A

Hello all, I'm trying to get a list of ID's that have a total...

How to limit SQL Job Success events

By Graham Van der vaart

Hi, We have a monitoring tool that reads Windows Event Log entries for Failure...

SQL Server Agent producing unreproducible error

By Thom A

I've built a Powershell script, which I want to run through SQL Server Agent....

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers