Automated Restore Help | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Automated Restore Help

Starting with either a) a nightly backup up live_db, or b) a backup file we create manually, peridically. I then need to simply restore this as demo_db with a nightly job. Same server. Sounds very simple, but after an hour of searching I can’t actually find out how to do it!
Are you looking for the scripts? If the process here is how you do it 1. Copy the backup file to the target server
2. Create a demo database on the target server
3. Run the Scripts for restoration of the database
4. run the scripts for creating login and permissions Let me know if you are looking for scripts I will try to write them for you. You can automate the whole task if you can write the isql scripts which you can save it with a .bat extension and then can schedule it using windows scheduler.
If it needs scripts (ie you can’t do it via Ent Mgr) then I could dowith help. I am ok with normal SQL, but know nothing about backing up, restoring etc. I don’t expect you to write them for me though!<br /><br />If you can point me in the general direction that would be most helpful <img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ />
No way to schedule a job to restore using EM. Only with scripts. Since is the same server, steps:
1) Not necessary.
2) Only once.
3 and 4) like Raj said.
Luis Martin
Moderator
SQL-Server-Performance.com One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important
Bertrand Russell
All postings are provided “AS IS” with no warranties for accuracy.
So I can write the script and set this up as a Job with SQL Server Agent? If so, can you point me in the direction of help / information for writing these scripts? Thanks
Yes. You have to read (Books on Line) find RESTORE and Schedule Jobs. In SQLAgent, jobs, new job. In Steps you can write scripts and in Schedule you can set to run at any time. Luis Martin
Moderator
SQL-Server-Performance.com One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important
Bertrand Russell
All postings are provided “AS IS” with no warranties for accuracy.
]]>