Problem with user creation

avatar

Hi,
we use RDM with MS SQL backend. We face trouble after moving RDM database to new SQL server. In many cases when I create new user in writes him error message when he is trying to add or delete something(when he adds new session, he see error -error is attached- but after confirming this error message he is able to see new session - but nobody else see this session). He is able to browse existing sessions without problem.
Because of this problem I tried to create new database on same SQL server, but when I try to create users in this new database, RDM is showing error message: "Unable to save user in the database ! The server principal '................' already exists". It is logical that login already exists because same user was created in first database.
Thank you for your help,
Olda

error.pdf

All Comments (15)

avatar

Hello,

I think that you are victim of orphaned users. Follow https://msdn.microsoft.com/en-us/library/ms175475.aspx to confirm this is the case and to fix the issue.

Hopefully this will be sufficient to resolve your issues, but I'll wait to have news to identity further steps.

Best regards,

Maurice

avatar

Hello,
it is not this case. problem with error message is just during saving new session. User can browse all data and it is the same even if I delete user in RDM, after I delete user through SQL studio (in RDM database and also in server login list) and then I recreate user once more with RDM (without error) and still I'm not able to create or delete. User can just browse existing sessions. I can resolve this problem by giving to this user db_owner on RDM database, but it is not good solution.

Second problem is that if I create second RDM database on same SQL server I cannot create same user which already exists in first database (user uses domain authentication) with error "Unable to save user in the database ! The server principal '................' already exists"

avatar

Hello,









Maurice

avatar

- I will try in with clearing the cache. Just it looks to me little bit strange because we use just read only cache
- I see that there are some grant/deny permission, What I don't understand that it is not functioning even when I create user once more from zero. User is member of security group with create and delete permissions.
- problem is that if I clear option "Create SQL Server Login and User", user is created in RDM but it is not created in RMD_database/security/users so user is not able to connect this data source (user has login on database server because he is using different database on server, but there is no user definition in this new specific RDM database). Configuration option is creating both or nothing. In our case we need to create just user inside this RDM databse.

avatar

so it looks I misunderstood some RDM settings. Now I see that every user must have in his permission rights for add, edit and delete. I hoped that it is enough to give permission in security group. So it looks like points 1 and 2 are solved. Just point 3 with creating user in RDM which already has login on SQL server but he does not have account in RDM database security/users

avatar

Hello,

Indeed, we have renamed these three permissions to Rights to try to make it easier to understand.

For your last error, you need to uncheck the option as described above




Maurice

avatar

If user already has his login in SQL server (because he is using some different DB on server), I create new RDM database and then I try to create new user (with disabled option Create SQL Server login and user) in RDM client which is authenticating with account already having login in SQL server, user is not able to access database because he has no access to database.
How to do it right if user has login but he hasn't account in DB_NAME/Security/Users/? I know that I can create user on my own. I just want to know if there is some way how to do it with RDM or I have to solve this common situation by myself.

Olda

avatar

It does work, that why we created the option. Maybe its caused by the login/user issues that you have experienced?

Can you try in on your original server?

Maurice

avatar

BTW If user doesn't have these three permissions in Rights (insert, edit, delete) but belongs to some security groups which have permissions to insert, edit and delete it will be logical to block user and doesn't let him to insert, edit or delete anything. It looks strange to see error message in case when software knows that user doesn't have permission to edit anything.

avatar

its a limitation that we have, roles used to exist only for our Server product that integrates with AD.

We implemented roles for SQL Server as well, but they are less capable.

Maurice

avatar

answer to your last message:

If I understand well: in SQL server you need to have your account in two places

1) /security/logins/
2) /databases/RDM_DB_name/security/users

I have account just in first place, because I use other database on server. In this case I can't create new user with this "create SQL login option" but on other hand if I don't use this option, there will be no account on second place mentioned above. So solution in this case is, that I will not use this create option and I have to create account by myself on second place? I'm asking just because it look to me like very common case ....

Olda

avatar

indeed there are two different objects: logins and users

when you move a db to another server, you may get issues of orphaned users as my first response indicated.

When you create the user, but the login already exists, you will see an informational message that the login exists. it is information in the sense that if you know that the login exists, you can just go on.

If you do not want to see the warning message, uncheck the option and manage the logins/users manually, that what I had understood was your concern.

Maurice

avatar

Hi Maurice

I'm in the process of switching my users from a local db to a SQL db. I'm creating the users by adding them from AD, and since all the users have logged into the SQL server they already have a login for SQL, so when creating an account i get the message that informational message that the account already exists.
However when i export the sql db source file sql.rdd from my administrators machine and import it into my user's computer, i get the error: Unable to connect to the server - Cannot open user default database. Login Failed.
On the SQL server my users aren't listed in the Security-Users container.
Can you tell me what i should be doing to get these users to connect and what the proper way to create users in the scenario.
thanks

avatar

Please send me your email address by private message, we will book a gotomeeting sessions.

Best regards,

Maurice

avatar

Update on twoj's issue

The user creation is failing for an unknown reason. The logins all exists on the server, but users do not exist for our database. The normal workflow in this case is to check the "create login and user in the database" option, this displays an informational message that the login already exists, but it should continue on with the user creation.

The workaround in his case is to grant access to the login directly using SQL Mgmt studio.

We are investigating the issue.

Maurice