Maintenance and Management

Technical Article

Disable and enable constraints and triggers

  • Script

Often in development environment you want to truncate all the tables to insert new data from production, but you cannot do easily as there were a bumch of Foreign Keys and triggers. Dropping all triggers and FK's and then recreating them again is a tedious job. That to dropping and recreating FK's in a particular […]

5 (1)

You rated this post out of 5. Change rating

2006-09-19 (first published: )

243 reads

Technical Article

Get SQL job status for all servers.

  • Script

Below script will Get SQL job status for all servers running on the same network. All you have to do is create a linked server with msdb on local machine. Executing this script will give you all job status on any number of servers. Good for an environment where a DBA had to see job […]

5 (1)

You rated this post out of 5. Change rating

2006-09-20 (first published: )

744 reads

Technical Article

InvalidLogins.pl

  • Script

Perl script that reports SQL Server AD accounts which are now longer valid by verifying the output of sp_validlogins system stored procedure against SID stored in AD. This is done to ensure only accounts that do not exist are reported since sp_validlogins will only check the name and not SID against AD. Accounts that are […]

You rated this post out of 5. Change rating

2007-02-12 (first published: )

243 reads

Technical Article

T-SQL Maintenance Plan Creation

  • Script

Use this script ot be able to create DB Maintenance Plans fast. If you need to create the plans on servers similarly set up, edit the required parameters once, and when you create a new plan, you will only need to specify a database name and one task start time, run the script and the […]

You rated this post out of 5. Change rating

2007-02-05 (first published: )

972 reads

Technical Article

Reset Identity Seeds

  • Script

This Script is used to reset the Identity coloumn to whatever the value we required. We need to compile this procedure in the database where we required to ressed the Identity coloumns of every table. After compiling we need to execute this procedure with a parameter of integer value. Then it will reseed the Identity […]

You rated this post out of 5. Change rating

2006-08-29 (first published: )

204 reads

Technical Article

Data Dictionary - SQL 2005

  • Script

I know there are several scripts out there showing you on how to create a data dictionary... I created this script for creating a data dictionary for SQL 2005. It stores the data into a table in the database that you choose. The script only stores the table name, column name, default value of the […]

5 (1)

You rated this post out of 5. Change rating

2006-10-24 (first published: )

3,116 reads

Blogs

How to find free space in Azure PosgreSQL

By

I wanted to figure out how big (or approximately how big) my dump file...

T-SQL Tuesday #180: Good enough is perfect Roundup

By

This month, I prompted bloggers to discuss whether good enough is perfect. Thank you to all...

Using SQL Compare with Read-only Access

By

Recently a customer asked if SQL Compare and SQL Data Compare can be used...

Read the latest Blogs

Forums

Compare rows within the same table

By SQL Bee

I have a table. Structure in script below. I have to compare and see...

Microsoft Recommendations for Update Stats?

By Brandie Tarvin

I have an application team that is insisting on daily (and for some, weekly)...

how can i tell if our db2 driver is ms or ibm or other?

By stan

i see this in the definition of a linked server on our wh sql...

Visit the forum

Question of the Day

A Strange Result

What does this code return in SSMS 20 from SQL Server 2019?

select '|' + CHAR(0)+'abc' + '|';

See possible answers