Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL server2000-invalid object name

Author  Topic 

johngokul
Starting Member

2 Posts

Posted - 2014-04-01 : 14:32:09
HI People,


i have a application in which i get "invalid object name "tablename" " sometimes. and its will be fixed if i do a IIS restart.

can anyone tel me y is it caused?

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2014-04-01 : 17:06:33
That error message is generated by SQL Server when a query that you sent to it either cannot find the table, (perhaps because the table does not exist at all, or the user under which the query is running does not have permissions to the table, or the table is in a different schema).

That when you restart IIS server the problem does not appear is likely just a coincidence, especially as you indicated, the problem is happening only sometimes. Of course, I am simply guessing - I have seen code where people create and drop tables frequently in code, so if your code is creating and dropping tables as part of the business logic, it may be a logical error - i.e., you dropped a table and then you may be trying to run a query against that table.
Go to Top of Page

johngokul
Starting Member

2 Posts

Posted - 2014-04-02 : 09:09:32
this application is around 10 15 yrs old, and the tables do exist in real, and there is no dropping of the tables.

please help
Go to Top of Page

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2014-04-02 : 15:01:51
One way to debug would be to run profiler on the SQL Server (filtered for the table name that you see in the error message), and look at the query that the SQL Server receives when the error occurred. Other than that, based on the information you have provided, I am not able to guess where the problem might be.
Go to Top of Page
   

- Advertisement -