显示标签为“restore”的博文。显示所有博文
显示标签为“restore”的博文。显示所有博文

2012年3月19日星期一

Disconnect/Clear connections

I have a scheduled job where I'm attempting to restore a full backup of our
Production database, over our Test/Dev database.
However, it keeps failing.
When I try to run the Restore Database command manually, I get an error that
states "Exclusive access could not be obtained".
Right now, the only way I know how to clear the connections is to go into
the Detach Database task, and select 'Clear all connections'.
I tried using the 'Exec SQL Disconnect ALL' command, but that statement
won't parse.
Is there another way to clear all database connections? Preferebly in
Trasact-SQL language, that I could schedule to run immediately prior to the
Restore Database command?
Please advise.
Thanks!
YsandreYsandre wrote:
> I have a scheduled job where I'm attempting to restore a full backup of our
> Production database, over our Test/Dev database.
> However, it keeps failing.
> When I try to run the Restore Database command manually, I get an error that
> states "Exclusive access could not be obtained".
> Right now, the only way I know how to clear the connections is to go into
> the Detach Database task, and select 'Clear all connections'.
> I tried using the 'Exec SQL Disconnect ALL' command, but that statement
> won't parse.
> Is there another way to clear all database connections? Preferebly in
> Trasact-SQL language, that I could schedule to run immediately prior to the
> Restore Database command?
> Please advise.
> Thanks!
> Ysandre
Read up on the ALTER DATABASE command
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||I did, but I don't see anything in there regarding clearing connections to
the database.
Is there somewhere else I should look?
All I'm looking for is something along the lines of:
EXEC SQL DISCONNECT ALL
Or why the above doesn't parse.
Thanks!
Ysandre
"Tracy McKibben" wrote:
> Ysandre wrote:
> > I have a scheduled job where I'm attempting to restore a full backup of our
> > Production database, over our Test/Dev database.
> > However, it keeps failing.
> > When I try to run the Restore Database command manually, I get an error that
> > states "Exclusive access could not be obtained".
> > Right now, the only way I know how to clear the connections is to go into
> > the Detach Database task, and select 'Clear all connections'.
> > I tried using the 'Exec SQL Disconnect ALL' command, but that statement
> > won't parse.
> > Is there another way to clear all database connections? Preferebly in
> > Trasact-SQL language, that I could schedule to run immediately prior to the
> > Restore Database command?
> > Please advise.
> > Thanks!
> > Ysandre
> Read up on the ALTER DATABASE command
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||In short: When you go to Detach/Clear in the EMC to disconnect all the
users it is going to do a couple things.
First - It searches through the sysprocesses for the DB you want to
clear and finds the spid's
Then - set noexec off set parseonly off
Lastly - kill spid#
Hope this helps.
Cheers,
Ysandre wrote:
> I did, but I don't see anything in there regarding clearing connections to
> the database.
> Is there somewhere else I should look?
> All I'm looking for is something along the lines of:
> EXEC SQL DISCONNECT ALL
> Or why the above doesn't parse.
> Thanks!
> Ysandre
> "Tracy McKibben" wrote:
> > Ysandre wrote:
> > > I have a scheduled job where I'm attempting to restore a full backup of our
> > > Production database, over our Test/Dev database.
> > > However, it keeps failing.
> > > When I try to run the Restore Database command manually, I get an error that
> > > states "Exclusive access could not be obtained".
> > > Right now, the only way I know how to clear the connections is to go into
> > > the Detach Database task, and select 'Clear all connections'.
> > > I tried using the 'Exec SQL Disconnect ALL' command, but that statement
> > > won't parse.
> > > Is there another way to clear all database connections? Preferebly in
> > > Trasact-SQL language, that I could schedule to run immediately prior to the
> > > Restore Database command?
> > > Please advise.
> > > Thanks!
> > > Ysandre
> >
> > Read up on the ALTER DATABASE command
> >
> >
> > --
> > Tracy McKibben
> > MCDBA
> > http://www.realsqlguy.com
> >|||You could try something like this. Replace the DBID with the database
you are backing up:
DECLARE SpidsToKill CURSOR FOR
SELECT spid
FROM master..sysprocesses
WHERE dbid = 9
DECLARE @.Spid int
DECLARE @.SQL varchar(255)
OPEN SpidsToKill
FETCH NEXT FROM SpidsToKill
INTO @.Spid
WHILE ( @.@.FETCH_STATUS = 0 )
BEGIN
SELECT @.SQL = 'KILL ' + CONVERT( varchar(10), @.Spid )
EXEC ( @.SQL )
FETCH NEXT FROM SpidsToKill
INTO @.Spid
END
CLOSE SpidsToKill
DEALLOCATE SpidsToKill|||Ysandre wrote:
> I did, but I don't see anything in there regarding clearing connections to
> the database.
You want to use ALTER DATABASE to put the database in SINGLE_USER mode,
WITH immediate ROLLBACK of transactions...
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||That worked.
THANK YOU!!!
"10001110101" wrote:
> You could try something like this. Replace the DBID with the database
> you are backing up:
> DECLARE SpidsToKill CURSOR FOR
> SELECT spid
> FROM master..sysprocesses
> WHERE dbid = 9
> DECLARE @.Spid int
> DECLARE @.SQL varchar(255)
> OPEN SpidsToKill
> FETCH NEXT FROM SpidsToKill
> INTO @.Spid
> WHILE ( @.@.FETCH_STATUS = 0 )
> BEGIN
> SELECT @.SQL = 'KILL ' + CONVERT( varchar(10), @.Spid )
> EXEC ( @.SQL )
> FETCH NEXT FROM SpidsToKill
> INTO @.Spid
> END
> CLOSE SpidsToKill
> DEALLOCATE SpidsToKill
>|||Ysandre wrote:
> That worked.
> THANK YOU!!!
>
Ugh, it's too painful to watch... Drop that cursor nonsense, you can
accomplish this with ONE STATEMENT. Since you can't read documentation
and piece together the command yourself, here it is:
ALTER DATABASE DBName SET SINGLE_USER WITH ROLLBACK IMMEDIATE
That will put the database in single-user mode, allowing one connection
only, and will gracefully rollback any outstanding transactions.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||This is a multi-part message in MIME format.
--=_NextPart_000_141C_01C6AF0A.34C3D1A0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable
The problem with the script above to 'kill' sessions, is that a session =may immediately reconnect.
The BEST solution, is as Tracy advised. Use
ALTER DATABASE MyDatabase
SET SINGLE_USER WTIH ROLLBACK IMMEDIATE
-- Arnie Rowland
Most good judgment comes from experience. Most experience comes from bad judgment. - Anonymous
"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message =news:%23EmybC0rGHA.1592@.TK2MSFTNGP02.phx.gbl...
> Ysandre wrote:
>> I did, but I don't see anything in there regarding clearing =connections to >> the database.
> > You want to use ALTER DATABASE to put the database in SINGLE_USER =mode, > WITH immediate ROLLBACK of transactions...
> > > -- > Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
--=_NextPart_000_141C_01C6AF0A.34C3D1A0
Content-Type: text/html;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable
=EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

