Admin rights on Server

  • I am tasked with updating the SQL Servers in my company. I have an admin account that I use to login into the servers.

    I have recently upgraded a server to the latest CU. When I tried to access any database it says "The database xxxxxx is not accessible"

    When I go into Logins, my username is there as Public,

    User Mapping, I get "One of more databases are inaccessible and will not be display in list"

    Why cant I access any of these databases and delete my login.

    When I try and delete my login I get "Cannot drop the login xxxxxxxx because it dos not exist or you do not have permission"

    Darryl Wilson
    darrylw99@hotmail.com

  • Having an admin account for the server doesn't necessarily mean you'll have access to the database instance. (Our Windows engineers don't, but they are obviously server admins.)

    Regarding User Mapping, that's a fairly normal informational message that might just mean either some databases are offline, or maybe they're secondary replicas in an AG setup (or mirroring).

    What (if any) access should you have to the SQL instance (not the server)? Are you a DBA?

     

  • Yeah, agreed. In fact, it's a great practice to have a different account administering SQL Server instances on the box and one administering the operating system. It's the right kind of approach to help prevent hacking.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Agree with Grant and Beatrix.

    The login you have, are you able to get into sql with it? Im assuming yes, based on your question and it also sounds like its an AD account cause you can use it on more than one server.

    You need to check what sql server rights that account has. The below code will show you all members of sysadmin group which is what you need to be in.

    SELECT sys.server_role_members.role_principal_id, role.name AS RoleName,

    sys.server_role_members.member_principal_id, member.name AS MemberName

    FROM sys.server_role_members

    JOIN sys.server_principals AS role

    ON sys.server_role_members.role_principal_id = role.principal_id

    JOIN sys.server_principals AS member

    ON sys.server_role_members.member_principal_id = member.principal_id

    TBH I'd expect this to fail cause it sounds like you only have a public access login.

    Ultimately you need to speak to the DBA (or closest equivalent) and either get them to do your checks or grant you access (if this is the case BE CAREFUL!).

    Adam Zacks-------------------------------------------Be Nice, Or Leave

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply