Quick and hassle free method of viewing the existing or non-existant primary keys in your database.
The purpose of this task is to generate a report showing all your foreign keys. Generally this would be considered nothing special only that this script also returns the tables, column foreign key constraint name and the relationship properties.Here's how to do it:First of all copy the script and paste it in Query AnalyzerStep 1: […]
This Stored Procedure creates the script of all existing triggersOptionally it creates the script to drop the triggers too.Triggers may belong to different owners. This procedure takes care of it.In SQLServer Enterprise Manager there is a facility to generate scripts forTables, Views, Stored Procedures etc.But it won't generate script for triggers unless we include the […]
When doing bulk data changes it may be beneficial to disable indexes prior to starting the operation. Fortunately, SQL's rich metadata makes this very easy to automate in a robust fashion.
If you think about it carefully, you’ll realise, that index maintenance is necessary and that it makes sense, and that SQL Server is not doing this task automatically according to the book.