Mass disable users in Pilot? SQL?


(Adam) #1

In E9, we would disable all users via a query like this:

UPDATE [EpicorPilot905].[dbo].[UserFile]
SET UserDisabled = ‘1’
WHERE ( (DcdUserID != ‘GLORIAK’) AND (DcdUserID != ‘manager’))

HOWEVER, in E10 that same query doesn’t seem to work. All the “UserDiabled” fields get set to 1, but users can still log in and the “User Disable” button does not show up as blue.


(Joseph Moeller) #2

Adam, in E10 there is both a Erp.UserFile table as well as a Ice.SysUserFile table.

I hope this helps.
-jm


(Adam) #3

I’m running it on the Erp side… should I also do the same on the ICE table?

UPDATE [EpicorERPPilot].[Erp].[UserFile]
SET UserDisabled = ‘1’
WHERE ( (DcdUserID != ‘GLORIAK’) AND (DcdUserID != ‘manager’))


(Joseph Moeller) #4

You’ll want to do this on the Ice table also. Keep in mind in this table, the DcdUserID is replaced with UserID, so your SQL would look like this:

UPDATE [EpicorERPPilot].[Ice].[SysUserFile]
SET UserDisabled = '1'
WHERE ( (UserID != 'GLORIAK') AND (UserID != 'manager'))

Safe harbor: run at your own risk only on non-production systems.


(Adam) #5

Perfect, thanks!


(Mark Wonsil) #6

Mr. “I Don’t EVER DO DIRECT DATABASE UPDATES” says,

I download the Active Users who are not MANAGER and then set up a DMT to Disable them. When I want to restore the users, I just flip the switch. In the above example, you don’t know which users to enable if they were previously disabled.

Mark W.


(Joseph Moeller) #7

Mark, you’re correct. I actually edited my response, but I had included some mention of using a command line DMT and service connect when that was the only automated option for E9, but decided to remove for succinctness.


(Adam) #8

With the SQL route, when I reenable a person or two they need to get a temporary password reset. Am I able to avoid this via the DMT route? Also, when you say you “download the active users”, what do you mean? How so?