Solved

SQL Server 2008 Unable to resolve table names

Posted on 2011-03-13
5
269 Views
Last Modified: 2012-05-11

We've upgraded our database from 2000 to 2008 (using this method in case it's important: http://msdn.microsoft.com/en-us/library/ms189625.aspx).  

We are now testing this and are having a problem with resolving table names from our .NET website.  Using Enterprise Mgr I've verified that the tables are there.  Plus if I use the schema/owner name and the table name it works.

This works:
       "select *, C.ClientName FROM portal.UserTable U"

For the user I'm using to connect to the database the default schema is set to 'portal' when I check that user's properties, but that doesn't seem to make a difference.

Our system is full of non-fully qualified names, so I would really like to figure out how to get the default to work so I don't have to go through the entire system and make changes to the table names in the queries.

Thanks for the help.
0
Comment
Question by:hzuker44
  • 3
5 Comments
 
LVL 28

Expert Comment

by:Ryan McCauley
Comment Utility
What's the exact error you receive when you "can't resolve the name" - something like "object does not exist"? The exact message will help the troubleshooting immensely.
0
 

Author Comment

by:hzuker44
Comment Utility
When I execute the query:

    "select * FROM UserTable U"


The resulting error message is:

    Invalid object name 'UserTable'.
0
 
LVL 11

Accepted Solution

by:
JoeNuvo earned 500 total points
Comment Utility
you might need to consider change the table schema to be 'dbo' instead of 'Portal'

http://blogs.x2line.com/al/articles/155.aspx
0
 

Author Comment

by:hzuker44
Comment Utility
Well this solution works for us.  But it would still be nice to know why the default schmea setting didn't worked.

Thanks
0
 

Author Closing Comment

by:hzuker44
Comment Utility
It solved the problem.  It did work around our issue so we didn't have to fix the source of the problem.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now