Hi,
Is there a way that I can automatically switch my database recoverymodel
from Simple to Full and vice versa so that I can plan this swict through
Scheduled tasks?Hi
Execute a T-SQL task in a agent job.
Just be aware, changing the recovery mode affects your ability to do point
in time restores, so after you set the mode back to full, do a full DB
backup otherwise your subsequent transaction log backups are worthless.
Why would you want to do such a thing as it does not affect how SQL Server
uses the log? Everything is still logged, you just throw away
recoverability.
Full recovery:
ALTER DATABASE <dbname> SET RECOVERY FULL
and back to simple:
ALTER DATABASE <dbname> SET RECOVERY SIMPLE
Regards
--
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/
"altrust" <altrust@.discussions.microsoft.com> wrote in message
news:F410A58B-B052-4E34-B21A-4E2DB8498A7A@.microsoft.com...
> Hi,
> Is there a way that I can automatically switch my database recoverymodel
> from Simple to Full and vice versa so that I can plan this swict through
> Scheduled tasks?|||Thx Mike
I want to change it because every weekend between 02:00 and 04:00 the
customer sends a huge job that completely eats out my transaction log disk
(60GB)
I will try your solution.
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> Execute a T-SQL task in a agent job.
> Just be aware, changing the recovery mode affects your ability to do point
> in time restores, so after you set the mode back to full, do a full DB
> backup otherwise your subsequent transaction log backups are worthless.
> Why would you want to do such a thing as it does not affect how SQL Server
> uses the log? Everything is still logged, you just throw away
> recoverability.
> Full recovery:
> ALTER DATABASE <dbname> SET RECOVERY FULL
> and back to simple:
> ALTER DATABASE <dbname> SET RECOVERY SIMPLE
> Regards
> --
> 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/
> "altru?st" <altrust@.discussions.microsoft.com> wrote in message
> news:F410A58B-B052-4E34-B21A-4E2DB8498A7A@.microsoft.com...
>
>|||altrust wrote:
> Thx Mike
> I want to change it because every weekend between 02:00 and 04:00 the
> customer sends a huge job that completely eats out my transaction log disk
> (60GB)
>
You could create another maintenance plan that only did transaction log back
ups and schedule it to run very frequently
between 02:00 and 04:00 on weekends only.|||Hi
If it is one job and one batch, it might be one big transaction, and in that
case, until the transaction is committed or rolled back, the log info stays
in the log and can't be released. Check the job.
Regards
--
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/
"Ed Enstrom" <nospam@.invalid.net> wrote in message
news:haepf.39012$L7.9595@.fe12.lga...
> altrust wrote:
> You could create another maintenance plan that only did transaction log
> backups and schedule it to run very frequently between 02:00 and 04:00 on
> weekends only.
>|||I tried this option but it didn't work...
It filled up anyway.
"Ed Enstrom" wrote:
> altru?st wrote:
> You could create another maintenance plan that only did transaction log ba
ckups and schedule it to run very frequently
> between 02:00 and 04:00 on weekends only.
>
Showing posts with label recovery. Show all posts
Showing posts with label recovery. Show all posts
Friday, March 30, 2012
Scripting a change in the recovery model
Hi,
Is there a way that I can automatically switch my database recoverymodel
from Simple to Full and vice versa so that I can plan this swict through
Scheduled tasks?
Hi
Execute a T-SQL task in a agent job.
Just be aware, changing the recovery mode affects your ability to do point
in time restores, so after you set the mode back to full, do a full DB
backup otherwise your subsequent transaction log backups are worthless.
Why would you want to do such a thing as it does not affect how SQL Server
uses the log? Everything is still logged, you just throw away
recoverability.
Full recovery:
ALTER DATABASE <dbname> SET RECOVERY FULL
and back to simple:
ALTER DATABASE <dbname> SET RECOVERY SIMPLE
Regards
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/
"altrust" <altrust@.discussions.microsoft.com> wrote in message
news:F410A58B-B052-4E34-B21A-4E2DB8498A7A@.microsoft.com...
> Hi,
> Is there a way that I can automatically switch my database recoverymodel
> from Simple to Full and vice versa so that I can plan this swict through
> Scheduled tasks?
|||Thx Mike
I want to change it because every weekend between 02:00 and 04:00 the
customer sends a huge job that completely eats out my transaction log disk
(60GB)
I will try your solution.
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> Execute a T-SQL task in a agent job.
> Just be aware, changing the recovery mode affects your ability to do point
> in time restores, so after you set the mode back to full, do a full DB
> backup otherwise your subsequent transaction log backups are worthless.
> Why would you want to do such a thing as it does not affect how SQL Server
> uses the log? Everything is still logged, you just throw away
> recoverability.
> Full recovery:
> ALTER DATABASE <dbname> SET RECOVERY FULL
> and back to simple:
> ALTER DATABASE <dbname> SET RECOVERY SIMPLE
> Regards
> --
> 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/
> "altru?st" <altrust@.discussions.microsoft.com> wrote in message
> news:F410A58B-B052-4E34-B21A-4E2DB8498A7A@.microsoft.com...
>
>
|||altrust wrote:
> Thx Mike
> I want to change it because every weekend between 02:00 and 04:00 the
> customer sends a huge job that completely eats out my transaction log disk
> (60GB)
>
You could create another maintenance plan that only did transaction log backups and schedule it to run very frequently
between 02:00 and 04:00 on weekends only.
|||Hi
If it is one job and one batch, it might be one big transaction, and in that
case, until the transaction is committed or rolled back, the log info stays
in the log and can't be released. Check the job.
Regards
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/
"Ed Enstrom" <nospam@.invalid.net> wrote in message
news:haepf.39012$L7.9595@.fe12.lga...
> altrust wrote:
> You could create another maintenance plan that only did transaction log
> backups and schedule it to run very frequently between 02:00 and 04:00 on
> weekends only.
>
|||I tried this option but it didn't work...
It filled up anyway.
"Ed Enstrom" wrote:
> altru?st wrote:
> You could create another maintenance plan that only did transaction log backups and schedule it to run very frequently
> between 02:00 and 04:00 on weekends only.
>
Is there a way that I can automatically switch my database recoverymodel
from Simple to Full and vice versa so that I can plan this swict through
Scheduled tasks?
Hi
Execute a T-SQL task in a agent job.
Just be aware, changing the recovery mode affects your ability to do point
in time restores, so after you set the mode back to full, do a full DB
backup otherwise your subsequent transaction log backups are worthless.
Why would you want to do such a thing as it does not affect how SQL Server
uses the log? Everything is still logged, you just throw away
recoverability.
Full recovery:
ALTER DATABASE <dbname> SET RECOVERY FULL
and back to simple:
ALTER DATABASE <dbname> SET RECOVERY SIMPLE
Regards
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/
"altrust" <altrust@.discussions.microsoft.com> wrote in message
news:F410A58B-B052-4E34-B21A-4E2DB8498A7A@.microsoft.com...
> Hi,
> Is there a way that I can automatically switch my database recoverymodel
> from Simple to Full and vice versa so that I can plan this swict through
> Scheduled tasks?
|||Thx Mike
I want to change it because every weekend between 02:00 and 04:00 the
customer sends a huge job that completely eats out my transaction log disk
(60GB)
I will try your solution.
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> Execute a T-SQL task in a agent job.
> Just be aware, changing the recovery mode affects your ability to do point
> in time restores, so after you set the mode back to full, do a full DB
> backup otherwise your subsequent transaction log backups are worthless.
> Why would you want to do such a thing as it does not affect how SQL Server
> uses the log? Everything is still logged, you just throw away
> recoverability.
> Full recovery:
> ALTER DATABASE <dbname> SET RECOVERY FULL
> and back to simple:
> ALTER DATABASE <dbname> SET RECOVERY SIMPLE
> Regards
> --
> 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/
> "altru?st" <altrust@.discussions.microsoft.com> wrote in message
> news:F410A58B-B052-4E34-B21A-4E2DB8498A7A@.microsoft.com...
>
>
|||altrust wrote:
> Thx Mike
> I want to change it because every weekend between 02:00 and 04:00 the
> customer sends a huge job that completely eats out my transaction log disk
> (60GB)
>
You could create another maintenance plan that only did transaction log backups and schedule it to run very frequently
between 02:00 and 04:00 on weekends only.
|||Hi
If it is one job and one batch, it might be one big transaction, and in that
case, until the transaction is committed or rolled back, the log info stays
in the log and can't be released. Check the job.
Regards
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/
"Ed Enstrom" <nospam@.invalid.net> wrote in message
news:haepf.39012$L7.9595@.fe12.lga...
> altrust wrote:
> You could create another maintenance plan that only did transaction log
> backups and schedule it to run very frequently between 02:00 and 04:00 on
> weekends only.
>
|||I tried this option but it didn't work...
It filled up anyway.
"Ed Enstrom" wrote:
> altru?st wrote:
> You could create another maintenance plan that only did transaction log backups and schedule it to run very frequently
> between 02:00 and 04:00 on weekends only.
>
Scripting a change in the recovery model
Hi,
Is there a way that I can automatically switch my database recoverymodel
from Simple to Full and vice versa so that I can plan this swict through
Scheduled tasks?Hi
Execute a T-SQL task in a agent job.
Just be aware, changing the recovery mode affects your ability to do point
in time restores, so after you set the mode back to full, do a full DB
backup otherwise your subsequent transaction log backups are worthless.
Why would you want to do such a thing as it does not affect how SQL Server
uses the log? Everything is still logged, you just throw away
recoverability.
Full recovery:
ALTER DATABASE <dbname> SET RECOVERY FULL
and back to simple:
ALTER DATABASE <dbname> SET RECOVERY SIMPLE
Regards
--
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/
"altruïst" <altrust@.discussions.microsoft.com> wrote in message
news:F410A58B-B052-4E34-B21A-4E2DB8498A7A@.microsoft.com...
> Hi,
> Is there a way that I can automatically switch my database recoverymodel
> from Simple to Full and vice versa so that I can plan this swict through
> Scheduled tasks?|||Thx Mike
I want to change it because every weekend between 02:00 and 04:00 the
customer sends a huge job that completely eats out my transaction log disk
(60GB)
I will try your solution.
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> Execute a T-SQL task in a agent job.
> Just be aware, changing the recovery mode affects your ability to do point
> in time restores, so after you set the mode back to full, do a full DB
> backup otherwise your subsequent transaction log backups are worthless.
> Why would you want to do such a thing as it does not affect how SQL Server
> uses the log? Everything is still logged, you just throw away
> recoverability.
> Full recovery:
> ALTER DATABASE <dbname> SET RECOVERY FULL
> and back to simple:
> ALTER DATABASE <dbname> SET RECOVERY SIMPLE
> Regards
> --
> 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/
> "altruïst" <altrust@.discussions.microsoft.com> wrote in message
> news:F410A58B-B052-4E34-B21A-4E2DB8498A7A@.microsoft.com...
> > Hi,
> >
> > Is there a way that I can automatically switch my database recoverymodel
> > from Simple to Full and vice versa so that I can plan this swict through
> > Scheduled tasks?
>
>|||altruïst wrote:
> Thx Mike
> I want to change it because every weekend between 02:00 and 04:00 the
> customer sends a huge job that completely eats out my transaction log disk
> (60GB)
>
You could create another maintenance plan that only did transaction log backups and schedule it to run very frequently
between 02:00 and 04:00 on weekends only.|||Hi
If it is one job and one batch, it might be one big transaction, and in that
case, until the transaction is committed or rolled back, the log info stays
in the log and can't be released. Check the job.
Regards
--
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/
"Ed Enstrom" <nospam@.invalid.net> wrote in message
news:haepf.39012$L7.9595@.fe12.lga...
> altruïst wrote:
>> Thx Mike
>> I want to change it because every weekend between 02:00 and 04:00 the
>> customer sends a huge job that completely eats out my transaction log
>> disk (60GB)
> You could create another maintenance plan that only did transaction log
> backups and schedule it to run very frequently between 02:00 and 04:00 on
> weekends only.
>|||I tried this option but it didn't work...
It filled up anyway.
"Ed Enstrom" wrote:
> altruïst wrote:
> > Thx Mike
> >
> > I want to change it because every weekend between 02:00 and 04:00 the
> > customer sends a huge job that completely eats out my transaction log disk
> > (60GB)
> >
> You could create another maintenance plan that only did transaction log backups and schedule it to run very frequently
> between 02:00 and 04:00 on weekends only.
>
Is there a way that I can automatically switch my database recoverymodel
from Simple to Full and vice versa so that I can plan this swict through
Scheduled tasks?Hi
Execute a T-SQL task in a agent job.
Just be aware, changing the recovery mode affects your ability to do point
in time restores, so after you set the mode back to full, do a full DB
backup otherwise your subsequent transaction log backups are worthless.
Why would you want to do such a thing as it does not affect how SQL Server
uses the log? Everything is still logged, you just throw away
recoverability.
Full recovery:
ALTER DATABASE <dbname> SET RECOVERY FULL
and back to simple:
ALTER DATABASE <dbname> SET RECOVERY SIMPLE
Regards
--
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/
"altruïst" <altrust@.discussions.microsoft.com> wrote in message
news:F410A58B-B052-4E34-B21A-4E2DB8498A7A@.microsoft.com...
> Hi,
> Is there a way that I can automatically switch my database recoverymodel
> from Simple to Full and vice versa so that I can plan this swict through
> Scheduled tasks?|||Thx Mike
I want to change it because every weekend between 02:00 and 04:00 the
customer sends a huge job that completely eats out my transaction log disk
(60GB)
I will try your solution.
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> Execute a T-SQL task in a agent job.
> Just be aware, changing the recovery mode affects your ability to do point
> in time restores, so after you set the mode back to full, do a full DB
> backup otherwise your subsequent transaction log backups are worthless.
> Why would you want to do such a thing as it does not affect how SQL Server
> uses the log? Everything is still logged, you just throw away
> recoverability.
> Full recovery:
> ALTER DATABASE <dbname> SET RECOVERY FULL
> and back to simple:
> ALTER DATABASE <dbname> SET RECOVERY SIMPLE
> Regards
> --
> 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/
> "altruïst" <altrust@.discussions.microsoft.com> wrote in message
> news:F410A58B-B052-4E34-B21A-4E2DB8498A7A@.microsoft.com...
> > Hi,
> >
> > Is there a way that I can automatically switch my database recoverymodel
> > from Simple to Full and vice versa so that I can plan this swict through
> > Scheduled tasks?
>
>|||altruïst wrote:
> Thx Mike
> I want to change it because every weekend between 02:00 and 04:00 the
> customer sends a huge job that completely eats out my transaction log disk
> (60GB)
>
You could create another maintenance plan that only did transaction log backups and schedule it to run very frequently
between 02:00 and 04:00 on weekends only.|||Hi
If it is one job and one batch, it might be one big transaction, and in that
case, until the transaction is committed or rolled back, the log info stays
in the log and can't be released. Check the job.
Regards
--
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/
"Ed Enstrom" <nospam@.invalid.net> wrote in message
news:haepf.39012$L7.9595@.fe12.lga...
> altruïst wrote:
>> Thx Mike
>> I want to change it because every weekend between 02:00 and 04:00 the
>> customer sends a huge job that completely eats out my transaction log
>> disk (60GB)
> You could create another maintenance plan that only did transaction log
> backups and schedule it to run very frequently between 02:00 and 04:00 on
> weekends only.
>|||I tried this option but it didn't work...
It filled up anyway.
"Ed Enstrom" wrote:
> altruïst wrote:
> > Thx Mike
> >
> > I want to change it because every weekend between 02:00 and 04:00 the
> > customer sends a huge job that completely eats out my transaction log disk
> > (60GB)
> >
> You could create another maintenance plan that only did transaction log backups and schedule it to run very frequently
> between 02:00 and 04:00 on weekends only.
>
Friday, March 23, 2012
Script to enumerate Recovery mode
Hello,
YOu could also use:-
sp_helpdb
THanks
Hari
"MV" <MV@.MV.MV> wrote in message
news:uKu5FP7PHHA.4824@.TK2MSFTNGP02.phx.gbl...
> Hi, I search a script that report me a list of all my several DB on my SQL
> Servers, with which Recovery model they have (simple,full or bulked). Did
> somebody have something? Thanks
>
I you need precise information like only recoverymodel then use Uri's query
statement if you need complete details Hari's SP_HELPDB will be useful.
"Hari Prasad" wrote:
> Hello,
> YOu could also use:-
> sp_helpdb
> THanks
> Hari
> "MV" <MV@.MV.MV> wrote in message
> news:uKu5FP7PHHA.4824@.TK2MSFTNGP02.phx.gbl...
>
>
YOu could also use:-
sp_helpdb
THanks
Hari
"MV" <MV@.MV.MV> wrote in message
news:uKu5FP7PHHA.4824@.TK2MSFTNGP02.phx.gbl...
> Hi, I search a script that report me a list of all my several DB on my SQL
> Servers, with which Recovery model they have (simple,full or bulked). Did
> somebody have something? Thanks
>
I you need precise information like only recoverymodel then use Uri's query
statement if you need complete details Hari's SP_HELPDB will be useful.
"Hari Prasad" wrote:
> Hello,
> YOu could also use:-
> sp_helpdb
> THanks
> Hari
> "MV" <MV@.MV.MV> wrote in message
> news:uKu5FP7PHHA.4824@.TK2MSFTNGP02.phx.gbl...
>
>
Script to enumerate Recovery mode
Hi, I search a script that report me a list of all my several DB on my SQL
Servers, with which Recovery model they have (simple,full or bulked). Did
somebody have something? ThanksMV
select name,databasepropertyex(name,'recovery') from master..sysdatabases
"MV" <MV@.MV.MV> wrote in message
news:uKu5FP7PHHA.4824@.TK2MSFTNGP02.phx.gbl...
> Hi, I search a script that report me a list of all my several DB on my SQL
> Servers, with which Recovery model they have (simple,full or bulked). Did
> somebody have something? Thanks
>|||Hello,
YOu could also use:-
sp_helpdb
THanks
Hari
"MV" <MV@.MV.MV> wrote in message
news:uKu5FP7PHHA.4824@.TK2MSFTNGP02.phx.gbl...
> Hi, I search a script that report me a list of all my several DB on my SQL
> Servers, with which Recovery model they have (simple,full or bulked). Did
> somebody have something? Thanks
>|||I you need precise information like only recoverymodel then use Uri's query
statement if you need complete details Hari's SP_HELPDB will be useful.
"Hari Prasad" wrote:
> Hello,
> YOu could also use:-
> sp_helpdb
> THanks
> Hari
> "MV" <MV@.MV.MV> wrote in message
> news:uKu5FP7PHHA.4824@.TK2MSFTNGP02.phx.gbl...
> > Hi, I search a script that report me a list of all my several DB on my SQL
> > Servers, with which Recovery model they have (simple,full or bulked). Did
> > somebody have something? Thanks
> >
>
>
Servers, with which Recovery model they have (simple,full or bulked). Did
somebody have something? ThanksMV
select name,databasepropertyex(name,'recovery') from master..sysdatabases
"MV" <MV@.MV.MV> wrote in message
news:uKu5FP7PHHA.4824@.TK2MSFTNGP02.phx.gbl...
> Hi, I search a script that report me a list of all my several DB on my SQL
> Servers, with which Recovery model they have (simple,full or bulked). Did
> somebody have something? Thanks
>|||Hello,
YOu could also use:-
sp_helpdb
THanks
Hari
"MV" <MV@.MV.MV> wrote in message
news:uKu5FP7PHHA.4824@.TK2MSFTNGP02.phx.gbl...
> Hi, I search a script that report me a list of all my several DB on my SQL
> Servers, with which Recovery model they have (simple,full or bulked). Did
> somebody have something? Thanks
>|||I you need precise information like only recoverymodel then use Uri's query
statement if you need complete details Hari's SP_HELPDB will be useful.
"Hari Prasad" wrote:
> Hello,
> YOu could also use:-
> sp_helpdb
> THanks
> Hari
> "MV" <MV@.MV.MV> wrote in message
> news:uKu5FP7PHHA.4824@.TK2MSFTNGP02.phx.gbl...
> > Hi, I search a script that report me a list of all my several DB on my SQL
> > Servers, with which Recovery model they have (simple,full or bulked). Did
> > somebody have something? Thanks
> >
>
>
Script to enumerate Recovery mode
Hi, I search a script that report me a list of all my several DB on my SQL
Servers, with which Recovery model they have (simple,full or bulked). Did
somebody have something? ThanksMV
select name,databasepropertyex(name,'recovery')
from master..sysdatabases
"MV" <MV@.MV.MV> wrote in message
news:uKu5FP7PHHA.4824@.TK2MSFTNGP02.phx.gbl...
> Hi, I search a script that report me a list of all my several DB on my SQL
> Servers, with which Recovery model they have (simple,full or bulked). Did
> somebody have something? Thanks
>|||Hello,
YOu could also use:-
sp_helpdb
THanks
Hari
"MV" <MV@.MV.MV> wrote in message
news:uKu5FP7PHHA.4824@.TK2MSFTNGP02.phx.gbl...
> Hi, I search a script that report me a list of all my several DB on my SQL
> Servers, with which Recovery model they have (simple,full or bulked). Did
> somebody have something? Thanks
>|||I you need precise information like only recoverymodel then use Uri's query
statement if you need complete details Hari's SP_HELPDB will be useful.
"Hari Prasad" wrote:
> Hello,
> YOu could also use:-
> sp_helpdb
> THanks
> Hari
> "MV" <MV@.MV.MV> wrote in message
> news:uKu5FP7PHHA.4824@.TK2MSFTNGP02.phx.gbl...
>
>
Servers, with which Recovery model they have (simple,full or bulked). Did
somebody have something? ThanksMV
select name,databasepropertyex(name,'recovery')
from master..sysdatabases
"MV" <MV@.MV.MV> wrote in message
news:uKu5FP7PHHA.4824@.TK2MSFTNGP02.phx.gbl...
> Hi, I search a script that report me a list of all my several DB on my SQL
> Servers, with which Recovery model they have (simple,full or bulked). Did
> somebody have something? Thanks
>|||Hello,
YOu could also use:-
sp_helpdb
THanks
Hari
"MV" <MV@.MV.MV> wrote in message
news:uKu5FP7PHHA.4824@.TK2MSFTNGP02.phx.gbl...
> Hi, I search a script that report me a list of all my several DB on my SQL
> Servers, with which Recovery model they have (simple,full or bulked). Did
> somebody have something? Thanks
>|||I you need precise information like only recoverymodel then use Uri's query
statement if you need complete details Hari's SP_HELPDB will be useful.
"Hari Prasad" wrote:
> Hello,
> YOu could also use:-
> sp_helpdb
> THanks
> Hari
> "MV" <MV@.MV.MV> wrote in message
> news:uKu5FP7PHHA.4824@.TK2MSFTNGP02.phx.gbl...
>
>
Tuesday, March 20, 2012
Script Master DB Restore
I will be transferring database from one server to another along with the ma
ster and msdb database for use as a disaster recovery server. On the second
server, I'd like to script the loading of all the databases (including the m
aster). I can stop the SQL
Service using NET STOP MSSQLSERVER. Then, I can place the database in single
user mode using the command "sqlservr -m". Next, I used OSQL to restore the
master database (which restores the database and stops the sql server - inh
erently). The problem is th
at the command "sqlservr -m" leave the command shell open. I must close the
window by manually typing <ctrl-c> and exiting the shell. I want this to be
a hands-off operation. Any suggestions?
Thanks!
AdamFirst I believe if you just create a cmd file and run your sqlservr -m from
there I think it will kill the window.
Jeff Duncan
MCDBA, MCSE+I
"Adam" <ahafner@.itape.com> wrote in message
news:B4188C24-EC76-40F1-BD02-A583C87A3075@.microsoft.com...
> I will be transferring database from one server to another along with the
master and msdb database for use as a disaster recovery server. On the
second server, I'd like to script the loading of all the databases
(including the master). I can stop the SQL Service using NET STOP
MSSQLSERVER. Then, I can place the database in single user mode using the
command "sqlservr -m". Next, I used OSQL to restore the master database
(which restores the database and stops the sql server - inherently). The
problem is that the command "sqlservr -m" leave the command shell open. I
must close the window by manually typing <ctrl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
> Thanks!
> Adam|||Have you tried the "exit" command?
----
----
--
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"Adam" <ahafner@.itape.com> wrote in message
news:B4188C24-EC76-40F1-BD02-A583C87A3075@.microsoft.com...
> I will be transferring database from one server to another along with the
master and msdb database for use as a disaster recovery server. On the
second server, I'd like to script the loading of all the databases
(including the master). I can stop the SQL Service using NET STOP
MSSQLSERVER. Then, I can place the database in single user mode using the
command "sqlservr -m". Next, I used OSQL to restore the master database
(which restores the database and stops the sql server - inherently). The
problem is that the command "sqlservr -m" leave the command shell open. I
must close the window by manually typing <ctrl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
> Thanks!
> Adam|||When you run the "sqlservr -m" the command shell hangs until <ctrl-c> typed.
If you create a .bat file with the commands "sqlservr -m" followed on the n
ext line by "exit", the "exit" command would not be executed until the <cntr
l-c> was entered to end the
"sqlservr -m" command.|||When you run the "sqlservr -m" the command shell hangs until <ctrl-c> typed.
If you create a .bat file with the commands "sqlservr -m" followed on the n
ext line by "exit", the "exit" command would not be executed until the <cntr
l-c> was entered to end the
"sqlservr -m" command.|||"Adam" <ahafner@.itape.com> wrote in message
news:B4188C24-EC76-40F1-BD02-A583C87A3075@.microsoft.com...
> I will be transferring database from one server to another along with the
master and msdb database for use as a disaster recovery server. On the
second server, I'd like to script the loading of all the databases
(including the master). I can stop the SQL Service using NET STOP
MSSQLSERVER. Then, I can place the database in single user mode using the
command "sqlservr -m". Next, I used OSQL to restore the master database
(which restores the database and stops the sql server - inherently). The
problem is that the command "sqlservr -m" leave the command shell open. I
must close the window by manually typing <ctrl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
Try using:
start sqlservr -m|||Try using the TSQL "SHUTDOWN" command inside the script you run through OSQL
.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Adam" <ahafner@.itape.com> wrote in message news:B4188C24-EC76-40F1-BD02-A583C87A3075@.micros
oft.com...
> I will be transferring database from one server to another along with the master a
nd msdb database for use
as a disaster recovery server. On the second server, I'd like to script the
loading of all the databases
(including the master). I can stop the SQL Service using NET STOP MSSQLSERVE
R. Then, I can place the database
in single user mode using the command "sqlservr -m". Next, I used OSQL to re
store the master database (which
restores the database and stops the sql server - inherently). The problem is
that the command "sqlservr -m"
leave the command shell open. I must close the window by manually typing <ct
rl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
> Thanks!
> Adam|||Hi,
Since you are setting up a Disaster recovery server, instead of restoring
the databases one one by , you have a alternate method which is very easy.
I have done this many times and succeeded always.This will work out if
you're moving to a different machine with the same logical drive layout
(Same folder structure) same as production.
Steps:-
1. Install the SQL Server and the same service pack as on your existing
machine.
2 Stop the SQL service on your old machine. Copy the entire SQL7/SQL 2000
folder and it's subfolders,
plus any separate folders containing logs or data, to the new machine.
Also copy over any other folders containing
data that you want to move to the new machine.
3. Start the SQL Server service in new machine. Login to query analyzer and
execute sp_dropserver <drop server> and use sp_addserver <new server>,Local
4. Stop and Start the SQL Server service
5. Check all the database are running fine.
6. Start the SQL Server in production server.
Have a look into Vyas's site
http://vyaskn.tripod.com/moving_sql_server.htm
Thanks
Hari
MCDBA
"Adam" <ahafner@.itape.com> wrote in message
news:B4188C24-EC76-40F1-BD02-A583C87A3075@.microsoft.com...
> I will be transferring database from one server to another along with the
master and msdb database for use as a disaster recovery server. On the
second server, I'd like to script the loading of all the databases
(including the master). I can stop the SQL Service using NET STOP
MSSQLSERVER. Then, I can place the database in single user mode using the
command "sqlservr -m". Next, I used OSQL to restore the master database
(which restores the database and stops the sql server - inherently). The
problem is that the command "sqlservr -m" leave the command shell open. I
must close the window by manually typing <ctrl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
> Thanks!
> Adam|||I can not bring down the production server at any time during the day (24x7)
.
ster and msdb database for use as a disaster recovery server. On the second
server, I'd like to script the loading of all the databases (including the m
aster). I can stop the SQL
Service using NET STOP MSSQLSERVER. Then, I can place the database in single
user mode using the command "sqlservr -m". Next, I used OSQL to restore the
master database (which restores the database and stops the sql server - inh
erently). The problem is th
at the command "sqlservr -m" leave the command shell open. I must close the
window by manually typing <ctrl-c> and exiting the shell. I want this to be
a hands-off operation. Any suggestions?
Thanks!
AdamFirst I believe if you just create a cmd file and run your sqlservr -m from
there I think it will kill the window.
Jeff Duncan
MCDBA, MCSE+I
"Adam" <ahafner@.itape.com> wrote in message
news:B4188C24-EC76-40F1-BD02-A583C87A3075@.microsoft.com...
> I will be transferring database from one server to another along with the
master and msdb database for use as a disaster recovery server. On the
second server, I'd like to script the loading of all the databases
(including the master). I can stop the SQL Service using NET STOP
MSSQLSERVER. Then, I can place the database in single user mode using the
command "sqlservr -m". Next, I used OSQL to restore the master database
(which restores the database and stops the sql server - inherently). The
problem is that the command "sqlservr -m" leave the command shell open. I
must close the window by manually typing <ctrl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
> Thanks!
> Adam|||Have you tried the "exit" command?
----
----
--
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"Adam" <ahafner@.itape.com> wrote in message
news:B4188C24-EC76-40F1-BD02-A583C87A3075@.microsoft.com...
> I will be transferring database from one server to another along with the
master and msdb database for use as a disaster recovery server. On the
second server, I'd like to script the loading of all the databases
(including the master). I can stop the SQL Service using NET STOP
MSSQLSERVER. Then, I can place the database in single user mode using the
command "sqlservr -m". Next, I used OSQL to restore the master database
(which restores the database and stops the sql server - inherently). The
problem is that the command "sqlservr -m" leave the command shell open. I
must close the window by manually typing <ctrl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
> Thanks!
> Adam|||When you run the "sqlservr -m" the command shell hangs until <ctrl-c> typed.
If you create a .bat file with the commands "sqlservr -m" followed on the n
ext line by "exit", the "exit" command would not be executed until the <cntr
l-c> was entered to end the
"sqlservr -m" command.|||When you run the "sqlservr -m" the command shell hangs until <ctrl-c> typed.
If you create a .bat file with the commands "sqlservr -m" followed on the n
ext line by "exit", the "exit" command would not be executed until the <cntr
l-c> was entered to end the
"sqlservr -m" command.|||"Adam" <ahafner@.itape.com> wrote in message
news:B4188C24-EC76-40F1-BD02-A583C87A3075@.microsoft.com...
> I will be transferring database from one server to another along with the
master and msdb database for use as a disaster recovery server. On the
second server, I'd like to script the loading of all the databases
(including the master). I can stop the SQL Service using NET STOP
MSSQLSERVER. Then, I can place the database in single user mode using the
command "sqlservr -m". Next, I used OSQL to restore the master database
(which restores the database and stops the sql server - inherently). The
problem is that the command "sqlservr -m" leave the command shell open. I
must close the window by manually typing <ctrl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
Try using:
start sqlservr -m|||Try using the TSQL "SHUTDOWN" command inside the script you run through OSQL
.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Adam" <ahafner@.itape.com> wrote in message news:B4188C24-EC76-40F1-BD02-A583C87A3075@.micros
oft.com...
> I will be transferring database from one server to another along with the master a
nd msdb database for use
as a disaster recovery server. On the second server, I'd like to script the
loading of all the databases
(including the master). I can stop the SQL Service using NET STOP MSSQLSERVE
R. Then, I can place the database
in single user mode using the command "sqlservr -m". Next, I used OSQL to re
store the master database (which
restores the database and stops the sql server - inherently). The problem is
that the command "sqlservr -m"
leave the command shell open. I must close the window by manually typing <ct
rl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
> Thanks!
> Adam|||Hi,
Since you are setting up a Disaster recovery server, instead of restoring
the databases one one by , you have a alternate method which is very easy.
I have done this many times and succeeded always.This will work out if
you're moving to a different machine with the same logical drive layout
(Same folder structure) same as production.
Steps:-
1. Install the SQL Server and the same service pack as on your existing
machine.
2 Stop the SQL service on your old machine. Copy the entire SQL7/SQL 2000
folder and it's subfolders,
plus any separate folders containing logs or data, to the new machine.
Also copy over any other folders containing
data that you want to move to the new machine.
3. Start the SQL Server service in new machine. Login to query analyzer and
execute sp_dropserver <drop server> and use sp_addserver <new server>,Local
4. Stop and Start the SQL Server service
5. Check all the database are running fine.
6. Start the SQL Server in production server.
Have a look into Vyas's site
http://vyaskn.tripod.com/moving_sql_server.htm
Thanks
Hari
MCDBA
"Adam" <ahafner@.itape.com> wrote in message
news:B4188C24-EC76-40F1-BD02-A583C87A3075@.microsoft.com...
> I will be transferring database from one server to another along with the
master and msdb database for use as a disaster recovery server. On the
second server, I'd like to script the loading of all the databases
(including the master). I can stop the SQL Service using NET STOP
MSSQLSERVER. Then, I can place the database in single user mode using the
command "sqlservr -m". Next, I used OSQL to restore the master database
(which restores the database and stops the sql server - inherently). The
problem is that the command "sqlservr -m" leave the command shell open. I
must close the window by manually typing <ctrl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
> Thanks!
> Adam|||I can not bring down the production server at any time during the day (24x7)
.
Script Master DB Restore
I will be transferring database from one server to another along with the master and msdb database for use as a disaster recovery server. On the second server, I'd like to script the loading of all the databases (including the master). I can stop the SQL
Service using NET STOP MSSQLSERVER. Then, I can place the database in single user mode using the command "sqlservr -m". Next, I used OSQL to restore the master database (which restores the database and stops the sql server - inherently). The problem is th
at the command "sqlservr -m" leave the command shell open. I must close the window by manually typing <ctrl-c> and exiting the shell. I want this to be a hands-off operation. Any suggestions?
Thanks!
Adam
First I believe if you just create a cmd file and run your sqlservr -m from
there I think it will kill the window.
Jeff Duncan
MCDBA, MCSE+I
"Adam" <ahafner@.itape.com> wrote in message
news:B4188C24-EC76-40F1-BD02-A583C87A3075@.microsoft.com...
> I will be transferring database from one server to another along with the
master and msdb database for use as a disaster recovery server. On the
second server, I'd like to script the loading of all the databases
(including the master). I can stop the SQL Service using NET STOP
MSSQLSERVER. Then, I can place the database in single user mode using the
command "sqlservr -m". Next, I used OSQL to restore the master database
(which restores the database and stops the sql server - inherently). The
problem is that the command "sqlservr -m" leave the command shell open. I
must close the window by manually typing <ctrl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
> Thanks!
> Adam
|||Have you tried the "exit" command?
----
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"Adam" <ahafner@.itape.com> wrote in message
news:B4188C24-EC76-40F1-BD02-A583C87A3075@.microsoft.com...
> I will be transferring database from one server to another along with the
master and msdb database for use as a disaster recovery server. On the
second server, I'd like to script the loading of all the databases
(including the master). I can stop the SQL Service using NET STOP
MSSQLSERVER. Then, I can place the database in single user mode using the
command "sqlservr -m". Next, I used OSQL to restore the master database
(which restores the database and stops the sql server - inherently). The
problem is that the command "sqlservr -m" leave the command shell open. I
must close the window by manually typing <ctrl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
> Thanks!
> Adam
|||When you run the "sqlservr -m" the command shell hangs until <ctrl-c> typed. If you create a .bat file with the commands "sqlservr -m" followed on the next line by "exit", the "exit" command would not be executed until the <cntrl-c> was entered to end the
"sqlservr -m" command.
|||When you run the "sqlservr -m" the command shell hangs until <ctrl-c> typed. If you create a .bat file with the commands "sqlservr -m" followed on the next line by "exit", the "exit" command would not be executed until the <cntrl-c> was entered to end the
"sqlservr -m" command.
|||"Adam" <ahafner@.itape.com> wrote in message
news:B4188C24-EC76-40F1-BD02-A583C87A3075@.microsoft.com...
> I will be transferring database from one server to another along with the
master and msdb database for use as a disaster recovery server. On the
second server, I'd like to script the loading of all the databases
(including the master). I can stop the SQL Service using NET STOP
MSSQLSERVER. Then, I can place the database in single user mode using the
command "sqlservr -m". Next, I used OSQL to restore the master database
(which restores the database and stops the sql server - inherently). The
problem is that the command "sqlservr -m" leave the command shell open. I
must close the window by manually typing <ctrl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
Try using:
start sqlservr -m
|||Try using the TSQL "SHUTDOWN" command inside the script you run through OSQL.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Adam" <ahafner@.itape.com> wrote in message news:B4188C24-EC76-40F1-BD02-A583C87A3075@.microsoft.com...
> I will be transferring database from one server to another along with the master and msdb database for use
as a disaster recovery server. On the second server, I'd like to script the loading of all the databases
(including the master). I can stop the SQL Service using NET STOP MSSQLSERVER. Then, I can place the database
in single user mode using the command "sqlservr -m". Next, I used OSQL to restore the master database (which
restores the database and stops the sql server - inherently). The problem is that the command "sqlservr -m"
leave the command shell open. I must close the window by manually typing <ctrl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
> Thanks!
> Adam
|||Hi,
Since you are setting up a Disaster recovery server, instead of restoring
the databases one one by , you have a alternate method which is very easy.
I have done this many times and succeeded always.This will work out if
you're moving to a different machine with the same logical drive layout
(Same folder structure) same as production.
Steps:-
1. Install the SQL Server and the same service pack as on your existing
machine.
2 Stop the SQL service on your old machine. Copy the entire SQL7/SQL 2000
folder and it's subfolders,
plus any separate folders containing logs or data, to the new machine.
Also copy over any other folders containing
data that you want to move to the new machine.
3. Start the SQL Server service in new machine. Login to query analyzer and
execute sp_dropserver <drop server> and use sp_addserver <new server>,Local
4. Stop and Start the SQL Server service
5. Check all the database are running fine.
6. Start the SQL Server in production server.
Have a look into Vyas's site
http://vyaskn.tripod.com/moving_sql_server.htm
Thanks
Hari
MCDBA
"Adam" <ahafner@.itape.com> wrote in message
news:B4188C24-EC76-40F1-BD02-A583C87A3075@.microsoft.com...
> I will be transferring database from one server to another along with the
master and msdb database for use as a disaster recovery server. On the
second server, I'd like to script the loading of all the databases
(including the master). I can stop the SQL Service using NET STOP
MSSQLSERVER. Then, I can place the database in single user mode using the
command "sqlservr -m". Next, I used OSQL to restore the master database
(which restores the database and stops the sql server - inherently). The
problem is that the command "sqlservr -m" leave the command shell open. I
must close the window by manually typing <ctrl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
> Thanks!
> Adam
|||I can not bring down the production server at any time during the day (24x7).
Service using NET STOP MSSQLSERVER. Then, I can place the database in single user mode using the command "sqlservr -m". Next, I used OSQL to restore the master database (which restores the database and stops the sql server - inherently). The problem is th
at the command "sqlservr -m" leave the command shell open. I must close the window by manually typing <ctrl-c> and exiting the shell. I want this to be a hands-off operation. Any suggestions?
Thanks!
Adam
First I believe if you just create a cmd file and run your sqlservr -m from
there I think it will kill the window.
Jeff Duncan
MCDBA, MCSE+I
"Adam" <ahafner@.itape.com> wrote in message
news:B4188C24-EC76-40F1-BD02-A583C87A3075@.microsoft.com...
> I will be transferring database from one server to another along with the
master and msdb database for use as a disaster recovery server. On the
second server, I'd like to script the loading of all the databases
(including the master). I can stop the SQL Service using NET STOP
MSSQLSERVER. Then, I can place the database in single user mode using the
command "sqlservr -m". Next, I used OSQL to restore the master database
(which restores the database and stops the sql server - inherently). The
problem is that the command "sqlservr -m" leave the command shell open. I
must close the window by manually typing <ctrl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
> Thanks!
> Adam
|||Have you tried the "exit" command?
----
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"Adam" <ahafner@.itape.com> wrote in message
news:B4188C24-EC76-40F1-BD02-A583C87A3075@.microsoft.com...
> I will be transferring database from one server to another along with the
master and msdb database for use as a disaster recovery server. On the
second server, I'd like to script the loading of all the databases
(including the master). I can stop the SQL Service using NET STOP
MSSQLSERVER. Then, I can place the database in single user mode using the
command "sqlservr -m". Next, I used OSQL to restore the master database
(which restores the database and stops the sql server - inherently). The
problem is that the command "sqlservr -m" leave the command shell open. I
must close the window by manually typing <ctrl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
> Thanks!
> Adam
|||When you run the "sqlservr -m" the command shell hangs until <ctrl-c> typed. If you create a .bat file with the commands "sqlservr -m" followed on the next line by "exit", the "exit" command would not be executed until the <cntrl-c> was entered to end the
"sqlservr -m" command.
|||When you run the "sqlservr -m" the command shell hangs until <ctrl-c> typed. If you create a .bat file with the commands "sqlservr -m" followed on the next line by "exit", the "exit" command would not be executed until the <cntrl-c> was entered to end the
"sqlservr -m" command.
|||"Adam" <ahafner@.itape.com> wrote in message
news:B4188C24-EC76-40F1-BD02-A583C87A3075@.microsoft.com...
> I will be transferring database from one server to another along with the
master and msdb database for use as a disaster recovery server. On the
second server, I'd like to script the loading of all the databases
(including the master). I can stop the SQL Service using NET STOP
MSSQLSERVER. Then, I can place the database in single user mode using the
command "sqlservr -m". Next, I used OSQL to restore the master database
(which restores the database and stops the sql server - inherently). The
problem is that the command "sqlservr -m" leave the command shell open. I
must close the window by manually typing <ctrl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
Try using:
start sqlservr -m
|||Try using the TSQL "SHUTDOWN" command inside the script you run through OSQL.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Adam" <ahafner@.itape.com> wrote in message news:B4188C24-EC76-40F1-BD02-A583C87A3075@.microsoft.com...
> I will be transferring database from one server to another along with the master and msdb database for use
as a disaster recovery server. On the second server, I'd like to script the loading of all the databases
(including the master). I can stop the SQL Service using NET STOP MSSQLSERVER. Then, I can place the database
in single user mode using the command "sqlservr -m". Next, I used OSQL to restore the master database (which
restores the database and stops the sql server - inherently). The problem is that the command "sqlservr -m"
leave the command shell open. I must close the window by manually typing <ctrl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
> Thanks!
> Adam
|||Hi,
Since you are setting up a Disaster recovery server, instead of restoring
the databases one one by , you have a alternate method which is very easy.
I have done this many times and succeeded always.This will work out if
you're moving to a different machine with the same logical drive layout
(Same folder structure) same as production.
Steps:-
1. Install the SQL Server and the same service pack as on your existing
machine.
2 Stop the SQL service on your old machine. Copy the entire SQL7/SQL 2000
folder and it's subfolders,
plus any separate folders containing logs or data, to the new machine.
Also copy over any other folders containing
data that you want to move to the new machine.
3. Start the SQL Server service in new machine. Login to query analyzer and
execute sp_dropserver <drop server> and use sp_addserver <new server>,Local
4. Stop and Start the SQL Server service
5. Check all the database are running fine.
6. Start the SQL Server in production server.
Have a look into Vyas's site
http://vyaskn.tripod.com/moving_sql_server.htm
Thanks
Hari
MCDBA
"Adam" <ahafner@.itape.com> wrote in message
news:B4188C24-EC76-40F1-BD02-A583C87A3075@.microsoft.com...
> I will be transferring database from one server to another along with the
master and msdb database for use as a disaster recovery server. On the
second server, I'd like to script the loading of all the databases
(including the master). I can stop the SQL Service using NET STOP
MSSQLSERVER. Then, I can place the database in single user mode using the
command "sqlservr -m". Next, I used OSQL to restore the master database
(which restores the database and stops the sql server - inherently). The
problem is that the command "sqlservr -m" leave the command shell open. I
must close the window by manually typing <ctrl-c> and exiting the shell. I
want this to be a hands-off operation. Any suggestions?
> Thanks!
> Adam
|||I can not bring down the production server at any time during the day (24x7).
Subscribe to:
Posts (Atom)