Re: Novice - Owner / Setuser

From: Kresimir Radosevic (kresimir.radosevic@zg.tel.hr)
Date: 11/30/02


From: "Kresimir Radosevic" <kresimir.radosevic@zg.tel.hr>
Date: Sat, 30 Nov 2002 11:30:04 +0100


If you do not specify object owner sql server assumes that database is
current database and owner is current login. If object is not found in your
schema it is searched in dbo schema. But there is a simple rule - always use
object owner.

-- 
Kresimir Radosevic, SQL MVP
I support the Professional Association for SQL Server and its user community
of dedicated professionals.
www.sqlpass.org
"Martin Thorpe" <mthorpe@sterlinginsurancegroup.com> wrote in message 
news:1592f01c2949e$3558a260$89f82ecf@TK2MSFTNGXA01...
> Hi
>
> I notice in the Northwind database you can run a query
> without puting in the owner name ie "Select field1 from
> Mytable".
>
> I have created a database but even if I use
> SETUSER 'Company' I still have to put the owner ie "Select
> Field1 from Company.MyTable.
>
> Can anyone explain this or point me in the right
> direction, I cant find anything in the online help, but
> then I am probobly looking in the wrong area.
>
> Regards
> Martin 


Relevant Pages

  • Re: Cannot view DB properties
    ... # Ran the setup and upgraded the existing SQL Server 8.00.818 to SQL Server ... owner was NULL after the UPgraded finished successfully. ... The proposed new database owner is already a user or aliased in the ... Sorry, I don't understand, what do you mean by "In-Place Upgrade"? ...
    (microsoft.public.sqlserver.security)
  • Re: HELP - I goofed when creating a database
    ... details) go to which date record - is not stored in your database; ... some reading on the merits of SQL Server vs Access. ... you select the owner or enter a new one, enter the date ordered, then ... ownerID - PK ...
    (comp.databases.ms-access)
  • Re: Confused about dbo
    ... Jasper Smith (SQL Server MVP) ... > database within a SQL Server instance. ... > There are several ways you could have the username dbo. ... > the true owner of the database. ...
    (microsoft.public.sqlserver.security)
  • Re: Lock of Object if i create users with a script file
    ... You should be able to change the owner of a view while it is being used, ... What hardware is your SQL Server running on? ... My work is to create/add database users on an existingsql server. ...
    (microsoft.public.sqlserver.security)
  • Re: Cannot view DB properties
    ... # Ran the setup and upgraded the existing SQL Server 8.00.818 to SQL Server ... # I have like 20 databases and only for 5 databases I noticed that database ... owner was NULL after the UPgraded finished successfully. ... Sorry, I don't understand, what do you mean by "In-Place Upgrade"? ...
    (microsoft.public.sqlserver.security)