The problem with the script above to ='kill' sessions, is that a session may immediately reconnect.
The BEST solution, is as Tracy advised. =Use
ALTER DATABASE =MyDatabase
SET SINGLE_USER =WTIH ROLLBACK IMMEDIATE
-- Arnie RowlandMost good =judgment comes from experience. Most experience comes from bad judgment. =- Anonymous
"Tracy McKibben" =wrote in message news:%23EmybC0rGHA.1592@.TK2MSFTNGP02.phx.gbl...> =Ysandre wrote:> I did, but I don't see anything in there regarding =clearing connections to > the database.> > You want to =use ALTER DATABASE to put the database in SINGLE_USER mode, > WITH =immediate ROLLBACK of transactions...> > > -- > Tracy McKibben> MCDBA>">http://www.realsqlguy.com</FONT></A></BODY></HTML>
--=_NextPart_000_141C_01C6AF0A.34C3D1A0--

Disconnect/Clear connections

I have a scheduled job where I'm attempting to restore a full backup of our
Production database, over our Test/Dev database.
However, it keeps failing.
When I try to run the Restore Database command manually, I get an error that
states "Exclusive access could not be obtained".
Right now, the only way I know how to clear the connections is to go into
the Detach Database task, and select 'Clear all connections'.
I tried using the 'Exec SQL Disconnect ALL' command, but that statement
won't parse.
Is there another way to clear all database connections? Preferebly in
Trasact-SQL language, that I could schedule to run immediately prior to the
Restore Database command?
Please advise.
Thanks!
YsandreYsandre wrote:
> I have a scheduled job where I'm attempting to restore a full backup of ou
r
> Production database, over our Test/Dev database.
> However, it keeps failing.
> When I try to run the Restore Database command manually, I get an error th
at
> states "Exclusive access could not be obtained".
> Right now, the only way I know how to clear the connections is to go into
> the Detach Database task, and select 'Clear all connections'.
> I tried using the 'Exec SQL Disconnect ALL' command, but that statement
> won't parse.
> Is there another way to clear all database connections? Preferebly in
> Trasact-SQL language, that I could schedule to run immediately prior to th
e
> Restore Database command?
> Please advise.
> Thanks!
> Ysandre
Read up on the ALTER DATABASE command
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||I did, but I don't see anything in there regarding clearing connections to
the database.
Is there somewhere else I should look?
All I'm looking for is something along the lines of:
EXEC SQL DISCONNECT ALL
Or why the above doesn't parse.
Thanks!
Ysandre
"Tracy McKibben" wrote:

> Ysandre wrote:
> Read up on the ALTER DATABASE command
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||In short: When you go to Detach/Clear in the EMC to disconnect all the
users it is going to do a couple things.
First - It searches through the sysprocesses for the DB you want to
clear and finds the spid's
Then - set noexec off set parseonly off
Lastly - kill spid#
Hope this helps.
Cheers,
Ysandre wrote:[vbcol=seagreen]
> I did, but I don't see anything in there regarding clearing connections to
> the database.
> Is there somewhere else I should look?
> All I'm looking for is something along the lines of:
> EXEC SQL DISCONNECT ALL
> Or why the above doesn't parse.
> Thanks!
> Ysandre
> "Tracy McKibben" wrote:
>|||You could try something like this. Replace the DBID with the database
you are backing up:
DECLARE SpidsToKill CURSOR FOR
SELECT spid
FROM master..sysprocesses
WHERE dbid = 9
DECLARE @.Spid int
DECLARE @.SQL varchar(255)
OPEN SpidsToKill
FETCH NEXT FROM SpidsToKill
INTO @.Spid
WHILE ( @.@.FETCH_STATUS = 0 )
BEGIN
SELECT @.SQL = 'KILL ' + CONVERT( varchar(10), @.Spid )
EXEC ( @.SQL )
FETCH NEXT FROM SpidsToKill
INTO @.Spid
END
CLOSE SpidsToKill
DEALLOCATE SpidsToKill|||Ysandre wrote:
> I did, but I don't see anything in there regarding clearing connections to
> the database.
You want to use ALTER DATABASE to put the database in SINGLE_USER mode,
WITH immediate ROLLBACK of transactions...
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||That worked.
THANK YOU!!!
"10001110101" wrote:

> You could try something like this. Replace the DBID with the database
> you are backing up:
> DECLARE SpidsToKill CURSOR FOR
> SELECT spid
> FROM master..sysprocesses
> WHERE dbid = 9
> DECLARE @.Spid int
> DECLARE @.SQL varchar(255)
> OPEN SpidsToKill
> FETCH NEXT FROM SpidsToKill
> INTO @.Spid
> WHILE ( @.@.FETCH_STATUS = 0 )
> BEGIN
> SELECT @.SQL = 'KILL ' + CONVERT( varchar(10), @.Spid )
> EXEC ( @.SQL )
> FETCH NEXT FROM SpidsToKill
> INTO @.Spid
> END
> CLOSE SpidsToKill
> DEALLOCATE SpidsToKill
>|||Ysandre wrote:
> That worked.
> THANK YOU!!!
>
Ugh, it's too painful to watch... Drop that cursor nonsense, you can
accomplish this with ONE STATEMENT. Since you can't read documentation
and piece together the command yourself, here it is:
ALTER DATABASE DBName SET SINGLE_USER WITH ROLLBACK IMMEDIATE
That will put the database in single-user mode, allowing one connection
only, and will gracefully rollback any outstanding transactions.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||The problem with the script above to 'kill' sessions, is that a session may
immediately reconnect.
The BEST solution, is as Tracy advised. Use
ALTER DATABASE MyDatabase
SET SINGLE_USER WTIH ROLLBACK IMMEDIATE
--
Arnie Rowland
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message news:%23EmybC0rGHA.1592@.TK2MSFTNGP0
2.phx.gbl...
> Ysandre wrote:
>
> You want to use ALTER DATABASE to put the database in SINGLE_USER mode,
> WITH immediate ROLLBACK of transactions...
>
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com

disconnect in an emergency

Hi,
In the event of an emergency restore in SQL 2000, I used to right
click on a database, choose detach and then the "clear" button to
disconnect all users. I didn't actually detach the database, this just
was my sneak out to disconnect so I could run my restore scripts for
the db backups and the logs. I do have a script that I can run that
loops through the SP_WHO results and kills all the spids, but that
takes time and I don't want to have to build that into my restore
scripts.
Does anyone know of a quick way in SSMS where I can detach users from
a database? There are so many more options, I am wondering if I am
just missing where to click?
Thanks all you gurus out there.
KristinaAlter Database Foo set offline with rollback immediate
Go
alter database foo set online
Go
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Kristina" <KristinaDBA@.gmail.com> wrote in message
news:1181324410.567760.132940@.k79g2000hse.googlegroups.com...
> Hi,
> In the event of an emergency restore in SQL 2000, I used to right
> click on a database, choose detach and then the "clear" button to
> disconnect all users. I didn't actually detach the database, this just
> was my sneak out to disconnect so I could run my restore scripts for
> the db backups and the logs. I do have a script that I can run that
> loops through the SP_WHO results and kills all the spids, but that
> takes time and I don't want to have to build that into my restore
> scripts.
> Does anyone know of a quick way in SSMS where I can detach users from
> a database? There are so many more options, I am wondering if I am
> just missing where to click?
> Thanks all you gurus out there.
> Kristina
>|||On Jun 8, 1:48 pm, "Geoff N. Hiten" <SQLCrafts...@.gmail.com> wrote:
> Alter Database Foo set offline with rollback immediate
> Go
> alter database foo set online
> Go
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
> "Kristina" <Kristina...@.gmail.com> wrote in message
> news:1181324410.567760.132940@.k79g2000hse.googlegroups.com...
>
> > Hi,
> > In the event of an emergency restore in SQL 2000, I used to right
> > click on a database, choose detach and then the "clear" button to
> > disconnect all users. I didn't actually detach the database, this just
> > was my sneak out to disconnect so I could run my restore scripts for
> > the db backups and the logs. I do have a script that I can run that
> > loops through the SP_WHO results and kills all the spids, but that
> > takes time and I don't want to have to build that into my restore
> > scripts.
> > Does anyone know of a quick way in SSMS where I can detach users from
> > a database? There are so many more options, I am wondering if I am
> > just missing where to click?
> > Thanks all you gurus out there.
> > Kristina- Hide quoted text -
> - Show quoted text -
THANKS! I actually did this, but omitted the rollback immediate.
perfect! :)

disconnect in an emergency

Hi,
In the event of an emergency restore in SQL 2000, I used to right
click on a database, choose detach and then the "clear" button to
disconnect all users. I didn't actually detach the database, this just
was my sneak out to disconnect so I could run my restore scripts for
the db backups and the logs. I do have a script that I can run that
loops through the SP_WHO results and kills all the spids, but that
takes time and I don't want to have to build that into my restore
scripts.
Does anyone know of a quick way in SSMS where I can detach users from
a database? There are so many more options, I am wondering if I am
just missing where to click?
Thanks all you gurus out there.
KristinaAlter Database Foo set offline with rollback immediate
Go
alter database foo set online
Go
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Kristina" <KristinaDBA@.gmail.com> wrote in message
news:1181324410.567760.132940@.k79g2000hse.googlegroups.com...
> Hi,
> In the event of an emergency restore in SQL 2000, I used to right
> click on a database, choose detach and then the "clear" button to
> disconnect all users. I didn't actually detach the database, this just
> was my sneak out to disconnect so I could run my restore scripts for
> the db backups and the logs. I do have a script that I can run that
> loops through the SP_WHO results and kills all the spids, but that
> takes time and I don't want to have to build that into my restore
> scripts.
> Does anyone know of a quick way in SSMS where I can detach users from
> a database? There are so many more options, I am wondering if I am
> just missing where to click?
> Thanks all you gurus out there.
> Kristina
>|||On Jun 8, 1:48 pm, "Geoff N. Hiten" <SQLCrafts...@.gmail.com> wrote:
> Alter Database Foo set offline with rollback immediate
> Go
> alter database foo set online
> Go
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
> "Kristina" <Kristina...@.gmail.com> wrote in message
> news:1181324410.567760.132940@.k79g2000hse.googlegroups.com...
>
>
>
>
>
>
> - Show quoted text -
THANKS! I actually did this, but omitted the rollback immediate.
perfect!

disconnect in an emergency

Hi,
In the event of an emergency restore in SQL 2000, I used to right
click on a database, choose detach and then the "clear" button to
disconnect all users. I didn't actually detach the database, this just
was my sneak out to disconnect so I could run my restore scripts for
the db backups and the logs. I do have a script that I can run that
loops through the SP_WHO results and kills all the spids, but that
takes time and I don't want to have to build that into my restore
scripts.
Does anyone know of a quick way in SSMS where I can detach users from
a database? There are so many more options, I am wondering if I am
just missing where to click?
Thanks all you gurus out there.
Kristina
Alter Database Foo set offline with rollback immediate
Go
alter database foo set online
Go
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Kristina" <KristinaDBA@.gmail.com> wrote in message
news:1181324410.567760.132940@.k79g2000hse.googlegr oups.com...
> Hi,
> In the event of an emergency restore in SQL 2000, I used to right
> click on a database, choose detach and then the "clear" button to
> disconnect all users. I didn't actually detach the database, this just
> was my sneak out to disconnect so I could run my restore scripts for
> the db backups and the logs. I do have a script that I can run that
> loops through the SP_WHO results and kills all the spids, but that
> takes time and I don't want to have to build that into my restore
> scripts.
> Does anyone know of a quick way in SSMS where I can detach users from
> a database? There are so many more options, I am wondering if I am
> just missing where to click?
> Thanks all you gurus out there.
> Kristina
>
|||On Jun 8, 1:48 pm, "Geoff N. Hiten" <SQLCrafts...@.gmail.com> wrote:
> Alter Database Foo set offline with rollback immediate
> Go
> alter database foo set online
> Go
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
> "Kristina" <Kristina...@.gmail.com> wrote in message
> news:1181324410.567760.132940@.k79g2000hse.googlegr oups.com...
>
>
>
>
> - Show quoted text -
THANKS! I actually did this, but omitted the rollback immediate.
perfect!

2012年3月11日星期日

Disaster Recovery Process - Cannot restore Master

Hello All,

I have a production SQL 2005 sp1 server running on Windows 2003. The SQL server was upgraded from SQL 2000.

In SQL 2000 our disaster recovery plan consisted of making daily backups of all system databases and user databases.

If we did have a system failure, we would copy those databases to a different physical server, Open SQL in single user mode and restore master.We would then restart the SQL service in normal mode and continue restoring the system databases then the user databases.

Now with SQL 2005, I am testing this process by attempting to restore all of the databases into our rebuild DEV server.I have SQL 2005 installed and patched to the same level as the production SQL server (9.0.2047).I can start SQL 2005 in single user mode, open SQL Server Management Studio, browse to master, right click master, click tasks ->restore ->Database.I choose “From Device” and add the BAK file from last nights backups.I select Master as the restore to database, put a check in the backup set to restore and press ok.Below is the error that I am getting:

“Restore failed for Server ‘SERVERNAME’ – System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing 'master' database. (Microsoft.SqlServer.Smo)

Do I have a real error, or am I going about the process incorrectly for SQL 2005?

Here is the SQL Script that my actions are producing:

RESTORE DATABASE [master] FROMDISK = N'D:\ProductionSQLBackupforDEV\ \MSSQL\BACKUP\master\master_backup_200605110020.bak' WITHFILE = 1,NOUNLOAD,STATS = 10

GO

Also, all of our databases, system and user, are stored in a different directory than c:\program files\mssql……We have moved them to D:\directory.

If I need to re evaluate our “Backup” Procedures to be able to perform these actions please let me know.

Thank you for any assistance you can provide.

Keith

Does anyone have any ideas on this problem?

Can the master database from SQL2005 on server1 be restored to SQL2005 on server2?

If so, how do you do it?

If not, how do you recover from a disaster where you are forced to restore from backups?


Thank you,

Keith

|||

Did you try the WITH REPLACE option?

That should work.

|||

Thank you,

That was exactly what I was looking for.

Keith

Disaster Recovery Process - Cannot restore Master

Hello All,

I have a production SQL 2005 sp1 server running on Windows 2003. The SQL server was upgraded from SQL 2000.

In SQL 2000 our disaster recovery plan consisted of making daily backups of all system databases and user databases.

If we did have a system failure, we would copy those databases to a different physical server, Open SQL in single user mode and restore master.We would then restart the SQL service in normal mode and continue restoring the system databases then the user databases.

Now with SQL 2005, I am testing this process by attempting to restore all of the databases into our rebuild DEV server.I have SQL 2005 installed and patched to the same level as the production SQL server (9.0.2047).I can start SQL 2005 in single user mode, open SQL Server Management Studio, browse to master, right click master, click tasks ->restore ->Database.I choose “From Device” and add the BAK file from last nights backups.I select Master as the restore to database, put a check in the backup set to restore and press ok.Below is the error that I am getting:

“Restore failed for Server ‘SERVERNAME’ – System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing 'master' database. (Microsoft.SqlServer.Smo)

Do I have a real error, or am I going about the process incorrectly for SQL 2005?

Here is the SQL Script that my actions are producing:

RESTORE DATABASE [master] FROMDISK = N'D:\ProductionSQLBackupforDEV\ \MSSQL\BACKUP\master\master_backup_200605110020.bak' WITHFILE = 1,NOUNLOAD,STATS = 10

GO

Also, all of our databases, system and user, are stored in a different directory than c:\program files\mssql……We have moved them to D:\directory.

If I need to re evaluate our “Backup” Procedures to be able to perform these actions please let me know.

Thank you for any assistance you can provide.

Keith

Does anyone have any ideas on this problem?

Can the master database from SQL2005 on server1 be restored to SQL2005 on server2?

If so, how do you do it?

If not, how do you recover from a disaster where you are forced to restore from backups?


Thank you,

Keith

|||

Did you try the WITH REPLACE option?

That should work.

|||

Thank you,

That was exactly what I was looking for.

Keith

Disaster Recovery Plan

I have a server that has become unstable.
My tasks in the next 2 days:
Complete a full system backup of the source server
complete a full system restore to the destination server
unplug the old system
plug in the new system
Backup / Restore software: Veritas Backup Exec
Because of the nature of the production box, we have a No down time policy.
My concern is will replication be broken.
What might you suggest I prepare for?
Typically, you'll need to script out replication and reinitialize when you're
up and going on the new server. You can do a nosync initialization provided
all data has been synchronizes and then you have prevented access to the
system while this project is being done.
HTH,
Paul Ibison

