Yup. It all works as expected now. Thank you very much.
Let me ask you one more question
When I run EXEC sp_ABRestoreDb 'Newluis', 'C:\temp\08-23-05-staffingdb' the database is created successfully and the DB files (MDF and LDF) are both created under the default backup directory.
How can I tell your script to use a different location for the physical files? In other words, instead of creating the following:
C:\Program Files\Microsoft SQL Server\MSSQL\Data\Newluis_data.MDF
C:\Program Files\Microsoft SQL Server\MSSQL\Data\Newluis_log.LDF
I want the following:
C:\temp\Newluis_data.MDF
C:\temp\Newluis_log.LDF
Where temp is a directory I pass as a parameter. Is this possible?