|
-
Oct 7th, 2008, 08:23 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] I need help with default schema
Hi!
A user is complaining about a database I have set up. The setup is like this:
I created a database A
I created a login Donald
I created a user Donald
The user Donald has Donald as the default schema. So in database A all tables looks like this
Donald.TableA
Donald.TableB
...
The login Donald is connected to the database A, user Donald and default schema Donald.
The problem is that when the user log on , he must write
select * from Donald.TableA Where.....
He wants to write select * from TableA..
I am rather new to SQL Server 2005, what have I missed here? I am using Management Studio..
The connection stirng looks like this:
Provider=SQLNCLI;Server=.\SQLEXPRESS;Database=A;User ID=Donald;Password=pass;Default Schema=Donald"
kind regards
Henrik
Last edited by MrNorth; Oct 7th, 2008 at 08:31 AM.
-
Oct 7th, 2008, 03:00 PM
#2
Re: I need help with default schema
Have they tried "select * from tableA" ? It works for me on our databases. But I did read some where that qualifying the table with the schema is better for performance?
That is the very essence of human beings and our very unique capability to perform complex reasoning and actually use our perception to further our understanding of things. We like to solve problems. -Kleinma
Does your code in post #46 look like my code in #45? No, it doesn't. Therefore, wrong is how it looks. - jmcilhinney
-
Oct 7th, 2008, 03:50 PM
#3
Thread Starter
Frenzied Member
Re: I need help with default schema
Hi!
Yes that is the question he wants to run. But then he get a message stating that TableA doesn not exist, unknown object. But teh same questy when using Donald. in front of the table name works perfect.
what have I missed?
/HEnrik
-
Oct 7th, 2008, 05:22 PM
#4
Re: I need help with default schema
I think SQL Server always checks dbo for tables, other then that you need to put schema in
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Oct 8th, 2008, 02:58 AM
#5
Thread Starter
Frenzied Member
Re: I need help with default schema
Hi!
Yes I think there is something with the dbo... any suggestion on how I should change it?
kind regards
Henrik
-
Oct 8th, 2008, 06:46 AM
#6
Re: I need help with default schema
I always put the schema name if the object is not in the dbo schema.
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Oct 8th, 2008, 08:44 AM
#7
Thread Starter
Frenzied Member
Re: I need help with default schema
Ok!
I solved the problem by manually change the ownership of the tables from Donald to dbo, now it works, thanks!
/Henrik
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|