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)
 Auto Backup and Restore

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-05-09 : 22:34:31
Scott writes "Hi,

Got a funny one, I have written a couple of SQL agent jobs to backup and restore a database. I can get the jobs to run but when I look at the restored database it has missing tables or missing data from tables. If I then go on to do a manual restore it works like a treat.

Here are my two jobs :

1. <<<BACKUP>>>

USE MASTER
GO
backup DATABASE eclipse to DISK='E:\nbackup\eclipse1.BAK'


2. <<<RESTORE>>>

USE MASTER
GO
RESTORE DATABASE Training FROM DISK='E:\nbackup\eclipse1.bak'
WITH REPLACE,STATS=2

Thanks for any help.

Regards

Scott"

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-05-09 : 22:36:12
1.
You're running the restore before the backup. Is this a quiz?

If it is, we both failed and are IDIOTS!!!! You're restoring the wrong database dufus.



2.
Self control....breathe, breathe


3.
If you strike out three times, are you out?

No?

MeanOldDBA
derrickleggett@hotmail.com


Hey, it worked.

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -