Link to home
Avatar of ADhal37
ADhal37

asked on

Creating a batch file

Hi,

i want to know how to create a batch file that can run be run from a scheduled task to do a restore of a sql database?

Ii is express version which is why I need the batch file!

Thanks
Avatar of sameer2010
sameer2010
Flag of India image

You can write the following and create a SQL server agent job OR sqlcmd script.
RESTORE DATABASE your_db
   FROM DISK = 'Z:\backup.bak'

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of APoPhySpt
APoPhySpt
Flag of Portugal image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial