Home Forums SQL Server 2005 Backups Loading database with the latest .bak file RE: Loading database with the latest .bak file

  • Hi Steve,

    Thanks for your comments! it was great! Please stay in touch with me till I get the result on this task...

    It's only one database which needs to be restored once a day

    (11:30 pm) and all 2-3 .bak files brought in to the target server belong to this specific database but with different day time-stamps. e.i.

    dbname_backup_200810292330.bak

    dbname_backup_200810302335.bak

    dbname_backup_200810312337.bak

    what I thought was to create a server JOB and ask'em to go to this directory/file...grab the bak file and run the load script at the end.

    but i don't know how to tell the script to pick the latest file.

    As you mentioned I can not add any third party tools on the server. there are some processes...even SSIS has not been installed on this machine. (sqlserver 2005)

    I'll check for PowerShell...To write in VBScript what tools can be used? maybe one has been installed there.

    Thank you so much and talk to you later!