Restore with dynamic fields

jonstahurajonstahura Posts: 18
edited October 23, 2012 3:50AM in SQL Backup Previous Versions
Hi.. I don't know if anyone has done this, but I have quite a few databases I would like to restore automatically. I have a vb.net program passing variables to a stored procedure and would like the sql backup 7 to use those in the restore command... something like below:

EXECUTE master..sqlbackup '-SQL "RESTORE DATABASE [@sitename + ''_APP_'' + @DBSUFFIX]
FROM DISK = @backupfilepath WITH MOVE DATAFILES TO @dbdirectory,
MOVE LOGFILES TO @tlogdirectory, REPLACE " '

Comments

Sign In or Register to comment.