Dynamics - Find Dynamics Users that do not have a database login

Here's a nice little script sent in by Tonya from AceMicrotech; it will give you the name of the Dynamics users that don't have a corresponding SQL login - the kind of thing that might happen if you're migrating servers or have an 'incident' in the SQL security panel. <smiles>

 

SELECT  USERID
FROM    DYNAMICS..SY01400
WHERE   USERID NOT IN ( SELECT  name
                        FROM    sys.syslogins
                        WHERE   name NOT LIKE '##%'
                                AND isntname = 0
                                AND hasaccess = 1 )

RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences