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 2005 Forums
 SQL Server Administration (2005)
 Restore a db using command-line?

Author  Topic 

amaru96
Starting Member

2 Posts

Posted - 2009-02-23 : 02:53:35
Hi guys, I am quite new to SQL but I need to be able to schedule a restore of a database. I assume there's a way to do this using the command line?

Or is there some other way to schedule a restore?

heavymind
Posting Yak Master

115 Posts

Posted - 2009-02-23 : 05:44:46
http://msdn.microsoft.com/en-us/library/ms186858.aspx
and use sqlcmd utility with -i param and following file name with restore script

Thanks, Vadym
MCITP DBA 2005/2008
Chief DBA at http://www.db-staff.com
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-02-23 : 07:20:43
Use Restore command and put in job.
Go to Top of Page

amaru96
Starting Member

2 Posts

Posted - 2009-02-23 : 20:57:34
Thanks for the info.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-02-23 : 21:03:14
You are Welcome .
Go to Top of Page
   

- Advertisement -