Category Archives: SQL Scripts

How to Delete Duplicate Records in SQL Server

How to Delete Duplicate Records in SQL Server Usually on daily basis we usually need to perform removing duplicate records from a table. This post can help you to understand “How to Delete Duplicate Records in SQL Server”. Here consider … Continue reading

Posted in SQL Development, SQL Scripts | Tagged , , , , , , , , | Leave a comment

Script all Primary Keys, Foreign Keys in a SQL Server using T-SQL

Script all Primary Keys, Foreign Keys in a SQL Server using T-SQL Find the relationships between tables in sql server Get Primary Key and Foreign Key details using T-SQL   How to find all related tables of a given table? … Continue reading

Posted in SQL Development, SQL Scripts | Tagged , , , , , , | Leave a comment

Automate database restore procedure SQL Server

Automate database restore procedure SQL Server Make sure that the stored procedure “[dbo].[DB_Restore]” is available at Target Instance master database.  Connect to target server instance and open a new query window from SSMS Why Database Restore Automation? It reduce the … Continue reading

Posted in SQL Scripts, SQL Server DBA | Tagged , , , , , , , , , , , , , , , | 4 Comments