Tag Archives: T-SQL

How to control windows services from SQL Server?

How to control windows services from SQL Server? For a SQL Server DBA there are scenarios where he/she needs to deal with Windows services from SQL Server when there is no direct access to Windows server and only have access … Continue reading

Posted in SQL Server DBA | 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