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: )

234 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: )

740 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: )

242 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: )

968 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: )

200 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,108 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