Solved

SQL Server 2008 Unable to resolve table names

Posted on 2011-03-13
5
274 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

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…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

617 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