Re: cannot login to the db after...

From: Jasper Smith (jasper_smith9_at_hotmail.com)
Date: 07/09/03

  • Next message: Ray Higdon: "Re: Views in one database that lock tables in anouther 2"
    Date: Wed, 9 Jul 2003 21:24:49 +0100
    
    

    You would need to qualify the objects with the owner name
    for your application to work. System administrators map to the
    dbo user in the database and so when you issue a

    select * from mytable

    it will resolve this to

    select * from dbo.mytable

    where what you actually have is sqluser1.mytable

    As a member of the db_owner role you can choose to to
    create your objects with dbo as the owner but only if you specify
    it explicitly i.e. if you are sqluser1 and db_owner (not sysadmin)

    create table dbo.mytable(....) will create dbo.mytable

    create table mytable(....) will create sqluser1.mytable

    -- 
    HTH
    Jasper Smith (SQL Server MVP)
    I support PASS - the definitive, global
    community for SQL Server professionals -
    http://www.sqlpass.org
    "Mitra Fatholahi" <mitra928@hotmail.com> wrote in message
    news:9c6d01c3464b$de2fec40$a401280a@phx.gbl...
    Hello Everyone,
    I have created a new database, "db_1", using the "sa"
    account. I then created a new login, "sqluser1" and gave
    her the access to my "db_1" database. Please note that I
    did NOT give this new login any of the Server Roles in the
    Login properties dialog box. The Database Roles i gave to
    this new login were "public" and "db_owner".
    Then I created my tables using my new login "sqluser1".
    After tables were created, in SQL Server EM I
    saw "sqluser1" being listed under the Owner column for all
    the tables that i created.
    I was able to run my program using "sqluser1" login and
    passwrod.
    However, after i gave the "sqluser1" the "System
    Administrator" Server Role i had problem running my
    program using the same login, "sqluser1" , and password.
    Can someone please explain to me why this is the case. I
    thought the Server Role, "System Administrator" is
    permited to perform all activities on a SQL Server 2000.
    Thank you for your help. Appreciated!
    -Mitra
    

  • Next message: Ray Higdon: "Re: Views in one database that lock tables in anouther 2"

    Relevant Pages

    • Re: System Administrator Implied Permissions
      ... > sa login, it assigns it the System Administrator fixed ... > Now, given this, why does SQL Server ... in each database is always a member of the public and db_owner roles. ... Other sysadmin role members have the exact same ...
      (microsoft.public.sqlserver.security)
    • Re: No db access after publishing web site
      ... GRANT UPDATE TO ... If I detach and attach this database on a different PC (according that PC ... Cannot open database "pago" requested by the login. ... Are you detaching/attaching the SQL Server Express database correctly ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Cant view merge agent properties (trying again)
      ... In the List of Actions for the Snapshot Agent History I see this repeated: ... every single database listed. ... So, just now, I went to computername\Administrator Login ID (because it's ... On the computer running SQL Server, ...
      (microsoft.public.sqlserver.replication)
    • Re: Database security design with ASP.net and form-based authentication
      ... Since you already have forms-based security, why not use a single SQL login ... for all database access? ... data entry, guest/view only, admin, report viewer. ... so I'm using SQL Server authentication. ...
      (microsoft.public.sqlserver.security)
    • cannot login to the db after...
      ... I then created a new login, ... her the access to my "db_1" database. ... Then I created my tables using my new login "sqluser1". ... Administrator" Server Role i had problem running my ...
      (microsoft.public.sqlserver.security)