Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automation of SQL Scripts

Status
Not open for further replies.

cstrong

MIS
Dec 18, 2000
22
0
0
GB
Hi,

Is it possible to run a set of commands to automate the generation of SQL Scripts for a database? I would be scripting every object within the Database.

Kind Regards
Clive Strong
 
Yes! it is:

On em right click on the database, select all tasks and then select generate SQL Script...
Then follow the Screen AL Almeida
NT/DB Admin
"May all those that come behind us, find us faithfull"
 
Hi,

Yes, I know how to generate an SQL Script for the database. What I would like to do, is on a weekly basis, create a Database Script for each DB (Mangement are requesting this). What I don't want to do is manually generate a script for each DB each week! I was wondering if I could possibly schedule this task somehow?

Thanks in advance,
Clive Strong
 
One way you could do this is to use DTS.

Use the Transfer SQL Server Objects task to transfer all objects (take off the Copy Data option) to an empty database held on your server. On the transfer tab you tell DTS where to place the script file.

On success of the above step the next step can e-mail the script file to who ever you want.

This DTS package can then be scheduled as required.

Rick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top