Wednesday, March 7, 2012

Database Restore Error

Hi,
We use Veritas NetBackup to do backups and restore of SQL Server 2000
databases. Recently, I had to restore a backup of a database to another
server for getting some deleted records from the backup. For this I created a
new database on the other server with the same name and started a restore
with MOVE option from Veritas NetBackup. Even though it was a newly created
database on which the restore was being applied, Veritas NetBackup gave an
error message that:
DBMS MSG - ODBC message. ODBC return code <-1>, SQL State <37000>, Message
Text <[Microsoft][ODBC SQL Server Driver][SQL Server]Exclusive access could
not be obtained because the database is in use.>
DBMS MSG - <[Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE DATABASE
is terminating abnormally.>
What could be the reason that Veritas NetBackup wasn't able to get an
exclusive access on a newly created database?
Thanks in advance.You don't need to create a database before restoring a backup. Chances are
you were still connected to that DB while attempting the restore.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"sharman" <sharman@.discussions.microsoft.com> wrote in message
news:7985706F-67EE-45CB-BEE1-22081232E1B6@.microsoft.com...
Hi,
We use Veritas NetBackup to do backups and restore of SQL Server 2000
databases. Recently, I had to restore a backup of a database to another
server for getting some deleted records from the backup. For this I created
a
new database on the other server with the same name and started a restore
with MOVE option from Veritas NetBackup. Even though it was a newly created
database on which the restore was being applied, Veritas NetBackup gave an
error message that:
DBMS MSG - ODBC message. ODBC return code <-1>, SQL State <37000>, Message
Text <[Microsoft][ODBC SQL Server Driver][SQL Server]Exclusive access could
not be obtained because the database is in use.>
DBMS MSG - <[Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE DATABASE
is terminating abnormally.>
What could be the reason that Veritas NetBackup wasn't able to get an
exclusive access on a newly created database?
Thanks in advance.|||How do I do a restore of a database to another server if I do not create a
database first?
"Tom Moreau" wrote:
> You don't need to create a database before restoring a backup. Chances are
> you were still connected to that DB while attempting the restore.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "sharman" <sharman@.discussions.microsoft.com> wrote in message
> news:7985706F-67EE-45CB-BEE1-22081232E1B6@.microsoft.com...
> Hi,
> We use Veritas NetBackup to do backups and restore of SQL Server 2000
> databases. Recently, I had to restore a backup of a database to another
> server for getting some deleted records from the backup. For this I created
> a
> new database on the other server with the same name and started a restore
> with MOVE option from Veritas NetBackup. Even though it was a newly created
> database on which the restore was being applied, Veritas NetBackup gave an
> error message that:
> DBMS MSG - ODBC message. ODBC return code <-1>, SQL State <37000>, Message
> Text <[Microsoft][ODBC SQL Server Driver][SQL Server]Exclusive access could
> not be obtained because the database is in use.>
> DBMS MSG - <[Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE DATABASE
> is terminating abnormally.>
> What could be the reason that Veritas NetBackup wasn't able to get an
> exclusive access on a newly created database?
> Thanks in advance.
>|||Simply restore the database. NetBackup *shouldn't* need to have one already
there, though I haven't used the product myself.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"sharman" <sharman@.discussions.microsoft.com> wrote in message
news:B700BD9B-A3E9-4D30-AA54-FCB08576E9F0@.microsoft.com...
How do I do a restore of a database to another server if I do not create a
database first?
"Tom Moreau" wrote:
> You don't need to create a database before restoring a backup. Chances
> are
> you were still connected to that DB while attempting the restore.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "sharman" <sharman@.discussions.microsoft.com> wrote in message
> news:7985706F-67EE-45CB-BEE1-22081232E1B6@.microsoft.com...
> Hi,
> We use Veritas NetBackup to do backups and restore of SQL Server 2000
> databases. Recently, I had to restore a backup of a database to another
> server for getting some deleted records from the backup. For this I
> created
> a
> new database on the other server with the same name and started a restore
> with MOVE option from Veritas NetBackup. Even though it was a newly
> created
> database on which the restore was being applied, Veritas NetBackup gave an
> error message that:
> DBMS MSG - ODBC message. ODBC return code <-1>, SQL State <37000>, Message
> Text <[Microsoft][ODBC SQL Server Driver][SQL Server]Exclusive access
> could
> not be obtained because the database is in use.>
> DBMS MSG - <[Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE
> DATABASE
> is terminating abnormally.>
> What could be the reason that Veritas NetBackup wasn't able to get an
> exclusive access on a newly created database?
> Thanks in advance.
>|||Hi,
In the netbackup script you can mention the database name this script is
used to restore database.
Regards,
Amol Lembhe
"Tom Moreau" wrote:
> Simply restore the database. NetBackup *shouldn't* need to have one already
> there, though I haven't used the product myself.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "sharman" <sharman@.discussions.microsoft.com> wrote in message
> news:B700BD9B-A3E9-4D30-AA54-FCB08576E9F0@.microsoft.com...
> How do I do a restore of a database to another server if I do not create a
> database first?
> "Tom Moreau" wrote:
> > You don't need to create a database before restoring a backup. Chances
> > are
> > you were still connected to that DB while attempting the restore.
> >
> > --
> > Tom
> >
> > ----
> > Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> > SQL Server MVP
> > Toronto, ON Canada
> > https://mvp.support.microsoft.com/profile/Tom.Moreau
> >
> >
> > "sharman" <sharman@.discussions.microsoft.com> wrote in message
> > news:7985706F-67EE-45CB-BEE1-22081232E1B6@.microsoft.com...
> > Hi,
> >
> > We use Veritas NetBackup to do backups and restore of SQL Server 2000
> > databases. Recently, I had to restore a backup of a database to another
> > server for getting some deleted records from the backup. For this I
> > created
> > a
> > new database on the other server with the same name and started a restore
> > with MOVE option from Veritas NetBackup. Even though it was a newly
> > created
> > database on which the restore was being applied, Veritas NetBackup gave an
> > error message that:
> >
> > DBMS MSG - ODBC message. ODBC return code <-1>, SQL State <37000>, Message
> > Text <[Microsoft][ODBC SQL Server Driver][SQL Server]Exclusive access
> > could
> > not be obtained because the database is in use.>
> >
> > DBMS MSG - <[Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE
> > DATABASE
> > is terminating abnormally.>
> >
> > What could be the reason that Veritas NetBackup wasn't able to get an
> > exclusive access on a newly created database?
> >
> > Thanks in advance.
> >
> >
>|||So, does NetBackup require the existence of the DB before restoring it?
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Amol Lembhe" <amolrl@.gmail.com> wrote in message
news:7E73614E-803D-46C0-8714-38A24F048A2C@.microsoft.com...
Hi,
In the netbackup script you can mention the database name this script is
used to restore database.
Regards,
Amol Lembhe
"Tom Moreau" wrote:
> Simply restore the database. NetBackup *shouldn't* need to have one
> already
> there, though I haven't used the product myself.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "sharman" <sharman@.discussions.microsoft.com> wrote in message
> news:B700BD9B-A3E9-4D30-AA54-FCB08576E9F0@.microsoft.com...
> How do I do a restore of a database to another server if I do not create a
> database first?
> "Tom Moreau" wrote:
> > You don't need to create a database before restoring a backup. Chances
> > are
> > you were still connected to that DB while attempting the restore.
> >
> > --
> > Tom
> >
> > ----
> > Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> > SQL Server MVP
> > Toronto, ON Canada
> > https://mvp.support.microsoft.com/profile/Tom.Moreau
> >
> >
> > "sharman" <sharman@.discussions.microsoft.com> wrote in message
> > news:7985706F-67EE-45CB-BEE1-22081232E1B6@.microsoft.com...
> > Hi,
> >
> > We use Veritas NetBackup to do backups and restore of SQL Server 2000
> > databases. Recently, I had to restore a backup of a database to another
> > server for getting some deleted records from the backup. For this I
> > created
> > a
> > new database on the other server with the same name and started a
> > restore
> > with MOVE option from Veritas NetBackup. Even though it was a newly
> > created
> > database on which the restore was being applied, Veritas NetBackup gave
> > an
> > error message that:
> >
> > DBMS MSG - ODBC message. ODBC return code <-1>, SQL State <37000>,
> > Message
> > Text <[Microsoft][ODBC SQL Server Driver][SQL Server]Exclusive access
> > could
> > not be obtained because the database is in use.>
> >
> > DBMS MSG - <[Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE
> > DATABASE
> > is terminating abnormally.>
> >
> > What could be the reason that Veritas NetBackup wasn't able to get an
> > exclusive access on a newly created database?
> >
> > Thanks in advance.
> >
> >
>|||No, netbackup does not require DB to be present before restoration.
Regards,
Amol Lembhe
"Tom Moreau" wrote:
> So, does NetBackup require the existence of the DB before restoring it?
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Amol Lembhe" <amolrl@.gmail.com> wrote in message
> news:7E73614E-803D-46C0-8714-38A24F048A2C@.microsoft.com...
> Hi,
> In the netbackup script you can mention the database name this script is
> used to restore database.
> Regards,
> Amol Lembhe
>
> "Tom Moreau" wrote:
> > Simply restore the database. NetBackup *shouldn't* need to have one
> > already
> > there, though I haven't used the product myself.
> >
> > --
> > Tom
> >
> > ----
> > Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> > SQL Server MVP
> > Toronto, ON Canada
> > https://mvp.support.microsoft.com/profile/Tom.Moreau
> >
> >
> > "sharman" <sharman@.discussions.microsoft.com> wrote in message
> > news:B700BD9B-A3E9-4D30-AA54-FCB08576E9F0@.microsoft.com...
> > How do I do a restore of a database to another server if I do not create a
> > database first?
> >
> > "Tom Moreau" wrote:
> >
> > > You don't need to create a database before restoring a backup. Chances
> > > are
> > > you were still connected to that DB while attempting the restore.
> > >
> > > --
> > > Tom
> > >
> > > ----
> > > Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> > > SQL Server MVP
> > > Toronto, ON Canada
> > > https://mvp.support.microsoft.com/profile/Tom.Moreau
> > >
> > >
> > > "sharman" <sharman@.discussions.microsoft.com> wrote in message
> > > news:7985706F-67EE-45CB-BEE1-22081232E1B6@.microsoft.com...
> > > Hi,
> > >
> > > We use Veritas NetBackup to do backups and restore of SQL Server 2000
> > > databases. Recently, I had to restore a backup of a database to another
> > > server for getting some deleted records from the backup. For this I
> > > created
> > > a
> > > new database on the other server with the same name and started a
> > > restore
> > > with MOVE option from Veritas NetBackup. Even though it was a newly
> > > created
> > > database on which the restore was being applied, Veritas NetBackup gave
> > > an
> > > error message that:
> > >
> > > DBMS MSG - ODBC message. ODBC return code <-1>, SQL State <37000>,
> > > Message
> > > Text <[Microsoft][ODBC SQL Server Driver][SQL Server]Exclusive access
> > > could
> > > not be obtained because the database is in use.>
> > >
> > > DBMS MSG - <[Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE
> > > DATABASE
> > > is terminating abnormally.>
> > >
> > > What could be the reason that Veritas NetBackup wasn't able to get an
> > > exclusive access on a newly created database?
> > >
> > > Thanks in advance.
> > >
> > >
> >
> >
>

No comments:

Post a Comment