Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3608
  • Last Modified:

"Deleting Login Failed for an Unknown Reason" message in Dynamics GP 8.0

When removing old Users from Dynamics there are a couple of users where we get the message "Deleting Login Failed for an Unknown Reason". Can anyone point me to the Tables to remove these users from?
0
TomAlford
Asked:
TomAlford
  • 2
1 Solution
 
Steve EndowMicrosoft MVP - Dynamics GPCommented:
Hi Tom,

It's been a while since I ran into this error, but there are a few possible causes.  One cause is that the user you are trying to delete has permissions in other SQL databases outside of GP.  Another is that the user exists in GP, but the SQL login or database user has already been deleted from SQL.

Another cause of this problem is when databases are migrated from one SQL Server to another (i.e. test or QA environment, or a new server build), which causes the SQL user SIDs / GUIDs to be different, actually preventing you from seeing the logins and users in the SQL tools on the new server.

My experience has been that it is typically an issue with SQL logins and users, and not with the user information in the Dynamics GP tables, but your situation could be either.

This issue is discussed in KB Article 943027, which should be accessible to you through Customer Source if you are current on  your enhancement plan.

Are you using SQL 2005 or SQL 2000?  (I don't remember if GP 8 worked with 2005, so I'll give you the scripts for both)

You can try the following and see which, if any of these work.  Before performing any of these steps, you should perform full backups of your master database, Dynamics database, and company databases.


1a) Run this script while logged in as 'sa' against the Dynamics DB and each company DB:

SQL 2005:  DROP USER <User_name>
SQL 2000:  sp_dropuser <User_name>

1b) Then run this script:

SQL 2005:

USE master
GO
DROP LOGIN <Login_name>

SQL 2000:

USE master
GO
sp_droplogin <Login_name>


After running these scripts, login to Dynamics GP as 'sa', and then select the user from the User Setup window.

When you select or enter the user ID, you may get an error that the user does not have a SQL login, which is fine.

Then click Delete to try and remove the user.


If that doesn't work, you can also try these scripts in the Dynamics database.  These are for Dynamics GP 9, but hopefully they work or are similar enough to 8 that it gives you something to start with.

 DELETE DYNAMICS..SY01400 WHERE USERID = '<User_name>'
DELETE DYNAMICS..ACTIVITY WHERE USERID = '<User_name>'
DELETE DYNAMICS..SY02000 WHERE USERID = '<User_name>'
DELETE DYNAMICS..SY60100 WHERE USERID = '<User_name>'


Let me know if any of these fix your problem, or if you run into any complications.  If you have any additional questions, just let me know.

Steve Endow
Dynamics GP MCT

0
 
Steve EndowMicrosoft MVP - Dynamics GPCommented:
Hi Tom,

Did this help resolve your issue with the logins?

Steve Endow
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now