I have a development db, test db and live db.
I want to copy my development db to my test db.
I've backed both up and then restored the test db using the development db
backup
changing the file and log paths.
However when I go into the test db the data in the tables is not correct.
For example in the development db I have 10 rows in one table but in the
corresponding table in test db I only have the 2 original Test db rows.
Can you explain why?Hi
Did youn follow theses steps
1) BACKUP DATABASE TO..... (Develop database)
2) RESTORE DATABASE Test FROM DISK ='......' (.BAK file from the Develop
Darabase (Step1))
Probably during the RESTORE from the Develop database ,users do Insert to
the Develop DataBase, do not they?
As result you see different data.
"lindab" <lindab@.discussions.microsoft.com> wrote in message
news:08DCAF73-D293-4896-8AFE-230504DAFF07@.microsoft.com...
>I have a development db, test db and live db.
> I want to copy my development db to my test db.
> I've backed both up and then restored the test db using the development db
> backup
> changing the file and log paths.
> However when I go into the test db the data in the tables is not correct.
> For example in the development db I have 10 rows in one table but in the
> corresponding table in test db I only have the 2 original Test db rows.
> Can you explain why?|||Perhaps your backup file contains more than one database backup and the
first (oldest) is restored by default. You can list the contents with
RESTORE HEADERONLY and specify the desired one with the FILE parameter on
the RESTORE statement.
RESTORE HEADERONLY
FROM DISK='C:\Backups\MyDatabase.bak'
Also, you can specify the INIT option on your BACKUP command to overwrite
instead of appending.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"lindab" <lindab@.discussions.microsoft.com> wrote in message
news:08DCAF73-D293-4896-8AFE-230504DAFF07@.microsoft.com...
>I have a development db, test db and live db.
> I want to copy my development db to my test db.
> I've backed both up and then restored the test db using the development db
> backup
> changing the file and log paths.
> However when I go into the test db the data in the tables is not correct.
> For example in the development db I have 10 rows in one table but in the
> corresponding table in test db I only have the 2 original Test db rows.
> Can you explain why?|||Hi,
No -one was working on either db while I did the backup and restore.
Linda
"Uri Dimant" wrote:
> Hi
> Did youn follow theses steps
> 1) BACKUP DATABASE TO..... (Develop database)
> 2) RESTORE DATABASE Test FROM DISK ='......' (.BAK file from the Develop
> Darabase (Step1))
> Probably during the RESTORE from the Develop database ,users do Insert to
> the Develop DataBase, do not they?
> As result you see different data.
>
>
> "lindab" <lindab@.discussions.microsoft.com> wrote in message
> news:08DCAF73-D293-4896-8AFE-230504DAFF07@.microsoft.com...
> >I have a development db, test db and live db.
> > I want to copy my development db to my test db.
> > I've backed both up and then restored the test db using the development db
> > backup
> > changing the file and log paths.
> > However when I go into the test db the data in the tables is not correct.
> > For example in the development db I have 10 rows in one table but in the
> > corresponding table in test db I only have the 2 original Test db rows.
> > Can you explain why?
>
>|||I have retried the backup and restore - this time making sure I had selected
the overwrite option and the restore has worked properly.
Many thanks to both of you for your help.
"Dan Guzman" wrote:
> Perhaps your backup file contains more than one database backup and the
> first (oldest) is restored by default. You can list the contents with
> RESTORE HEADERONLY and specify the desired one with the FILE parameter on
> the RESTORE statement.
> RESTORE HEADERONLY
> FROM DISK='C:\Backups\MyDatabase.bak'
> Also, you can specify the INIT option on your BACKUP command to overwrite
> instead of appending.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "lindab" <lindab@.discussions.microsoft.com> wrote in message
> news:08DCAF73-D293-4896-8AFE-230504DAFF07@.microsoft.com...
> >I have a development db, test db and live db.
> > I want to copy my development db to my test db.
> > I've backed both up and then restored the test db using the development db
> > backup
> > changing the file and log paths.
> > However when I go into the test db the data in the tables is not correct.
> > For example in the development db I have 10 rows in one table but in the
> > corresponding table in test db I only have the 2 original Test db rows.
> > Can you explain why?
>
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment