Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Restore statement

Author  Topic 

jung1975
Aged Yak Warrior

503 Posts

Posted - 2007-06-21 : 10:09:01
I have backup files in a BACKUP folder( it gets updated every date)
Finace061207.bak
HR061207.bak
Billing061207.bak
Clinic061207.bak

I would like to create a dynamic restore statment that gererate a DB restore statement using the backup file starts with only Finace%.bak. How can I do this?

Do i have to use a dynamic sql for this?


Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-06-21 : 10:12:56
This script should do what you want.

Create Restore Command from DB Backup File
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=71665






CODO ERGO SUM
Go to Top of Page
   

- Advertisement -