SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Owner has to qualify?!


Owner has to qualify?!

Author
Message
PurviD
PurviD
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 1

Hi!

I am executing a stored procedure that is inserting into tblInfo. The owner of this table is AppUser and it is this user that is logging in and excuting this sp. But I get the following error:

Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'tblInfo'.

I know this table exists and this setup works on all the other servers it's on but this one.

I got the same error when I ran the following in QA, again logged in as Appuser:

select * from tblInfo

insert into tblInfo (sName, dDate) values ('Bob', getdate())

unless the table is owner qualified (AppUser.tblInfo)!

WHY!

Anybody have an idea?

Thanks in advance!!





Sopheap Suy
Sopheap Suy
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1249 Visits: 357

because it was looking for dbo.tblinfo table. That is the problem all the time when you don't create the table with dbo.tablename. It is sometimes a hasle to clean up after user, and sometimes some process failed as a result of this extra feature.

mom





PurviD
PurviD
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 1

But why is it looking for dbo.tblInfo when I am logged in as Appuser. And why is it that this sp works on ever other server i've installed on, except this one! There must be some config or something, no?

And no, I can't make dbo the owner. It is a requirement that a named owner is assigned.

Thanks,

Purvi





Sopheap Suy
Sopheap Suy
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1249 Visits: 357

That is how sql internal function. It assume you are looking for dbo.table name unless you qualify it.

mom





Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search