Re: restore using wildcard

From: Eric Sabine (mopar41_at_____h_o_t_m_a_i_l_._ScPoAmM)
Date: 03/05/04


Date: Fri, 5 Mar 2004 12:29:01 -0500

But you wouldn't want to restore all of the backups as in theory the * would
do for you. Do you just want to automate the restoration of the _last_
backup? Since all backups are being written to new files, then utilize
xp_cmdshell and the DIR command to find the newest filename. Then build
your script dynamically. Alternatively, you could backup your database to
the same file and then do a RESTORE FILELISTONLY and get the position number
(most likely the MAX one) and restore by specifying the position.

hth
Eric

"JT" <anonymous@discussions.microsoft.com> wrote in message
news:7f6501c402d5$15714190$a101280a@phx.gbl...
> i have a scheduled backup that occurs on a nightly basis.
> the backup file is given a name with a date stamp - so
> that each day the name is unique.
>
> im wondering if it is possible to use a wildcard character
> when specifying what file to restore
>
> for example:
>
> restore database spp_temp
> from disk = 'c:\DevBkup\DevBkup03032004.bak'
>
> but this won't work:
> restore database spp_temp
> from disk = 'c:\DevBkup\DevBkup*.bak'
>
> any suggestions would be greatly appreciated
>
> thanks
>
> jt
>



Relevant Pages

  • Backup and Restore Files
    ... What is the best way to backup and restore a runtime database file? ... pszDisplayName As String ...
    (microsoft.public.access.gettingstarted)
  • Re: Prob. to Restore Database
    ... > If I restore my old db Using Enterpise Manager (with ... > 10, RECOVERY, REPLACE ... >>Perhaps the backup is a file or filegroup backup? ... >>> But this option is supported from RESTORE DATABASE ...
    (microsoft.public.sqlserver.server)
  • Re: [opensuse] About Backing Up
    ... there is a data failure we can restore. ... the restoration is to get the backup file that we first complete as it ... failure, physical destruction, or it has been half inched. ... Other data should be archived to media. ...
    (SuSE)
  • Re: Exchange in Recovery Mode
    ... On the backup SBS server, did you restore Mailbox Store from backup ... After Mailbox Store was restored, ... Create a Recovery Storage Group. ... Restore the backup to Recovery Storage Group with NTbackup. ...
    (microsoft.public.windows.server.sbs)
  • Re: Computer problem, need help
    ... >>> defining the three levels of backup and recovery. ... >>> has been corrupted, use backup and restore. ... >>hard drives and a reliable backup utility like Ghost. ... doesn't work I use my preferred backup utility, ...
    (soc.retirement)