Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 SQL server batch

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-04-21 : 08:07:47
Andris writes "Hi all,

I would like to backup and restore database using a batch file, but I can't find anywhere how to do it. Is it possible in sql server to generate a batch file with sql create and insert statements?

Thanks in any advice."

Thrasymachus
Constraint Violating Yak Guru

483 Posts

Posted - 2005-04-21 : 10:44:40
Your batch file would have to use the osql command line utility logging in as a user who has permissions to use the backup statement. I would look up the osql command line utility.

I am a little curious as to why you are doing this instead of using scheduled jobs.

Sean Roussy
Go to Top of Page
   

- Advertisement -