|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello,
When I have to restore a number of Logs, I have to change the FILE number in the RESTORE command manually. Is there a way to automatically restore *all* log files? Thank You Joachim |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Nope. Sorry.
Either do the restore using EM/SSMS GUI based on backup history. This assumes that you restore on the same instance as where the backups were taken. Or write some TSQL code to push result from RESTORE HEADERONLY into some table and have a cursor loop that table and do the restore from inside that cursor. There's nothing ready-made for this at the TSQL level I'm afraid... -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi "Joachim Hofmann" <speicher@freenet.de> wrote in message news:e5Ybr8RDJHA.3268@TK2MSFTNGP03.phx.gbl... > Hello, > > When I have to restore a number of Logs, I have to change the FILE number in the RESTORE command > manually. > Is there a way to automatically restore *all* log files? > > Thank You > > Joachim |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
In addition to Tibor's excellent advise, make sure that only the last
restore includes WITH RECOVERY and all the others are WITH NORECOVERY. The GUI would do this automatically for you. -- HTH Kalen Delaney, SQL Server MVP www.InsideSQLServer.com www.SQLTuners.com "Joachim Hofmann" <speicher@freenet.de> wrote in message news:e5Ybr8RDJHA.3268@TK2MSFTNGP03.phx.gbl... > Hello, > > When I have to restore a number of Logs, I have to change the FILE number > in the RESTORE command manually. > Is there a way to automatically restore *all* log files? > > Thank You > > Joachim |
|
![]() |
| Outils de la discussion | |
|
|