SQL Server Restore Database Action not expanding variables

Hi,

When I put a variable in the Database/Restore from File box, the command just passes the variable to the code rather than expanding it.

Thanks,

- David Scheidt

Hi David,

Thanks for reporting this bug. I’ll let you know when the new test build is available.

Regards,
Paul.

Thanks Paul!

One other tiny request… In the SQL Backup command, one cannot specify a file name. I’m trying to do a backup/restore from one database server to another, and it would be helpful to have the filename be ‘static’. I can get around that now by doing the file list into a variable, so it’s not critical.

Thanks again!
- David Scheidt

Hi David,

The new build should be available soon.

In regards to the output filename, the tool which the action uses (SqlMaint - http://msdn2.microsoft.com/en-us/library/ms162827.aspx) does not support specifying the filename, only the path. Your current work-around would be the best method to get the filename of the file, you could also use a date/time filter on the fileset to only include files which were created after the action had started, which would guarantee only the new backup file was included.

Regards,
Paul.

Wow! That was FAST! When you said ‘soon’, I was thinking near the end of the week, not 2 hours later!

Thanks guys! I’ll give it a try. And, I’ll try the timestamp solution too.

Thanks again,
- David Scheidt

Paul,
The parameter expansion works, but… When I try to do a restore, I get a timeout error after 30 seconds! The backup works fine, BTW.

Thanks again!
- David Scheidt

Hi David,

Have you tried checking “Set Database to Single User Mode while Restoring” on the Database tab of the action properties? Does this resolve the timeout?

If not does the log contain any additional information about the timeout?

Regards,
Paul.

Hi Paul,
Unfortunately, setting the ‘Set Database to Single User Mode while Restoring’ did not help. The exact error from the log that I am getting is:

Could not restore backup: Timeout expired

If you guys are using a SQL command to run the restore, you might be getting a timeout on the connection.

Hope that helps!
- David Scheidt

Hi David,

I’ve increased the timeout on the connection in the latest test build.

Download: http://www.automise.com/downloads/automise/200/AT200_91.exe

Regards,
Paul.

Paul,

That worked!  Thanks for the fast response!

Thanks again,

- David Scheidt