|
|
|
|
||||||
![]() |
|
|
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: |
Did you see our replies to your earlier post with that same question?
-- 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:%23tuX9TcDJHA.2060@TK2MSFTNGP05.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: |
Tibor Karaszi wrote:
> Did you see our replies to your earlier post with that same question? > I searched for older posts, but I only found topics like "truncating log". Please give me a hint. Joachim |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Tibor Karaszi wrote:
> Did you see our replies to your earlier post with that same question? > Ah, now I understand: No, for unknown reason I dont see my earlier post, so I posted twice. Joachim |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
Here's my reply to your earlier post:
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... And here's Kalen's additions: 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. -- 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:uNR8uGeDJHA.5316@TK2MSFTNGP04.phx.gbl... > Tibor Karaszi wrote: >> Did you see our replies to your earlier post with that same question? >> > > Ah, now I understand: No, for unknown reason I dont see my earlier post, so I posted twice. > > Joachim |
|
![]() |
| Outils de la discussion | |
|
|