I am using sql server 2005 and i want to transfer my all stored procedures and functions to another newly created database. How i can do this by writing one stored procedure. Can any one tell me help me regarding this?
Asked
Active
Viewed 361 times
1
-
Not sure if this is could help: http://stackoverflow.com/questions/945325/syncing-stored-procedures-between-two-databases?rq=1 – Mad Dog Tannen Oct 28 '13 at 10:40
1 Answers
0
You can use generate script feature and run it on another database. Right click on your database --> tasks--> generate script choose your objects and get the scrip then run it on the other database.

Amir Keshavarz
- 3,050
- 1
- 19
- 26
-
-
-
i have 200 stored procedures in one database. i want to move this by executing a single stored procedure.Wether it is possible? – Raghuveera Oct 28 '13 at 11:43
-
Note that there is no mechanism that you can move procedures . you should recreate them. with generate script feature you can generate script for all of your procedures just in one time. and execute it so all you have other side. – Amir Keshavarz Oct 28 '13 at 11:46
-
1I got the solution from http://stackoverflow.com/questions/19631009/no-answer-for-copy-stored-procedure-one-database-to-another – Raghuveera Oct 28 '13 at 12:03
-
-
-
There is no problem but generate script is a featute that ssms considers for this requests. So ir is more accurate. – Amir Keshavarz Oct 29 '13 at 13:16