In sql 2000, I would like to write my own restore script. I am using the dbmp to administer the database and transaction log backup dumps. What I would like is a script ready for on demand use, that will query the user or system database appropriate to obtain the last *.bak dump file and restore it as a new user databas somewhere else.
My initial problem is that I can not find where the name of the backup files are stored. Can someone provide a table and column reference. I have looked in msdb's backupfile table and also msdb's sysdbmainplan* tables. The closest thing that I can find is the message column in the sysmaintplan_history table.
Is this value stored elsewhere without the message text and just the backup location filename? Additionally, does anyone have experience on creating a dynamic restore statement.
My initial problem is that I can not find where the name of the backup files are stored. Can someone provide a table and column reference. I have looked in msdb's backupfile table and also msdb's sysdbmainplan* tables. The closest thing that I can find is the message column in the sysmaintplan_history table.
Is this value stored elsewhere without the message text and just the backup location filename? Additionally, does anyone have experience on creating a dynamic restore statement.