Hi,
I am completely iliterate on SQL Server. Using just common sense and some
basic DB knowledge, along withnet references, I created a database which is
accessed through a VB.net GUI.
My application creates an Access string and uses Windows Authentication for
all users that access the databse.
I noticed that through the intervention of the Sever Admin I was owner of
all the Tables, both mine and the "default" system ones.
But as soon as i changed something or when i copied it the database to a
development server, the owner of the changed/copied tables became me (my
username). This creates problems as any other user that has a login, and
permissions from me (owner) still cannot access the database!.. Only when
the permissions come from the dbo, is the user able to use the application
and querry the database.
Now, when i run :
sp_changeobjectowner tblCodesQA, dbo
on Query Analyzer, i get the following message:
Server: Msg 15505, Level 16, State 1, Procedure sp_changeobjectowner, Line
63
Cannot change owner of object 'tblCodesQA' or one of its child objects
because the new owner 'dbo' already has an object with the same name.
*However* after a refresh, or at least Disconnect-Connect, i see that the
above table has dbo as the new owner !! and of course all designated users
can access the interface.
My question is:
1) why?
2) why sp_changedbowner doesn't work
TIA
-steveHi,
If the object owner is not DBO then you need to prefix ownername.tablename
wqhile querying. I am not able to exactly say why this happen and
it got solved after a DB restore. The major chance for this is some one have
changed created the same table in a differerent user, say like this
select * into table from dbo.table
This is the only cjhnace I can think of.
2. Since there is an object with same name in the same database the
sp_changeobjectowner procedure failed.
Thanks
Hari
SQL Server MVP
"steve" <steve@.here.com> wrote in message
news:nk8ge.35541$vN2.885312@.wagner.videotron.net...
> Hi,
> I am completely iliterate on SQL Server. Using just common sense and some
> basic DB knowledge, along withnet references, I created a database which
is
> accessed through a VB.net GUI.
> My application creates an Access string and uses Windows Authentication
for
> all users that access the databse.
> I noticed that through the intervention of the Sever Admin I was owner of
> all the Tables, both mine and the "default" system ones.
> But as soon as i changed something or when i copied it the database to a
> development server, the owner of the changed/copied tables became me (my
> username). This creates problems as any other user that has a login, and
> permissions from me (owner) still cannot access the database!.. Only when
> the permissions come from the dbo, is the user able to use the application
> and querry the database.
> Now, when i run :
> sp_changeobjectowner tblCodesQA, dbo
> on Query Analyzer, i get the following message:
> Server: Msg 15505, Level 16, State 1, Procedure sp_changeobjectowner, Line
> 63
> Cannot change owner of object 'tblCodesQA' or one of its child objects
> because the new owner 'dbo' already has an object with the same name.
> *However* after a refresh, or at least Disconnect-Connect, i see that the
> above table has dbo as the new owner !! and of course all designated users
> can access the interface.
> My question is:
> 1) why?
> 2) why sp_changedbowner doesn't work
> TIA
> -steve
>|||Xref: TK2MSFTNGP08.phx.gbl microsoft.public.sqlserver.server:391361
Thanx for your response.
However, this happened as soon as i copied my tables into a new development
server.
Without changing anything
The tables belonged to dbo in the original server. I copied to the
development server and they now belong to my.
I enter the command, get an error but after a refresh it seems that the
command worked...
"Hari Prasad" <hari_prasad_k@.hotmail.com> a crit dans le message de news:
OEPJlscVFHA.2420@.TK2MSFTNGP12.phx.gbl...
> Hi,
> If the object owner is not DBO then you need to prefix ownername.tablename
> wqhile querying. I am not able to exactly say why this happen and
> it got solved after a DB restore. The major chance for this is some one
> have
> changed created the same table in a differerent user, say like this
> select * into table from dbo.table
> This is the only cjhnace I can think of.
> 2. Since there is an object with same name in the same database the
> sp_changeobjectowner procedure failed.
> Thanks
> Hari
> SQL Server MVP
>
> "steve" <steve@.here.com> wrote in message
> news:nk8ge.35541$vN2.885312@.wagner.videotron.net...
> is
> for
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment