BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
balraj
Quartz | Level 8

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
jklaverstijn
Rhodochrosite | Level 12

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

7 REPLIES 7
Kurt_Bremser
Super User

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.

balraj
Quartz | Level 8

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 

Kurt_Bremser
Super User

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.

balraj
Quartz | Level 8

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

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

 

 

jklaverstijn
Rhodochrosite | Level 12

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.

balraj
Quartz | Level 8

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

Kurt_Bremser
Super User

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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