• hiram.osiris (12/6/2011)


    Hi

    Thanks for the script, it is very helpfull, I just have one doubt, since i haven't gone deep into the script, is this script taking the last differential backups? in my case I'm doing differential backups every day and a full backup on sundays, a new backup file is made once a new week starts, following this name structure: YYYYMMDD_HHMM_NumerofWeekInTheYear_DBNAME.BAK. EXAMPLE: 20110807_1000_42_Employees.bak; therefore, one backup file has 6 differential backups and 1 full backup, that's why I'd like to know if it is getting the most recent differential backup or if I need to modify the script ... sorry if I misspelled some words, I'm not an english speaker, and I'm also starting into the Databases world. 🙂

    Hi hiram,

    The order of the backup file is based on the result of the cmdshell operation in the script. You can try running the script (just dont uncomment EXEC (@restoredb)) and you will see which backup will be restored first. Compare the result to the folder where the backup resides.

    P.S.

    Don't worry I am not a pure English speaker as well 😉

    "-=Still Learning=-"

    Lester Policarpio