Re: object can't be accessed unless owner is specified - SQL 2000



"Erland Sommarskog" wrote:

The you did the restore, and now the SELECT above would fail with error
208, Object not found. However, "SELECT ... FROM Sune.tbl" would fail.

The only reasonable explanation is that at this point Sune was the
database owner, and thus the login Sune mapped to dbo and had dbo
as its default schema.


Thx for the reply. Both did NOT fail, the qualfied query with the owner
worked.
Sune (continuing your example) was the database owner and owned the objects
as well. Sune wasn't mapped to anything (not even sa, which I thought was
weird but I have seen that, and our test env. reflected that and it still
worked. Regardless I mapped it to sa and that didn't fix it). The
default database was the correct user database.

Does SQL 2000 actually have schemas ? It mimics them, but I didn't think
there was a place to define that.

We fixed it (sorry, I should've included that in my original post) by
transfering the objects to owner dbo, and creating a new login / user and
mapped that to dbo itself.
.



Relevant Pages

  • Re: Will anyone know this?
    ... You can determine if your login is the database owner with sp_helpdb. ... The only required user in a SQL Server database is dbo and this special ...
    (microsoft.public.sqlserver.security)
  • Re: Developer design Best Practices
    ... > test - they develop them and then I move them, and the owner is dbo. ... > There is NO DBO User in our dev database!! ... just means it is owned by the database owner, ... to have a busy dba monitoring development servers. ...
    (microsoft.public.sqlserver.server)
  • Re: Groups for dbo
    ... Thanks for the instructions on changing the database owner...I suspect ... While dbo is SUPPOSED to be a special user that's not used for routine ... It's probably safer to change the database owner in any event, ... >> I'm still fairly new to SQL Server, and I'm trying to figure something ...
    (microsoft.public.sqlserver.security)
  • Re: Roles & Users
    ... DBO is simply a user name in a database, albeit a special, privileged one. ... It is the user name assumed by the login listed in sysdatabases as the ... database owner, as well as by any logins in the sysadmin role, or any login ...
    (microsoft.public.sqlserver.server)
  • Re: object cant be accessed unless owner is specified - SQL 2000
    ... To access objects in Sune schema, ... Sune was not mapped to dbo - nothing at all was, not even sa (odd, I know, ... Erland - is now the database owner on the SQL 2000 taskpad. ...
    (microsoft.public.sqlserver.security)

Quantcast