Friday, March 30, 2012
Restore db to another server
(SP4) to SQL 2000 (SP4) on Windows Server 2003 (SP1).
I'm restoring db from tape w. BackupExec 9.0. The first time I did a restore
it was cancelled after 10% write; error 34113 on BackupExec server, and
repeated error 57859 on destination SQL server.
When rerun job, no data is written and job cancels with same error in
BackupExec server, and new error in destination SQL server: 57859 --
"Exclusive access couldn not be obtained because the database is in use." (It
seems to me it's not in use, nobody uses this server yet.)
Strange thing is, I can restore another (test) database from same tape
without any problems.
Happy to get any hints or guidelines, I'm kinda stuck.
I deleted the restored database on new SQL server an reran the restore job,
and everything worked OK -- and so I will never know what went wrong the
first time, but will nevertheless be able to spend the weekend with family
instead of SQL.
Thanks for taking time, if you took any.
"JSL" wrote:
> I'm in the process of migrating db:s from SQL 2000 (SP2) on Windows 2000
> (SP4) to SQL 2000 (SP4) on Windows Server 2003 (SP1).
> I'm restoring db from tape w. BackupExec 9.0. The first time I did a restore
> it was cancelled after 10% write; error 34113 on BackupExec server, and
> repeated error 57859 on destination SQL server.
> When rerun job, no data is written and job cancels with same error in
> BackupExec server, and new error in destination SQL server: 57859 --
> "Exclusive access couldn not be obtained because the database is in use." (It
> seems to me it's not in use, nobody uses this server yet.)
> Strange thing is, I can restore another (test) database from same tape
> without any problems.
> Happy to get any hints or guidelines, I'm kinda stuck.
|||Next time, use sp_who to see who is using the database.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"JSL" <JSL@.discussions.microsoft.com> wrote in message
news:90762CE8-604D-4BD5-A1DE-9645952022C9@.microsoft.com...[vbcol=seagreen]
>I deleted the restored database on new SQL server an reran the restore job,
> and everything worked OK -- and so I will never know what went wrong the
> first time, but will nevertheless be able to spend the weekend with family
> instead of SQL.
> Thanks for taking time, if you took any.
> "JSL" wrote:
Restore db to another server
(SP4) to SQL 2000 (SP4) on Windows Server 2003 (SP1).
I'm restoring db from tape w. BackupExec 9.0. The first time I did a restore
it was cancelled after 10% write; error 34113 on BackupExec server, and
repeated error 57859 on destination SQL server.
When rerun job, no data is written and job cancels with same error in
BackupExec server, and new error in destination SQL server: 57859 --
"Exclusive access couldn not be obtained because the database is in use." (It
seems to me it's not in use, nobody uses this server yet.)
Strange thing is, I can restore another (test) database from same tape
without any problems.
Happy to get any hints or guidelines, I'm kinda stuck.I deleted the restored database on new SQL server an reran the restore job,
and everything worked OK -- and so I will never know what went wrong the
first time, but will nevertheless be able to spend the weekend with family
instead of SQL.
Thanks for taking time, if you took any.
"JSL" wrote:
> I'm in the process of migrating db:s from SQL 2000 (SP2) on Windows 2000
> (SP4) to SQL 2000 (SP4) on Windows Server 2003 (SP1).
> I'm restoring db from tape w. BackupExec 9.0. The first time I did a restore
> it was cancelled after 10% write; error 34113 on BackupExec server, and
> repeated error 57859 on destination SQL server.
> When rerun job, no data is written and job cancels with same error in
> BackupExec server, and new error in destination SQL server: 57859 --
> "Exclusive access couldn not be obtained because the database is in use." (It
> seems to me it's not in use, nobody uses this server yet.)
> Strange thing is, I can restore another (test) database from same tape
> without any problems.
> Happy to get any hints or guidelines, I'm kinda stuck.|||Next time, use sp_who to see who is using the database.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"JSL" <JSL@.discussions.microsoft.com> wrote in message
news:90762CE8-604D-4BD5-A1DE-9645952022C9@.microsoft.com...
>I deleted the restored database on new SQL server an reran the restore job,
> and everything worked OK -- and so I will never know what went wrong the
> first time, but will nevertheless be able to spend the weekend with family
> instead of SQL.
> Thanks for taking time, if you took any.
> "JSL" wrote:
>> I'm in the process of migrating db:s from SQL 2000 (SP2) on Windows 2000
>> (SP4) to SQL 2000 (SP4) on Windows Server 2003 (SP1).
>> I'm restoring db from tape w. BackupExec 9.0. The first time I did a restore
>> it was cancelled after 10% write; error 34113 on BackupExec server, and
>> repeated error 57859 on destination SQL server.
>> When rerun job, no data is written and job cancels with same error in
>> BackupExec server, and new error in destination SQL server: 57859 --
>> "Exclusive access couldn not be obtained because the database is in use." (It
>> seems to me it's not in use, nobody uses this server yet.)
>> Strange thing is, I can restore another (test) database from same tape
>> without any problems.
>> Happy to get any hints or guidelines, I'm kinda stuck.
Restore db to another server
(SP4) to SQL 2000 (SP4) on Windows Server 2003 (SP1).
I'm restoring db from tape w. BackupExec 9.0. The first time I did a restore
it was cancelled after 10% write; error 34113 on BackupExec server, and
repeated error 57859 on destination SQL server.
When rerun job, no data is written and job cancels with same error in
BackupExec server, and new error in destination SQL server: 57859 --
"Exclusive access couldn not be obtained because the database is in use." (I
t
seems to me it's not in use, nobody uses this server yet.)
Strange thing is, I can restore another (test) database from same tape
without any problems.
Happy to get any hints or guidelines, I'm kinda stuck.I deleted the restored database on new SQL server an reran the restore job,
and everything worked OK -- and so I will never know what went wrong the
first time, but will nevertheless be able to spend the weekend with family
instead of SQL.
Thanks for taking time, if you took any.
"JSL" wrote:
> I'm in the process of migrating db:s from SQL 2000 (SP2) on Windows 2000
> (SP4) to SQL 2000 (SP4) on Windows Server 2003 (SP1).
> I'm restoring db from tape w. BackupExec 9.0. The first time I did a resto
re
> it was cancelled after 10% write; error 34113 on BackupExec server, and
> repeated error 57859 on destination SQL server.
> When rerun job, no data is written and job cancels with same error in
> BackupExec server, and new error in destination SQL server: 57859 --
> "Exclusive access couldn not be obtained because the database is in use."
(It
> seems to me it's not in use, nobody uses this server yet.)
> Strange thing is, I can restore another (test) database from same tape
> without any problems.
> Happy to get any hints or guidelines, I'm kinda stuck.|||Next time, use sp_who to see who is using the database.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"JSL" <JSL@.discussions.microsoft.com> wrote in message
news:90762CE8-604D-4BD5-A1DE-9645952022C9@.microsoft.com...[vbcol=seagreen]
>I deleted the restored database on new SQL server an reran the restore job,
> and everything worked OK -- and so I will never know what went wrong the
> first time, but will nevertheless be able to spend the weekend with family
> instead of SQL.
> Thanks for taking time, if you took any.
> "JSL" wrote:
>sql
Wednesday, March 28, 2012
Restore database...schedule
Microsoft Windows NT - 5.2 (3790)
Product version 8.00.760 (SP3)
1. I am moving two databases to different location (Both ldf and mdf files
because of size) on the same server. Can I automate the process and schedule
to run it at midnight. When I try to create a restore task using enterprise
manager it does not give me a option to schedule the task.
2. While performing same task(restore), few services on another server (Non
sql server) needs to be stopped, once restore is complete needs to be started
again. How to automate (start and stop services).
--
ontario, canadaProbably better to detach the database(s), move the files, thn re-attach
Check out sp_detach_db and sp_attach_db in Books Online. You can write a
few simple T-SQL statements and schedule these as a SQL job for the Agent to
run
Step 1 - sp_detach...etc.
Step 2 - xp_cmdshell 'copy the files...'
Step 3 - sp_attach_db
--
Kevin3NF
SQL Server dude
You want fries with that?
http://kevin3nf.blogspot.com/
I only check the newsgroups during work hours, M-F.
Hit my blog and the contact links if necessary...I may be available.
"db" <db@.discussions.microsoft.com> wrote in message
news:63CA1294-582D-47BF-9508-65E44EDF74C6@.microsoft.com...
> SQL Server Enterprise Edition
> Microsoft Windows NT - 5.2 (3790)
> Product version 8.00.760 (SP3)
> 1. I am moving two databases to different location (Both ldf and mdf files
> because of size) on the same server. Can I automate the process and
> schedule
> to run it at midnight. When I try to create a restore task using
> enterprise
> manager it does not give me a option to schedule the task.
> 2. While performing same task(restore), few services on another server
> (Non
> sql server) needs to be stopped, once restore is complete needs to be
> started
> again. How to automate (start and stop services).
> --
> ontario, canada|||Can I schedule database restore. I have schedules non sql services to stop
at desired time.
--
ontario, canada
"Kevin3NF" wrote:
> Probably better to detach the database(s), move the files, thn re-attach
> Check out sp_detach_db and sp_attach_db in Books Online. You can write a
> few simple T-SQL statements and schedule these as a SQL job for the Agent to
> run
> Step 1 - sp_detach...etc.
> Step 2 - xp_cmdshell 'copy the files...'
> Step 3 - sp_attach_db
> --
> Kevin3NF
> SQL Server dude
> You want fries with that?
> http://kevin3nf.blogspot.com/
> I only check the newsgroups during work hours, M-F.
> Hit my blog and the contact links if necessary...I may be available.
>
> "db" <db@.discussions.microsoft.com> wrote in message
> news:63CA1294-582D-47BF-9508-65E44EDF74C6@.microsoft.com...
> >
> > SQL Server Enterprise Edition
> > Microsoft Windows NT - 5.2 (3790)
> > Product version 8.00.760 (SP3)
> >
> > 1. I am moving two databases to different location (Both ldf and mdf files
> > because of size) on the same server. Can I automate the process and
> > schedule
> > to run it at midnight. When I try to create a restore task using
> > enterprise
> > manager it does not give me a option to schedule the task.
> >
> > 2. While performing same task(restore), few services on another server
> > (Non
> > sql server) needs to be stopped, once restore is complete needs to be
> > started
> > again. How to automate (start and stop services).
> > --
> > ontario, canada
>
>|||You can. Create a job with a RESTORE Database statement in it...
--
Kevin3NF
SQL Server dude
You want fries with that?
http://kevin3nf.blogspot.com/
I only check the newsgroups during work hours, M-F.
Hit my blog and the contact links if necessary...I may be available.
"db" <db@.discussions.microsoft.com> wrote in message
news:4B5A046B-5A3F-4FB7-8FED-D4319B59DF81@.microsoft.com...
> Can I schedule database restore. I have schedules non sql services to
> stop
> at desired time.
> --
> ontario, canada
>
> "Kevin3NF" wrote:
>> Probably better to detach the database(s), move the files, thn re-attach
>> Check out sp_detach_db and sp_attach_db in Books Online. You can write a
>> few simple T-SQL statements and schedule these as a SQL job for the Agent
>> to
>> run
>> Step 1 - sp_detach...etc.
>> Step 2 - xp_cmdshell 'copy the files...'
>> Step 3 - sp_attach_db
>> --
>> Kevin3NF
>> SQL Server dude
>> You want fries with that?
>> http://kevin3nf.blogspot.com/
>> I only check the newsgroups during work hours, M-F.
>> Hit my blog and the contact links if necessary...I may be available.
>>
>> "db" <db@.discussions.microsoft.com> wrote in message
>> news:63CA1294-582D-47BF-9508-65E44EDF74C6@.microsoft.com...
>> >
>> > SQL Server Enterprise Edition
>> > Microsoft Windows NT - 5.2 (3790)
>> > Product version 8.00.760 (SP3)
>> >
>> > 1. I am moving two databases to different location (Both ldf and mdf
>> > files
>> > because of size) on the same server. Can I automate the process and
>> > schedule
>> > to run it at midnight. When I try to create a restore task using
>> > enterprise
>> > manager it does not give me a option to schedule the task.
>> >
>> > 2. While performing same task(restore), few services on another server
>> > (Non
>> > sql server) needs to be stopped, once restore is complete needs to be
>> > started
>> > again. How to automate (start and stop services).
>> > --
>> > ontario, canada
>>
Restore database...schedule
Microsoft Windows NT - 5.2 (3790)
Product version 8.00.760 (SP3)
1. I am moving two databases to different location (Both ldf and mdf files
because of size) on the same server. Can I automate the process and schedule
to run it at midnight. When I try to create a restore task using enterprise
manager it does not give me a option to schedule the task.
2. While performing same task(restore), few services on another server (Non
sql server) needs to be stopped, once restore is complete needs to be started
again. How to automate (start and stop services).
ontario, canada
Probably better to detach the database(s), move the files, thn re-attach
Check out sp_detach_db and sp_attach_db in Books Online. You can write a
few simple T-SQL statements and schedule these as a SQL job for the Agent to
run
Step 1 - sp_detach...etc.
Step 2 - xp_cmdshell 'copy the files...'
Step 3 - sp_attach_db
Kevin3NF
SQL Server dude
You want fries with that?
http://kevin3nf.blogspot.com/
I only check the newsgroups during work hours, M-F.
Hit my blog and the contact links if necessary...I may be available.
"db" <db@.discussions.microsoft.com> wrote in message
news:63CA1294-582D-47BF-9508-65E44EDF74C6@.microsoft.com...
> SQL Server Enterprise Edition
> Microsoft Windows NT - 5.2 (3790)
> Product version 8.00.760 (SP3)
> 1. I am moving two databases to different location (Both ldf and mdf files
> because of size) on the same server. Can I automate the process and
> schedule
> to run it at midnight. When I try to create a restore task using
> enterprise
> manager it does not give me a option to schedule the task.
> 2. While performing same task(restore), few services on another server
> (Non
> sql server) needs to be stopped, once restore is complete needs to be
> started
> again. How to automate (start and stop services).
> --
> ontario, canada
|||Can I schedule database restore. I have schedules non sql services to stop
at desired time.
ontario, canada
"Kevin3NF" wrote:
> Probably better to detach the database(s), move the files, thn re-attach
> Check out sp_detach_db and sp_attach_db in Books Online. You can write a
> few simple T-SQL statements and schedule these as a SQL job for the Agent to
> run
> Step 1 - sp_detach...etc.
> Step 2 - xp_cmdshell 'copy the files...'
> Step 3 - sp_attach_db
> --
> Kevin3NF
> SQL Server dude
> You want fries with that?
> http://kevin3nf.blogspot.com/
> I only check the newsgroups during work hours, M-F.
> Hit my blog and the contact links if necessary...I may be available.
>
> "db" <db@.discussions.microsoft.com> wrote in message
> news:63CA1294-582D-47BF-9508-65E44EDF74C6@.microsoft.com...
>
>
|||You can. Create a job with a RESTORE Database statement in it...
Kevin3NF
SQL Server dude
You want fries with that?
http://kevin3nf.blogspot.com/
I only check the newsgroups during work hours, M-F.
Hit my blog and the contact links if necessary...I may be available.
"db" <db@.discussions.microsoft.com> wrote in message
news:4B5A046B-5A3F-4FB7-8FED-D4319B59DF81@.microsoft.com...[vbcol=seagreen]
> Can I schedule database restore. I have schedules non sql services to
> stop
> at desired time.
> --
> ontario, canada
>
> "Kevin3NF" wrote:
Friday, March 23, 2012
Restore database from a network drive
I have Windows 2003 server and SQL2005 Oct. CPT running. I have backed up
file .BAK on a network. So in my SQL server, I mapped the folder and try to
restore database from there, I have gotten an error. So i thought might be
the backup file is bad. So I copied my model backedup file to the network
drive and ran FilelistOnly. I got exact same error return,
Msg 3201, Level 16, State 2, Line 1
Cannot open backup device 'q:\model_backup_200601240100.bak'. Operating
system error 3(The system cannot find the path specified.).
Msg 3013, Level 16, State 1, Line 1
RESTORE FILELIST is terminating abnormally.
Has any one seem this error? I don't think I have restored a database from
network drive but I know I can access to the network drive without an issue.
Below is the simple steps what I did on my sql server.
on dos prompt win, net use q: \\myserver\backupfile.bak
q:
dir *.bak
I saw the backup file.
In query windows, 2005 SQL management studio.
restore filelistonly from disk = 'q:\mybackupfile.bak'
Is it not possible to restore it from network drive?
Any input will be appreciated.
Sunny,
Restoring TO and FROM NETWORK drives is possible, but rather than
mapped drives you should use the UNC drives rather than mapped driver
letters. This has many implications, one of them is that you have to
make sure that if e.g. you use the SQL Agent you have to make sure that
the sevrice account has the driver letter mapped in his logon script
(which is a hazzle). So rather use a UNC path with the appropiate
permissions.
HTH, Jens Suessmeyer.
|||Hi Jens
Thanks for the input. I just realized that the SQL server serive is running
as LocalSystem. I thought I changed all SQL services to run as a domain user
ID.
I think that's why. I have to wait until 5 PM and try it if that's the case
or not.
Will post once I find out.
Thanks,
"Jens" wrote:
> Restoring TO and FROM NETWORK drives is possible, but rather than
> mapped drives you should use the UNC drives rather than mapped driver
> letters. This has many implications, one of them is that you have to
> make sure that if e.g. you use the SQL Agent you have to make sure that
> the sevrice account has the driver letter mapped in his logon script
> (which is a hazzle). So rather use a UNC path with the appropiate
> permissions.
> HTH, Jens Suessmeyer.
>
Restore database from a network drive
I have Windows 2003 server and SQL2005 Oct. CPT running. I have backed up
file .BAK on a network. So in my SQL server, I mapped the folder and try to
restore database from there, I have gotten an error. So i thought might be
the backup file is bad. So I copied my model backedup file to the network
drive and ran FilelistOnly. I got exact same error return,
Msg 3201, Level 16, State 2, Line 1
Cannot open backup device 'q:\model_backup_200601240100.bak'. Operating
system error 3(The system cannot find the path specified.).
Msg 3013, Level 16, State 1, Line 1
RESTORE FILELIST is terminating abnormally.
Has any one seem this error? I don't think I have restored a database from
network drive but I know I can access to the network drive without an issue.
Below is the simple steps what I did on my sql server.
on dos prompt win, net use q: \\myserver\backupfile.bak
q:
dir *.bak
I saw the backup file.
In query windows, 2005 SQL management studio.
restore filelistonly from disk = 'q:\mybackupfile.bak'
Is it not possible to restore it from network drive'
Any input will be appreciated.
Sunny,Restoring TO and FROM NETWORK drives is possible, but rather than
mapped drives you should use the UNC drives rather than mapped driver
letters. This has many implications, one of them is that you have to
make sure that if e.g. you use the SQL Agent you have to make sure that
the sevrice account has the driver letter mapped in his logon script
(which is a hazzle). So rather use a UNC path with the appropiate
permissions.
HTH, Jens Suessmeyer.|||Hi Jens
Thanks for the input. I just realized that the SQL server serive is running
as LocalSystem. I thought I changed all SQL services to run as a domain use
r
ID.
I think that's why. I have to wait until 5 PM and try it if that's the case
or not.
Will post once I find out.
Thanks,
"Jens" wrote:
> Restoring TO and FROM NETWORK drives is possible, but rather than
> mapped drives you should use the UNC drives rather than mapped driver
> letters. This has many implications, one of them is that you have to
> make sure that if e.g. you use the SQL Agent you have to make sure that
> the sevrice account has the driver letter mapped in his logon script
> (which is a hazzle). So rather use a UNC path with the appropiate
> permissions.
> HTH, Jens Suessmeyer.
>sql
Restore database from a network drive
I have Windows 2003 server and SQL2005 Oct. CPT running. I have backed up
file .BAK on a network. So in my SQL server, I mapped the folder and try to
restore database from there, I have gotten an error. So i thought might be
the backup file is bad. So I copied my model backedup file to the network
drive and ran FilelistOnly. I got exact same error return,
Msg 3201, Level 16, State 2, Line 1
Cannot open backup device 'q:\model_backup_200601240100.bak'. Operating
system error 3(The system cannot find the path specified.).
Msg 3013, Level 16, State 1, Line 1
RESTORE FILELIST is terminating abnormally.
Has any one seem this error? I don't think I have restored a database from
network drive but I know I can access to the network drive without an issue.
Below is the simple steps what I did on my sql server.
on dos prompt win, net use q: \\myserver\backupfile.bak
q:
dir *.bak
I saw the backup file.
In query windows, 2005 SQL management studio.
restore filelistonly from disk = 'q:\mybackupfile.bak'
Is it not possible to restore it from network drive'
Any input will be appreciated.
Sunny,Restoring TO and FROM NETWORK drives is possible, but rather than
mapped drives you should use the UNC drives rather than mapped driver
letters. This has many implications, one of them is that you have to
make sure that if e.g. you use the SQL Agent you have to make sure that
the sevrice account has the driver letter mapped in his logon script
(which is a hazzle). So rather use a UNC path with the appropiate
permissions.
HTH, Jens Suessmeyer.|||Hi Jens
Thanks for the input. I just realized that the SQL server serive is running
as LocalSystem. I thought I changed all SQL services to run as a domain user
ID.
I think that's why. I have to wait until 5 PM and try it if that's the case
or not.
Will post once I find out.
Thanks,
"Jens" wrote:
> Restoring TO and FROM NETWORK drives is possible, but rather than
> mapped drives you should use the UNC drives rather than mapped driver
> letters. This has many implications, one of them is that you have to
> make sure that if e.g. you use the SQL Agent you have to make sure that
> the sevrice account has the driver letter mapped in his logon script
> (which is a hazzle). So rather use a UNC path with the appropiate
> permissions.
> HTH, Jens Suessmeyer.
>
Wednesday, March 21, 2012
Restore database file with difference name
database to a file and I'll like to copy that file to another SQL 2000
Server and restore it with a difference name. what is the procedures and
how to go about doing it. I did tried to restore but getting the error:
Exclusive access could not be obtained because the database is in use.
Thanks in advance.
Hi,
You have to use RESTORE DATABASE with MOVE option.
Eg:-
Restore database <new_dbname> from disk='c;\backup\dbname.bak'
with move 'logical_data_filename' to 'physical_data_filename',
move 'logical_log_filename' to 'physical_log_filename', stats=10
Thanks
Hari
SQL Server MVP
"toby one" <support@.re.com> wrote in message
news:%23ee8Dq6ZFHA.3488@.tk2msftngp13.phx.gbl...
>I have SQL 2000 SP3 running on Windows Server 2003, I've backup one of the
> database to a file and I'll like to copy that file to another SQL 2000
> Server and restore it with a difference name. what is the procedures and
> how to go about doing it. I did tried to restore but getting the error:
> Exclusive access could not be obtained because the database is in use.
> Thanks in advance.
>
|||Seems like you want to overwrite an existing database with the overwrite
function in "Restore Database", try specifyin another name and perhpas
change the file locations the data will be restored in. If you make a
restore in the EM, the GUI will read the original destination of the data
and log files. If they already exists and error is thrown, if the directory
doesnt exists you have to create it first.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"toby one" <support@.re.com> schrieb im Newsbeitrag
news:%23ee8Dq6ZFHA.3488@.tk2msftngp13.phx.gbl...
>I have SQL 2000 SP3 running on Windows Server 2003, I've backup one of the
> database to a file and I'll like to copy that file to another SQL 2000
> Server and restore it with a difference name. what is the procedures and
> how to go about doing it. I did tried to restore but getting the error:
> Exclusive access could not be obtained because the database is in use.
> Thanks in advance.
>
|||There's nothing special here. Do the backup, copy the backup file and then do the restore,
specifying the desired database name and possibly using the MOVE option to specify the desired
physical filenames. See the BACKUP DATABASE and RESTORE DATABASE commands in Books Online.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"toby one" <support@.re.com> wrote in message news:%23ee8Dq6ZFHA.3488@.tk2msftngp13.phx.gbl...
>I have SQL 2000 SP3 running on Windows Server 2003, I've backup one of the
> database to a file and I'll like to copy that file to another SQL 2000
> Server and restore it with a difference name. what is the procedures and
> how to go about doing it. I did tried to restore but getting the error:
> Exclusive access could not be obtained because the database is in use.
> Thanks in advance.
>
sql
Restore database file with difference name
database to a file and I'll like to copy that file to another SQL 2000
Server and restore it with a difference name. what is the procedures and
how to go about doing it. I did tried to restore but getting the error:
Exclusive access could not be obtained because the database is in use.
Thanks in advance.Hi,
You have to use RESTORE DATABASE with MOVE option.
Eg:-
Restore database <new_dbname> from disk='c;\backup\dbname.bak'
with move 'logical_data_filename' to 'physical_data_filename',
move 'logical_log_filename' to 'physical_log_filename', stats=10
Thanks
Hari
SQL Server MVP
"toby one" <support@.re.com> wrote in message
news:%23ee8Dq6ZFHA.3488@.tk2msftngp13.phx.gbl...
>I have SQL 2000 SP3 running on Windows Server 2003, I've backup one of the
> database to a file and I'll like to copy that file to another SQL 2000
> Server and restore it with a difference name. what is the procedures and
> how to go about doing it. I did tried to restore but getting the error:
> Exclusive access could not be obtained because the database is in use.
> Thanks in advance.
>|||Seems like you want to overwrite an existing database with the overwrite
function in "Restore Database", try specifyin another name and perhpas
change the file locations the data will be restored in. If you make a
restore in the EM, the GUI will read the original destination of the data
and log files. If they already exists and error is thrown, if the directory
doesn´t exists you have to create it first.
--
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"toby one" <support@.re.com> schrieb im Newsbeitrag
news:%23ee8Dq6ZFHA.3488@.tk2msftngp13.phx.gbl...
>I have SQL 2000 SP3 running on Windows Server 2003, I've backup one of the
> database to a file and I'll like to copy that file to another SQL 2000
> Server and restore it with a difference name. what is the procedures and
> how to go about doing it. I did tried to restore but getting the error:
> Exclusive access could not be obtained because the database is in use.
> Thanks in advance.
>|||There's nothing special here. Do the backup, copy the backup file and then do the restore,
specifying the desired database name and possibly using the MOVE option to specify the desired
physical filenames. See the BACKUP DATABASE and RESTORE DATABASE commands in Books Online.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"toby one" <support@.re.com> wrote in message news:%23ee8Dq6ZFHA.3488@.tk2msftngp13.phx.gbl...
>I have SQL 2000 SP3 running on Windows Server 2003, I've backup one of the
> database to a file and I'll like to copy that file to another SQL 2000
> Server and restore it with a difference name. what is the procedures and
> how to go about doing it. I did tried to restore but getting the error:
> Exclusive access could not be obtained because the database is in use.
> Thanks in advance.
>
Restore database file with difference name
database to a file and I'll like to copy that file to another SQL 2000
Server and restore it with a difference name. what is the procedures and
how to go about doing it. I did tried to restore but getting the error:
Exclusive access could not be obtained because the database is in use.
Thanks in advance.Hi,
You have to use RESTORE DATABASE with MOVE option.
Eg:-
Restore database <new_dbname> from disk='c;\backup\dbname.bak'
with move 'logical_data_filename' to 'physical_data_filename',
move 'logical_log_filename' to 'physical_log_filename', stats=10
Thanks
Hari
SQL Server MVP
"toby one" <support@.re.com> wrote in message
news:%23ee8Dq6ZFHA.3488@.tk2msftngp13.phx.gbl...
>I have SQL 2000 SP3 running on Windows Server 2003, I've backup one of the
> database to a file and I'll like to copy that file to another SQL 2000
> Server and restore it with a difference name. what is the procedures and
> how to go about doing it. I did tried to restore but getting the error:
> Exclusive access could not be obtained because the database is in use.
> Thanks in advance.
>|||Seems like you want to overwrite an existing database with the overwrite
function in "Restore Database", try specifyin another name and perhpas
change the file locations the data will be restored in. If you make a
restore in the EM, the GUI will read the original destination of the data
and log files. If they already exists and error is thrown, if the directory
doesnt exists you have to create it first.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"toby one" <support@.re.com> schrieb im Newsbeitrag
news:%23ee8Dq6ZFHA.3488@.tk2msftngp13.phx.gbl...
>I have SQL 2000 SP3 running on Windows Server 2003, I've backup one of the
> database to a file and I'll like to copy that file to another SQL 2000
> Server and restore it with a difference name. what is the procedures and
> how to go about doing it. I did tried to restore but getting the error:
> Exclusive access could not be obtained because the database is in use.
> Thanks in advance.
>|||There's nothing special here. Do the backup, copy the backup file and then d
o the restore,
specifying the desired database name and possibly using the MOVE option to s
pecify the desired
physical filenames. See the BACKUP DATABASE and RESTORE DATABASE commands in
Books Online.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"toby one" <support@.re.com> wrote in message news:%23ee8Dq6ZFHA.3488@.tk2msftngp13.phx.gbl...
>I have SQL 2000 SP3 running on Windows Server 2003, I've backup one of the
> database to a file and I'll like to copy that file to another SQL 2000
> Server and restore it with a difference name. what is the procedures and
> how to go about doing it. I did tried to restore but getting the error:
> Exclusive access could not be obtained because the database is in use.
> Thanks in advance.
>
Restore Database Dialog Shows Old Backup File Location
moved our database backups from the D:\ drive to the E:\ drive. In
the process, we dropped all of our old backup devices and created new
ones pointing to the new drive. The backups have been running
successfully for several weeks now; sending data to the new location.
The other day I needed to restore a database. While reviewing the
restore database dialog information, I noticed that the old path
(D:\)appeared under "Restore from" column. The other information;
type, backup set date and size are correct and apply to the backup
file on the E:\ drive. I attempted the restore and naturally received
an error.
I've checked sysdevices and found it has the correct location for the
backup files.
Any ideas why this could be and any suggestions on how to fix it?
Thanks!
Michael Brule
Database Administrator
The Phoenix CompaniesThe first 3 links should be relevant but the rest may also be of interest:
http://www.support.microsoft.com/?id=314546 Moving DB's between Servers
http://www.support.microsoft.com/?id=224071 Moving SQL Server Databases
to a New Location with Detach/Attach
http://support.microsoft.com/?id=221465 Using WITH MOVE in a
Restore
http://www.support.microsoft.com/?id=246133 How To Transfer Logins and
Passwords Between SQL Servers
http://www.support.microsoft.com/?id=298897 Mapping Logins & SIDs after a
Restore
http://www.dbmaint.com/SyncSqlLogins.asp Utility to map logins to
users
http://www.support.microsoft.com/?id=168001 User Logon and/or Permission
Errors After Restoring Dump
http://www.support.microsoft.com/?id=240872 How to Resolve Permission
Issues When a Database Is Moved Between SQL Servers
http://www.sqlservercentral.com/scripts/scriptdetails.asp?scriptid=599
Restoring a .mdf
http://www.support.microsoft.com/?id=307775 Disaster Recovery Articles
for SQL Server
Andrew J. Kelly
SQL Server MVP
"michael brule" <michael.brule@.phoenixwm.com> wrote in message
news:55f7800f.0402181409.25c474c4@.posting.google.com...
> We're running SQL 7.0 (SP4,MS03-031) on Windows 2000. We recently
> moved our database backups from the D:\ drive to the E:\ drive. In
> the process, we dropped all of our old backup devices and created new
> ones pointing to the new drive. The backups have been running
> successfully for several weeks now; sending data to the new location.
> The other day I needed to restore a database. While reviewing the
> restore database dialog information, I noticed that the old path
> (D:\)appeared under "Restore from" column. The other information;
> type, backup set date and size are correct and apply to the backup
> file on the E:\ drive. I attempted the restore and naturally received
> an error.
> I've checked sysdevices and found it has the correct location for the
> backup files.
> Any ideas why this could be and any suggestions on how to fix it?
> Thanks!
> Michael Brule
> Database Administrator
> The Phoenix Companies|||I had the same problem before.
You can restore the database from the restore diaglog
panel by choosing "From device" rather than "database".
Fix the problem permanently is to delete the old backup
files on D:\ drive, the restore diaglog panel should show
correctly after the backup run on E:\ drive.|||Thanks for the replies, Andrew and Johnny!
Andrew: The information you provided seemed to concern issues
surrounding moving a database to a new location My question was about
moving database backup files. The databases remain in their original
location.
Johnny: Actually, we moved the backup directory to the new location.
Neither that directory nor any of its files remains in the original
location. Numerous backups have been run since.
Thanks!
Michael Brule
Database Administrator
The Phoenix Companies|||Some of the links refer to methods that can be used to move to a new server
or just a new location. You can either use RESTORE with the MOVE option or
sp_attach_db. Both are covered in there as well as BooksOnLine.
--
Andrew J. Kelly
SQL Server MVP
"michael brule" <michael.brule@.phoenixwm.com> wrote in message
news:55f7800f.0402190654.660f72e5@.posting.google.com...
> Thanks for the replies, Andrew and Johnny!
> Andrew: The information you provided seemed to concern issues
> surrounding moving a database to a new location My question was about
> moving database backup files. The databases remain in their original
> location.
> Johnny: Actually, we moved the backup directory to the new location.
> Neither that directory nor any of its files remains in the original
> location. Numerous backups have been run since.
> Thanks!
> Michael Brule
> Database Administrator
> The Phoenix Companies|||Sorry.
The files in the new location ie E:\ have to be deleted as
well.
Overwritten the existing backup files still showed the old
backup directory path in the restore panel. If you don't
want to delete all the backup files in one go, you may
delete the oldest backup files until all are recycled.
Monday, March 12, 2012
Restore Completes (Loading)
Windows 2000 Advanced Server. There is only one
development database on this server.
When I restore a backup from this database onto another
server in a similiar environment the restore completes.
But database icon status, states that it is loading. I
refresh the databases (PF5) but it does not change.
Next, I run the restore database with recovery and the
restore completes.
Please help me resolve this issue.
Mike
RESTORE DATABASE DATABASE_NAME
from disk = WITH RECOVERYAre you sure that the environment is the same, or that there are no pending
transactions? According to BOL, the WITH RECOVERY option IS the default
option, and should only be required when a database upgrade is required.
Steve
RECOVERY
Instructs the restore operation to roll back any uncommitted transactions.
After the recovery process, the database is ready for use.
If subsequent RESTORE operations (RESTORE LOG, or RESTORE DATABASE from
differential) are planned, NORECOVERY or STANDBY should be specified
instead.
If neither NORECOVERY, RECOVERY, or STANDBY is specified, RECOVERY is the
default. When restoring backup sets from an earlier version of SQL Server, a
database upgrade may be required. This upgrade is performed automatically
when WITH RECOVERY is specified. For more information, see Transaction Log
Backups .
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:1deb101c4548a$985d2e00$a401280a@.phx.gbl...
> I have SQL Server 2000 Enterprise Edition with SP3A on my
> Windows 2000 Advanced Server. There is only one
> development database on this server.
> When I restore a backup from this database onto another
> server in a similiar environment the restore completes.
> But database icon status, states that it is loading. I
> refresh the databases (PF5) but it does not change.
> Next, I run the restore database with recovery and the
> restore completes.
> Please help me resolve this issue.
> Mike
>
> RESTORE DATABASE DATABASE_NAME
> from disk => WITH RECOVERY
>|||HI,
It seems you have clicked the option "Non operational, need to load more
transaction logs" in enterprise manager while loading. Execute the below
command from query analyzer to recover the database:-
RESTORE DATABASE <dbname> with RECOVERY
Thanks
Hari
MCDBA
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:1deb101c4548a$985d2e00$a401280a@.phx.gbl...
> I have SQL Server 2000 Enterprise Edition with SP3A on my
> Windows 2000 Advanced Server. There is only one
> development database on this server.
> When I restore a backup from this database onto another
> server in a similiar environment the restore completes.
> But database icon status, states that it is loading. I
> refresh the databases (PF5) but it does not change.
> Next, I run the restore database with recovery and the
> restore completes.
> Please help me resolve this issue.
> Mike
>
> RESTORE DATABASE DATABASE_NAME
> from disk => WITH RECOVERY
>
Friday, March 9, 2012
Restore and update problem on Windows
I have restored a database from a BAK file and tried to run a update query.
While executing the query , i got this error.
Server: Msg 208, Level 16, State 1, Procedure ctsv_992F1918D5FC11D4968C0090271F4533, Line 2
Invalid object name 'MSmerge_contents'.
What can be the possible reasons for the error?
Suggest the solutions if any.Which version of sql server are you using ? Are you using merge replication ?|||Hi,
I am using the MS SQL Server 2000.
About merge replication, i am not aware of this as i am a new user. More over we are restoring the backup that we have, from the restored database we can see all this views and procedures which are used for merge replication.
How can we check that we are using merge replication?
Regards,|||Look under enterprise manager - go to the replication folder - look at publications or subscriptions and you should see entries.|||Are you restoring onto the same sql server instance ? Are you only restoring a particular database ?|||Hi,
There are no entries in the Publications and Subscriptions folder.
We are restoring a particular backup that we got from our client.|||Are you saying then that this is not a backup of the current machine you are working with - it was a backup of another sql server machine ? Or are you restoring on the clients machine ?|||Hi,
Yes , you guessed that correctly.
It's a backup from some other machine (client's db backup) and we are restoring it on our machine for fixing few things.
This original database is not with us and we do not have details of his machine either. We only have the .BAK file.|||Without that information, you are running in the fog. My only recommendation is to try and run sp_mergecleanupmetadata - make sure you read the bol about this stored procedure. The only problem is that you have no replication so this stored procedure may be of no use. Let me know if you have any success with this.
When you say you are fixing a few things - will these fixes go back to the client ?
Restore All System Databases
Hi All,
I need to do a restore of all my system databases, master, msdb and model, and of course my production database.
The Windows 2003 OS and Sql Server 2005 have both been reinstalled on the server.
I understand I need to be in Single User Mode to restore the master database and I just wanted to clarify the procedure for a successful restore.
I've found this page: http://msdn2.microsoft.com/en-us/library/ms190679.aspx which has instructions for restoring a master database.
So, all I have to do is:
1. Be in single user mode
2. Using SQLCMD run:
C:\> sqlcmd
1> RESTORE DATABASE master FROM DISK = 'Z:\MyBackLocation\master.bak';
2> GO
From the instructions:
"After master is restored, the instance of SQL Server shuts down and terminates the sqlcmd process"
My Questions:
When I've restored the master do I repeat the steps above to restore the msdb and model databases?
Are there any other pitfalls?
Thanks for any advice
Melt
Saturday, February 25, 2012
Restore 8-CPU master to 4-CPU server. What will happen?
Restore 8-CPU master to 4-CPU server. What will happen? Can this be done at
all?
(MS SQL Server 2000 SP3 to SQL Server 2000 SP3 , Windows Server 2003 SP1 to
Windows Server 2000 SP4).
-- Many thanks, Oskar.Number of processors doesn't matter. (though I'm not sure about the exact
behavior if you have set processor affinity, never tried it).
Linchi
"Oskar" wrote:
> Hi,
> Restore 8-CPU master to 4-CPU server. What will happen? Can this be done a
t
> all?
> (MS SQL Server 2000 SP3 to SQL Server 2000 SP3 , Windows Server 2003 SP1 t
o
> Windows Server 2000 SP4).
> -- Many thanks, Oskar.
>
Restore 8-CPU master to 4-CPU server. What will happen?
Restore 8-CPU master to 4-CPU server. What will happen? Can this be done at
all?
(MS SQL Server 2000 SP3 to SQL Server 2000 SP3 , Windows Server 2003 SP1 to
Windows Server 2000 SP4).
-- Many thanks, Oskar.
Number of processors doesn't matter. (though I'm not sure about the exact
behavior if you have set processor affinity, never tried it).
Linchi
"Oskar" wrote:
> Hi,
> Restore 8-CPU master to 4-CPU server. What will happen? Can this be done at
> all?
> (MS SQL Server 2000 SP3 to SQL Server 2000 SP3 , Windows Server 2003 SP1 to
> Windows Server 2000 SP4).
> -- Many thanks, Oskar.
>