Desktop productivity for business analysts and programmers

SAS ImportAD error

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 80
Accepted Solution

SAS ImportAD error

Hi Community,

 

I'm importing my users from AD to SAS VA. While Importing I'm getting this error.

 

ERROR:  Change data contains changes that will violate integrity constraints in the server or cause other errors during this or 
future synchronizations.  See work.mduchgverrors for information regarding problems encountered.

This error is due to the same user available in  AD and SMC.

How should I code so that it updates the Same user in SMC without giving any exceptions. 

 

I'm follwing this link

http://support.sas.com/documentation/cdl/en/bisecag/61133/HTML/default/viewer.htm#a003066464.htm

attached is the code which I used.

 

Kind Regards,

Balraj.P

 


Accepted Solutions
Solution
‎04-15-2016 06:32 AM
Super Contributor
Posts: 414

Re: SAS ImportAD error

If what I suspect is the case, that you have manually entered a person in metadata that matches an AD identity, you could edit the ExternalIdentity attribute of that person to match whatever you use for the sync process. This trics the code into thinking it was entered by the AD sync. It would open up the existing user for updates from the sync process and get rid of the errors.

 

Hope this helps,

- Jan.

View solution in original post


All Replies
Super User
Posts: 7,424

Re: SAS ImportAD error

The simple solution is to delete the user that is already present in the metadata, or change the name so that it does not interfere.

It may also be that you have two userid's in AD that share the same identification keys (names, most likely). These need to be corrected.

The "primary key" for users in SAS metadata are the names.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Frequent Contributor
Posts: 80

Re: SAS ImportAD error

Can't we update the user in metadata, because if there are many users whose data is updated(suppose they are added to a different group in AD) in this scenario selecting each user in SMC and deleting them is not suggestable. Please guide me if any best approach is available to implement it.

 

Kind Regards,

Balraj.P 

Super User
Posts: 7,424

Re: SAS ImportAD error

Positively make sure you do not have doubles in AD.

I never had problems with updating existing users, as long as those were the result of a previous synchronization with the SAS-supplied macros. Manually created users will always give you problems.

But I never updated from AD, only from the UNIX passwd/group files.

Since you get datasets that document possible synchronization errors, you could automate the deletion from there.

But I suspect that changes were done in AD that skewer the import/comparison logic in the macros.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Frequent Contributor
Posts: 80

Re: SAS ImportAD error

Well it worked perfectly, what i understood is either creation of user/group do it at the AD level not in SMC. Thanks alot Smiley Happy

Now I've a question

1. How can I Schedule this code?

2. In code I've specified Absolute Path, how should i modify the code when I make it to work at Server Level or after Scheduling?

 

Kind Regards,

Balraj.P

 

 

Solution
‎04-15-2016 06:32 AM
Super Contributor
Posts: 414

Re: SAS ImportAD error

If what I suspect is the case, that you have manually entered a person in metadata that matches an AD identity, you could edit the ExternalIdentity attribute of that person to match whatever you use for the sync process. This trics the code into thinking it was entered by the AD sync. It would open up the existing user for updates from the sync process and get rid of the errors.

 

Hope this helps,

- Jan.

Frequent Contributor
Posts: 80

Re: SAS ImportAD error

Hi @jklaverstijn

 

I opened SMC and found External Identities can you guide me what values I've to fill in for "External Identies" a sample would be a great help.

"Context" : <your value>

"Identifier": <your value>

"Import Type" : <your value>

 

Kind Regards,

Balraj.P

Super User
Posts: 7,424

Re: SAS ImportAD error

There will be a part in the SAS code where the Identifier is built.

In my case, the variable is called keyid and set to the numerical UNIX userid (not the username used to login). In the metadata, the Identifier is then set to U_nnnnnn, nnnnnn being the numerical ID (the keyid) from UNIX.

The Context is set to IdentityImport.

I suggest you look at some users that have been successfully imported from AD and at the AD attributes of the users where the import failed to get a feel for what should be set.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 621 views
  • 3 likes
  • 3 in conversation