Wednesday, March 7, 2012

Backup of Stored Procedures

How can I backup all the stored procedures from my SQL Server db to all .sql
files?Hi,
SQL 2000:-
1. Open Enterprise Manager
2. COnnect to SQL Server
3. Expand databases and select the correct database
4. Right click -- all tasks -- Select "Generate SQL script"
5. Click show all, click all stored Procedures
6. Select the required formating and options
7. Click ok and give the filename.sql and save to a location
SQL 2005
1. Open SQL Server Management stucio and connect to sql server
2. Expand the databases and select the database
3. Right click-- All taks -- generate scripts
4 select the necessar options and click next
5. Click procedures
6. click next and then the generated script will be craeted in query window
7. save to a location
Thanks
Hari
SQL Server MVP
"3451Jack329" <Jack1@.hotmail.com> wrote in message
news:DjEMg.45399$tQ.744575@.wagner.videotron.net...
> How can I backup all the stored procedures from my SQL Server db to all
> .sql files?
>|||You didn't say what version of SQL Server or whether you want to do it interactively or
programmatically. In Management Studio, you can right-click a database and say "Generate Scripts. I
think Enterprise Manager has similar option. Or do it programmatically using SMO or DMO, see
http://www.karaszi.com/SQLServer/info_generate_script.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"3451Jack329" <Jack1@.hotmail.com> wrote in message
news:DjEMg.45399$tQ.744575@.wagner.videotron.net...
> How can I backup all the stored procedures from my SQL Server db to all .sql files?
>

No comments:

Post a Comment