Article ID: 127806, created on Dec 20, 2015, last review on Dec 20, 2015

  • Applies to:
  • Plesk Automation 11.5

Symptoms

Cannot create MSSQL database user

 Error: Unable to perform an operation on the database server: User does not have permission to perform this action. 

The following output is in /usr/local/psa/admin/logs/panel.log

2015-07-28T21:49:13+01:00 DEBUG (7)  [panel]: 0, script = mssqlmng, version = 1.0, args=--add-user --server=203.0.113.2\\MSSQLSERVER2008 --login=dbadmin01 --password=******* --database=fab
ricsAlyn --new-user-login=odin_1, stdin=, status=FAILED
[28-Jul-2015 21:49:13 Europe/London] PleskUtilException: Remote execution failed with code 1.

stdout:
User does not have permission to perform this action.

Cause

Incorrect login name under db owner properties in MSSQL Management Studio > Databases > db_name -> Security > Users > dbo > Properties .

The user set there should be the one the DB server was registered with. In this example it should be 'dbadmin01'.

Resolution

  1. Create backup of the database new user should be created for.
  2. Find the username the DB server was registered with (execute on management node):

    # plesk db
    # mysql> select admin_login from DatabaseServers where host = "203.0.113.2\\MSSQLSERVER2008";
    +-------------+
    | admin_login |
    +-------------+
    | dbadmin01   |
    +-------------+
    1 row in set (0.00 sec)
    

    NOTE: The username can also be found in the error output in /usr/local/psa/admin/logs/panel.log - see snippet unser "Symptoms" paragraph.

  3. Open SQL Management studio and connect to affected MSSQL server.
  4. In the SQL management studio interface click "New Query" (Ctrl+N) and execute the following code:

    use [testdatabase];
    alter authorization on database::"testdatabase" to dbadmin01;
    

    , where 'testdatabase' is the name of the database the user should be added to.

Search Words

unable to add database user

Error: Unable to perform an operation on the database server: User does not have permission to perform this action

Website suspended

User does not have permission to perform this action

33a70544d00d562bbc5b17762c4ed2b3 caea8340e2d186a540518d08602aa065 e0aff7830fa22f92062ee4db78133079

Email subscription for changes to this article
Save as PDF