Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2008
    Posts
    186

    Unanswered: Server versus Databases?

    Hey guys,

    I'm trying to get some stuff working with users/permissions but I came across an odditiy (for me anyway).

    In the object explorer, there's 5 sub-folders underneath the server: Database, Security, Server Objects, Replication, and Management.

    Now, if I expand "Databases" I get a list of databases on the server. Now I pick a database I created (called db_test) and expand it, and now I get another list of sub-folders under db_test: Database Diagrams, tables, views, etc. There is also a "Security" sub-folder:

    My Question: What's the difference between a user added to the server, versus a user added to a particular database?

    Thanks

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Logins are added to servers. Users are added to databases. They are closely related, but still quite distinct.

    You can have users that don't have matching logins, and logins that don't have matching users. A user can exist without a login when a database is restored from another server, or when the user happens to be an application role. A login might not have access to a given database, so there would be no matching user for that login.

    -PatP

  3. #3
    Join Date
    Apr 2008
    Location
    Iasi, Romania
    Posts
    561
    Provided Answers: 2
    here is a simple explanation:
    You use a login to connect to the server: you don't have a login, you cannot connect to the server.
    For each database that login you want to be able to connect to, you must create an user: you don't have a user in the database, you cannot connect to the database.

    Of course, there are server roles/database roles/object permissions, but this is a more advanced topic.

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Its like a building with more than one office.
    You need a key to get into the building, but that does not allow you to go into any of the offices. You need additional keys to get into the offices.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  5. #5
    Join Date
    Jan 2008
    Posts
    186
    Ahhh thanks for the explanation guys. That clears things up for me

  6. #6
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Or, to use another analogy from High School....

    Server access is like getting to 1st Base on a date.
    Database access is getting to 2nd base.

    We'll leave Read and Write access until you are a little more experienced...
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  7. #7
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    i knew this one chick, she gave me xp_cmdshell access on the first date...

  8. #8
    Join Date
    Dec 2002
    Posts
    1,245
    Quote Originally Posted by jezemine
    i knew this one chick, she gave me xp_cmdshell access on the first date...
    ROTF!!!!

    That there is sig line material for somebody....



    hmscott
    Have you hugged your backup today?

  9. #9
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Quote Originally Posted by jezemine
    i knew this one chick, she gave me xp_cmdshell access on the first date...
    Now there is a virus, just waiting to be shared!

    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •