Link to home
Start Free TrialLog in
Avatar of WingYip
WingYip

asked on

"Invalid object name" error

Hi all

We are getting the following error (very intermittently) when one of our asp.net pages calls a stored procedure which in turn calls a function on sql server.

Error occurred in DisplayResults function:
Error occurred in dbObject.GetXMLDoc function:
Invalid object name 'dbo.funcGetID'

It is always a function which is the invalid object and never a stored procedure.

The server that is erroring at the moment is a sql replication subscriber.

I'm just wondering if there is any point at which replication drops and recreates functions so that there is a split second when they cannot be called???  I would be very surprised if that is true but am looking for ideas.

This happens only once or twice a day but is very annoying.  The code works fine the rest of the time.

Wing

Only got 115 points left.  If anyone knows the answer to this then I will up the points to 250.
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Post the stored procedure with the function.
Also, please followup on these abandoned questions:
1 01/14/2005 50 Exchange Outlook - Meeting requests  Open Exchange Server
2 02/16/2005 125 Cannot connect to sql server error  Open VB.NET
Avatar of sudheeshthegreat
sudheeshthegreat

The error message:

Invalid object name 'dbo.funcGetID'

quite simply shows that the function named 'funcGetID' wasn't available in the database at the time of the stored proc execution. Since you mentioned that your server is a replication server, it would be dropping all functions/stored procs, etc. on some timely basis and then recreating them again. And if you happen to call this function during the time it is getting recreated, you would definitely get this error.
Avatar of WingYip

ASKER

Okay but if that is the case, that is awful!  With a supposedly industrial strength dbms you would hope that you can rely on this sort of thing to be bulletproof

Are you absolutely sure that this could be the case.  I would be shocked if you're right.  Please tell me where you are getting your information from.

Thanks

Wing
ASKER CERTIFIED SOLUTION
Avatar of sudheeshthegreat
sudheeshthegreat

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of WingYip

ASKER

OK

We are now looking at merge replication instead of the snapshot replication since it will not drop objects.  

Many thanks for the suggestions sudheeshthegreat.

Wing