When running the configuration wizard while upgrading a History Database (HDB), it is observed that the 'dbo.QBM_PFunctionDrop' function was removed from the original HDB in the middle of running the wizard, resulting in the upgrade to fail with the following error:
" Database error 2812: Could not find stored procedure 'dbo.QBM_PFunctionDrop'"
At the same time, the subsequent crash report from which the above error is presented showed successful executions of the same procedure:
"SqlLog (9 ms) - exec QBM_PFunctionDrop 'QBM_FCVStringToDatetime' "
Although the crash reports showed execution of 'QBM_FunctionDrop' was successful, there is significant difference between the successful execution and the one that failed.
The successful runs called the function with the following syntax:
exec QBM_PFunctionDrop '...'
The error execution on the other hand happens with the following notation:
exec dbo.QBM_PFunctionDrop '....'
Possible cause: for the execution of dbo.QBM_PFunctionDrop to execute successfully, it's necessary that the SQL user used for the upgrade has the default schema "dbo". In this case it doesn't matter if a procedure is called with or without the prefix "dbo.".
Check the settings of the SQL user and ensure the user has the default schema "dbo":
For more information on creating SQL Logins, including mappings, please refer to the Microsoft Doc, Create a Login.