PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.server > Restoring a number of logs (SQL2K)
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Restoring a number of logs (SQL2K)

Réponse
 
LinkBack Outils de la discussion
Vieux 02/09/2008, 19h13   #1
Joachim Hofmann
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Restoring a number of logs (SQL2K)

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
  Réponse avec citation
Vieux 02/09/2008, 19h31   #2
Tibor Karaszi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Restoring a number of logs (SQL2K)

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



  Réponse avec citation
Vieux 02/09/2008, 19h48   #3
Kalen Delaney
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Restoring a number of logs (SQL2K)

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



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 08h03.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07670 seconds with 11 queries