How could I restore a backup automatically?Hi,
You can schedule the below TSQL command using SQL Agent --Jobs using
Enterprise manager.
Restore database <dbname> from disk='c:\backup\dbname.bak'
(replace the directory , file name and database name with yours)
Use WITH MOVE Option incase if the existing database is already available in
the server.
Thanks
Hari
MCDBA
"Xavi" <anonymous@.discussions.microsoft.com> wrote in message
news:AFEDED0D-C7B5-48ED-9EC0-22AC8B77DB71@.microsoft.com...
>
|||Xavi,
the syntax for restoring a database in under RESTORE in BOL. To make it
automatic - hmm. In what sense? If you want it to occur automatically at a
specific time, you could schedule a job to run the RESTORE script. If it is
as a response to an 'action query' - insert, delete, update then the RESTORE
script would be in a trigger. Without knowing more about your requirements
it's difficult to be specific. You might also be interested in log shipping
in which a warm stand by server is maintained by transporting backed up logs
and restoring them on another server.
HTH,
Paul Ibison
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment