sql-server-maintenance-solution icon indicating copy to clipboard operation
sql-server-maintenance-solution copied to clipboard

Unable to use the restore procedure with the latest commandexecute stored proc by Ola

Open sindu1489 opened this issue 3 years ago • 3 comments

hi Sir, I am trying to use this stored procedure for restore for ola backups but it throws the below error Msg 201, Level 16, State 4, Procedure CommandExecute, Line 0 [Batch Start Line 0] Procedure or function 'CommandExecute' expects parameter '@DatabaseContext', which was not supplied.

Could you please advise thanks

sindu1489 avatar May 27 '22 03:05 sindu1489

I am using BrentOzar Stored procedure for restore and am unable to proceed as it throws the below error. Msg 201, Level 16, State 4, Procedure CommandExecute, Line 0 [Batch Start Line 0] Procedure or function 'CommandExecute' expects parameter '@DatabaseContext', which was not supplied. Please kindly help sir

sindu1489 avatar May 27 '22 03:05 sindu1489

you need to update your version of brent's sp_databaserestore procedure. the older versions didn't supply this parameter. the newest version does.

powderdba avatar Aug 08 '22 20:08 powderdba

Comman

you can update commandExecute to use @DatabaseContext ='master' as default, that will bypass your issue, had the same few days ago.

CarlosGzz-SQL avatar Aug 09 '22 21:08 CarlosGzz-SQL