• Here is my test results:

    if i run from MyDB it executes sp_XYZ that is in MyDB

    if i run from master it executes sp_XYZ that is in master

    if i run from other than MyDB or master ,error:

    "Msg 2812, Level 16, State 62, Line 5

    Could not find stored procedure 'dbo.sp_XYZ'