Re: who is the owner..

From: Aaron Bertrand - MVP (aaron_at_TRASHaspfaq.com)
Date: 05/18/04


Date: Tue, 18 May 2004 14:02:33 -0400

I don't understand the problem.

CREATE TABLE dbo.tablename(// table definition //)
GO

GRANT SELECT, INSERT, UPDATE, DELETE ON dbo.tablename TO myuser
GO

-- 
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"dev" <anonymous@discussions.microsoft.com> wrote in message
news:1DAD8AEB-6B1F-48F2-A2EC-098B4610DAD3@microsoft.com...
> Hi,
>
> In various posts here and there I read that
> 1> if using SQL Authentication then instead of using the sa login to
access the instance, we should create a new login (and it's new mapped
user )and use it for our applications' interaction with the db.
> 2> that the dbo should remain the owner of the databases and also
> 3> that the owner of the database is the user who created it.
>
> So if I follow 1> above then how can I ensure 2>.  What is the way to
achieve this.  I mean to have my own login and user (let's talk about a
system where my app talks to the db always as one user, for e.g. myuser) but
still have dbo as the owner of my tables etc...
>
> Am I making sense.
>
> Thanks again.


Relevant Pages

  • Re: New DBs DBO does not have an associated login name
    ... so the database does have an owner. ... Add the NT login as a valid login in its own right, ... >> SQL Server MVP ...
    (microsoft.public.sqlserver.setup)
  • Re: SQL 2005 dbo user issue
    ... Who does it say is the owner on the files page of the properties dialog? ... > but I still get the same error when clicking the Database Diagrams folder: ... >> Kalen Delaney, SQL Server MVP ... >>> The problem is the dbo account that came over appears to be incomplete. ...
    (microsoft.public.sqlserver.security)
  • Re: Sql Maintenance Plans
    ... You can change the owner of the job in EM, ... Tibor Karaszi, SQL Server MVP ... "Ale S." ... >> Tibor Karaszi, SQL Server MVP ...
    (microsoft.public.sqlserver.server)
  • Re: How many objects are owned by schema
    ... CREATE USER no_login WITHOUT LOGIN ... Schema and objects must be owned by a valid database principal but the database principal doesn't necessarily need to be associated with a login for ownership purposes. ... Tibor Karaszi, SQL Server MVP ... ALTER AUTHORIZATION ON OBJECT::dbo.testtable TO myself; ...
    (microsoft.public.sqlserver.programming)
  • Re: restoring dB and login to new server
    ... Tibor Karaszi, SQL Server MVP ... that looks like it would simplify things a bit...but I still need to create the login manually? ... databases between servers by doing a full backup, then restoring on the new ... database, I get an error that the "user or role already exists". ...
    (microsoft.public.sqlserver.tools)