We originally set up our database so that some of the tables were owned by dbo and the rest by another user (call it SYS/username for this example). All was fine and I wrote several views and stored procedures. When I learned enough to know that they should all be dbo, I had the administrator change all the tables to be owned by dbo. Now all SPROCS , tables, and views are owned by dbo. Good. Now any time I try to run anything (SPROC or view) I always get a variation on this error (it only changes by the name of the object I tried to execute/access)…
[Microsoft][ODBC SQL Server Driver][SQL Server] Invalid object name ‘SYS\username.tbl0010CallDetail’.
I had removed all traces of SYS\username references in the code of the objects but it is still imbedded.
Is there an easy way to tell SQL Server to rebuild using the new code so that the SYS\username references go away? Is it possible that the SPROC is not being run by dbo but actually SYS\username when run out of Query Analyzer (the name of all SPROCS are qualified with [dbo]).