2012年3月8日星期四

Disaster Recovery

What order should I restore databases in when I am doing a disaster
recovery? By databases I mean:
Master
Model
Msdb
All Other Databases
Hi
Correct. Just go through the processes on how to restore master DB in BOL.
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Mike Johnson" <mj@.microsoft.com> wrote in message
news:udr74rL$EHA.1300@.TK2MSFTNGP14.phx.gbl...
> What order should I restore databases in when I am doing a disaster
> recovery? By databases I mean:
> Master
> Model
> Msdb
> All Other Databases
>

Disaster Recovery

What order should I restore databases in when I am doing a disaster
recovery? By databases I mean:
Master
Model
Msdb
All Other DatabasesHi
Correct. Just go through the processes on how to restore master DB in BOL.
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Mike Johnson" <mj@.microsoft.com> wrote in message
news:udr74rL$EHA.1300@.TK2MSFTNGP14.phx.gbl...
> What order should I restore databases in when I am doing a disaster
> recovery? By databases I mean:
> Master
> Model
> Msdb
> All Other Databases
>

Disaster Recovery

What order should I restore databases in when I am doing a disaster
recovery? By databases I mean:
Master
Model
Msdb
All Other DatabasesHi
Correct. Just go through the processes on how to restore master DB in BOL.
--
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Mike Johnson" <mj@.microsoft.com> wrote in message
news:udr74rL$EHA.1300@.TK2MSFTNGP14.phx.gbl...
> What order should I restore databases in when I am doing a disaster
> recovery? By databases I mean:
> Master
> Model
> Msdb
> All Other Databases
>

Disaster - Recovery Order of events

we are trying to simulate a disater recovery of our SQL2000 and SQL2005 development servers. Which is the order in which we should restore the DBs. I am talking specifically of MSDB, master and user DBs; should we restore user DBs before master and MSDB?
Thanks,
CarlosGenerally, you restore master first, then model(if you made any changes to it), and msdb. After that, all the user databases should be restored. THis goes for SQL 2000 and SQL 2005.|||Generally I have a standby box|||lucky little %^*)|||lucky little %^*)

He didn't say WHAT kind of box. It's actually a box of 64 crayola crayons.

Regards,

hmscott|||i thought the first thing to do was to start blaming other people. maybe followed by some frantic yelling all around the office.

maybe Brett has a squeezebox. But wait, if he has a squeezebox who doesn't sleep at night? I am confused. Back to writing code.

Disaster - Recovery Order of events

we are trying to simulate a disater recovery of our SQL2000 and SQL2005
development servers. Which is the order in which we should restore the DBs. I
am talking specifically of MSDB, master and user DBs; should we restore user
DBs before master and MSDB?
Thanks,
CarlosHi
http://msdn2.microsoft.com/en-us/library/ms190190.aspx
"Carlos" <carlosarango@.SQLserver.com> wrote in message
news:580A4901-C15A-4694-8EBF-A9E84B7075E1@.microsoft.com...
> we are trying to simulate a disater recovery of our SQL2000 and SQL2005
> development servers. Which is the order in which we should restore the
> DBs. I
> am talking specifically of MSDB, master and user DBs; should we restore
> user
> DBs before master and MSDB?
> Thanks,
> Carlos|||Thanks Uri
Carlos
"Uri Dimant" wrote:
> Hi
> http://msdn2.microsoft.com/en-us/library/ms190190.aspx
>
> "Carlos" <carlosarango@.SQLserver.com> wrote in message
> news:580A4901-C15A-4694-8EBF-A9E84B7075E1@.microsoft.com...
> > we are trying to simulate a disater recovery of our SQL2000 and SQL2005
> > development servers. Which is the order in which we should restore the
> > DBs. I
> > am talking specifically of MSDB, master and user DBs; should we restore
> > user
> > DBs before master and MSDB?
> >
> > Thanks,
> >
> > Carlos
>
>