Wednesday, January 26, 2011

Copy a store procedure from one database to another.

Some times we need to copy a store procedure from one database to another. then we have to follow the following steps:

Right click on the SP under the DB and click Script Stored Procedure As > CREATE To > File, it will create an SQL script file, then run that script on the other database.




It's important that when you execute the store procedure just rename the database name.

SQL Get all Index create script from Database

To get all script from database as a create new index into another database you can use the following --Get all Index Script SELECT...