2

I have a stored procedure in my database (say it is CustomerDB) which joins with a table function in a different database (say it is dbPerformance), the sp is something like:

select something from CustomerDB.dbo.CustoemrData left join 
                dbPerformance.dbo.FnPerformanceDayEnd(CustoemrData.Code, 1,1)

The dbPerformance database contains quite a lot of data and to update the data, DBA actually first populate the new data into a db called dbPerformanceNew, when the new database is ready, it will restore the dbPerformance database from dbPerformanceNew.

Randomly I see error from such as

Invalid object name 'dbPerformance.dbo.FnPerformanceDayEnd' from my sp. The timing does related to the time that the old database dbPerformance was being restored from dbPerformanceNew.

My confusion is that when the restore happens, it already has all the data and all the functions. I thought at least I should see error like dbPerformance database is unavailable (as the dbPerformanceNew database is being restored), other than some objects are not available.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.