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
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Invalid Object Name

Author  Topic 

GregDDDD
Posting Yak Master

120 Posts

Posted - 2012-01-12 : 17:56:53
I'm transferring a group of tables and stored procedures from SQL Server 2005 on to an instance of SQL Server 2008 Express so I can reverse engineer it and modify it. For the most part getting it to SS Express is fairly straight forward.

In the image below, you can see there is a table called 'dbo.data_IPA_DM_Medications' that shows in the object explorer, but in the query window it says invalid object. If I type dbo and period the intellisense window pops up and that table is not listed. Neither is the 'data_IPA_DM_retinal_exams' table, but all other table and objects appear.

What is causing this? At the top of the query window I have 'USE [dbname] GO' and the db is selected in the drop down list on the toolbar.

The errors on the sp calls at the top of the window are known issues because I have not created this yet.

Greg

X002548
Not Just a Number

15586 Posts

Posted - 2012-01-12 : 18:18:04
intellisense....has an IQ of 2

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2012-01-12 : 18:23:56
I'd suggest commenting out the calls to the missing sprocs and see what impact that has on the subsequent error messages. Also, I'm assuming that you have rights to the schema objects.

=================================================
Men shout to avoid listening to one another. -Miguel de Unamuno
Go to Top of Page

GregDDDD
Posting Yak Master

120 Posts

Posted - 2012-01-12 : 18:34:57
Thanks for the reply.

Not only did I comment out every broken sp line, but I commented out everything in the query window except that 1 select line with the invalid object table.

This is SS Express on a laptop which I installed 2 years ago. It is the same Windows Authentication account I use for everything. I have all server roles and there is only the one schema.

If I open a new query window and type 'select * from ' and then drag and drop the table name in to position I still get 'invalid object name'.

Greg
Go to Top of Page

GregDDDD
Posting Yak Master

120 Posts

Posted - 2012-01-12 : 18:37:59
I rebooted the laptop and the problem went away. SS Express must have had binary indigestion.

Sorry about that.

Greg
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2012-01-12 : 18:46:20
Edit -> Intellisense -> Refresh Local Cache (Ctrl-Shift-R)

All it is is an out-of-date cache. The intellisense cache is freshed on a schedule (I can't remember what) and it's reasonably low so as not to impact any server you may be connected to.

If you'd run any of those statements, they would have succeeded.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

GregDDDD
Posting Yak Master

120 Posts

Posted - 2012-01-12 : 19:08:00
Good to know. Thank you. I spend most of my time SS 2005, which doesn't have intellisense. Despite the problems, I still love it.

Greg
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2012-01-12 : 19:10:38
2 words: RedGate SQLPrompt

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -