Quantcast
Channel: Microsoft Dynamics GP
Viewing all articles
Browse latest Browse all 59474

Forum Post: RE: Deleting Users from SQL

$
0
0

Hello There;

I can explain why you have the issues and a fix.

Please not that for GP there are 3 logins (sort of) to think about.

1 - the GP user account, the one found within the GP database

2 - the SQL Account - the one found under security - logins in SQL Mgmt Studio

3 - the Database User Account - the one found under security users within the actual database in SQL Mgmt Studio

When you create a user in GP, it creates a SQL Login, and a database user in the DYNAMICS database

The differetiation is important - 1 exists in the MASTER database tables and tells SQL that you have access to the SQL instance

the other exists in the database itself

When you add users to companies via GP, then a subsequent database user account is added to the company database

These database users are 'connected' to the SQL Login; but note they are not one in the same.

When you backup a database and restore it between SQL instances either on the same server or different server, OR you copy a LIVE company over a TEST company within the same instance, the database user follows the database;  however the SQL Login does not unless you backup and restore the MASTER database also.

So because of this you have many scenarios for disconnects between users in the DYNAMICS database tables (SY01400 etc) and SQL Logins on the SQL server\instance and DATABASE users

Typically the FASTEST way to fix this;

If you look at SQL and the LOGIN exists (at the server level, Security - Logins) and the User also exists in the DYNAMICS database then you can normally just go to the COMPANY database and delete the account via SQL Mgmt Studio

Back in GP you can now add the user to the company

This works if GP says the user doesnt have access to the company but SQL shows the user as present in the database

Now, if GP shows the user as HAVING access to a company database; but the user cannot login - this is usually because the Database User account is missing in SQL, but within the DYNAMICS security tables, the user is present.

In this case if you open the User Access Screen, start at the top and arrow down past all of the users GP will automatically SYNC the accounts in GP and grant ACCESS in the right company databases

NOTE that this will NOT work if the user is MISSING from the DYNAMICS database in SQL (workaround - simply pop in SQL and grant the account access to DYNAMICS manually and add to DYNGRP)

If users are missing from SQL and you want to sync up the environments you can use a simple SQL script

Let me know if this helps at all or if you need a better explaination or more information and I will do my best to mae it all make sense for you.

(In SQL 2012 with contained database the MASTER database/User Database doesnt exist - but because GP users a multi database model this will not ever work :-(  )

Cheers

Ian


Viewing all articles
Browse latest Browse all 59474

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>