Solved

SQL Server 2008 Unable to resolve table names

Posted on 2011-03-13
5
273 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 28

Expert Comment

by:Ryan McCauley
ID: 35124760
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
ID: 35124776
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
ID: 35125010
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
ID: 35125205
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
ID: 35125213
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Disable TLS1.0 on Win 2012 server 7 117
SQL Server Express or Standard? 5 63
T-SQL: How to extract records into a new table 7 44
Need more granular date groupings 4 45
     When we have to pass multiple rows of data to SQL Server, the developers either have to send one row at a time or come up with other workarounds to meet requirements like using XML to pass data, which is complex and tedious to use. There is a …
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

751 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