Monthly Archives: October 2012

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 , , , , , , , , , , , , , , , | 3 Comments

How to Encrypt and Decrypt String in Sql Server

How to Encrypt and Decrypt String in Sql Server I recently got a request to obfuscate data at Dev environment.  Most of the times these kind of requests come in environments where dealing with sensitive data. We usually do dev … Continue reading

Posted in SQL Development, SQL Server DBA | Tagged , , , , , | Leave a comment