Saturday, February 25, 2012

restoring databse

Hi,
I've tried to restore my database from other computer. I have my database
backup made by r-clicking/task/back-up in MSQL SMSE. Comp server n1 that
I've made backup on has name SKLEP\INSERTGT, the one I want to restore data
on-DOM\INSERTGT. While restoring occurs an error "The backu set holds a
backup of a database other than existing 'sklepdata' database".
Now, what should I do to restore data from this file .bak?
Thanks and regards,
Mike.Hi Mike,
This error occurs because the media (the bfk file) you want to restore
doesn't match the existing database. So you can :
1 - Delete the existing database before doing it
2 - Do it in T-SQL and use the REPLACE option of the RESTORE command
3 - Check the 'Overwrite the existing database' parameter (options)
I guess you'll use the third one...
jacek wrote :
> Hi,
> I've tried to restore my database from other computer. I have my database
> backup made by r-clicking/task/back-up in MSQL SMSE. Comp server n1 that
> I've made backup on has name SKLEP\INSERTGT, the one I want to restore data
> on-DOM\INSERTGT. While restoring occurs an error "The backu set holds a
> backup of a database other than existing 'sklepdata' database".
> Now, what should I do to restore data from this file .bak?
> Thanks and regards,
> Mike.
>|||Since the backup was taken on a different server and the target databases
exists, you need to specify the "overwrite the existing database" option.
This corresponds to the WITH REPLACE option of the RESTORE DATABASE command.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"jacek" <jacek@.o.pl> wrote in message
news:fd3cou$sg2$1@.nemesis.news.tpi.pl...
> Hi,
> I've tried to restore my database from other computer. I have my database
> backup made by r-clicking/task/back-up in MSQL SMSE. Comp server n1 that
> I've made backup on has name SKLEP\INSERTGT, the one I want to restore
> data on-DOM\INSERTGT. While restoring occurs an error "The backu set holds
> a backup of a database other than existing 'sklepdata' database".
> Now, what should I do to restore data from this file .bak?
> Thanks and regards,
> Mike.
>|||> This error occurs because the media (the bfk file) you want to restore
> doesn't match the existing database. So you can :
> 1 - Delete the existing database before doing it
> 2 - Do it in T-SQL and use the REPLACE option of the RESTORE command
> 3 - Check the 'Overwrite the existing database' parameter (options)
> I guess you'll use the third one...
Heh... I was so easy... I'm dumb;)
Thanks mate!|||Hi, I got the same problem .Here is the solution i found You have to
specify the "overwrite the existing database" option and Set the Database
files(mdf and _Log.ldf properly) by Restore as Column and click ok.
To set Mdf and _log.ldf files
1. Click Browser button provided with Columns Original File Name and Restore
as .
Regards,
Malini Jain
"Dan Guzman" wrote:
> Since the backup was taken on a different server and the target databases
> exists, you need to specify the "overwrite the existing database" option.
> This corresponds to the WITH REPLACE option of the RESTORE DATABASE command.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "jacek" <jacek@.o.pl> wrote in message
> news:fd3cou$sg2$1@.nemesis.news.tpi.pl...
> > Hi,
> > I've tried to restore my database from other computer. I have my database
> > backup made by r-clicking/task/back-up in MSQL SMSE. Comp server n1 that
> > I've made backup on has name SKLEP\INSERTGT, the one I want to restore
> > data on-DOM\INSERTGT. While restoring occurs an error "The backu set holds
> > a backup of a database other than existing 'sklepdata' database".
> > Now, what should I do to restore data from this file .bak?
> > Thanks and regards,
> > Mike.
> >
>

No comments:

Post a Comment