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

Hi,

 

In our SAS environment Users are added in SAS Metadata through Macros. The users are created and maintained in Active Directory. SAS macros fetch information from Active Directory and load the user information in SAS Metadata. There is an AD group eg. AD_SAS in which all the users are present who need SAS right.

Whenever new user need right in SAS, we ask active directory support team to add user in AD_SAS ad group. And then there is one script(importad.sas) which runs every day at 04:00 AM and it loads user information in SAS Metadata Foundation.

But it seems there is some issue because the logs starting showing error starting from 01.01.2016.

Below are the error messages:-

 

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.


ERROR: Validation errors detected by %mduchgv. Load not attempted.
ERROR: Errors printed on pages 25,26.

 

And since then no New users which are in ad group AD_SAS are being able to add in SAS as I cannot see them in SAS Management Console-->User Managers

 

Could you guys let me know what is the issue here and how can I fix this.

 

Regards,

Amit

1 ACCEPTED SOLUTION

Accepted Solutions
AmitSingh
Obsidian | Level 7

Thanks a lot Timmy for the quick respose and fixing the issue. 

 

Just to summarize, the issue was due to change/update done for one User's informatoin in Active Directory. Due to which SAS Macro's were giving error while executing as there were two records in mduchgverrors. 

So deleted the user which was mentioned in the mduchgverrors from SAS Management Console and take Metadata backup before making changes in the SAS Mangement Console. 

After that execute the same script(importad_sync.sas) from SAS EG and the new users which were waiting got added in SAS. 

View solution in original post

11 REPLIES 11
Timmy2383
Lapis Lazuli | Level 10

If this is anything like my own setup, there should be a library called "updates" in the program.  This output library should have the dataset "mduchgverrors" in it.  You will want to look at that dataset and see the records on it.  It should be able to help you figure out what IDs/users are causing issues.

 

Usually it's an issue of where it's trying to create a duplicate user, which would violate integrity constraints.  I've seen it happen in my own job with a couple users whose IDs from my data source were not matching the expected format, so it tried to create a duplicate user in metadata.  I had to remove the users from metadata and then rerun the import job so they were recreated properly.

 

 

AmitSingh
Obsidian | Level 7
Thanks for the quick reply.
In our environment SAS is installed on Linux. So as per your suggestion, I tried to find mduchgverrors and got one file mduchgverrors.sas7bdat. I opened this file with SAS EG but unfortunately there is no row/data present in this file. This is empty.

Could you suggest something else.
Timmy2383
Lapis Lazuli | Level 10

Your job may not be configured to output the datasets to a permanent location.  Your log said the dataset was going to the WORK library.

 

Can you rerun the job in interactive mode (like in Enterprise Guide) and then check the mduchgverrors dataset that is create in the WORK library?

AmitSingh
Obsidian | Level 7
Yes, you are correct. The file mduchgverrors.sas7bdat is not changing, I just checked it was last modified in April'2014.
As I said earlier that the Linux script importad_sync.sas (in which all parameters the Library names and Macros defined) runs daily 04:00 AM on the Linux server. And I am aware if/how can I execute it interactively(on SAS EG). It is a .sh script which supposed to be run at specific path on server.
Timmy2383
Lapis Lazuli | Level 10

Can you provide the importad_sync.sas and .sh files?

AmitSingh
Obsidian | Level 7

Here are the files.

The website was not accepting .sh , so i changed the extension to .doc. But the content is same.

Timmy2383
Lapis Lazuli | Level 10

You should be able to run the "importad_sync" code in EG without any problems and then analyze the mduchgverrors datasets that is your WORK library (assuming you can log into EG as the same user that runs the batch job, or assuming you have modify writes to the adload, meta and updates libraries).

 

Personally, I would make the following changes so you will always have a saved copy of the last output of "mduchgverrors" after it runs in batch...

 

Change this:

%mduchgv(change=updates, target=meta, temp=work, errorsds=work.mduchgverrors);

To this:

 

%mduchgv(change=updates, target=meta, temp=work, errorsds=updates.mduchgverrors);
AmitSingh
Obsidian | Level 7

Thanks for the inputs!!
I ran the importad_sync.sas from SAS EG and it executed with the same error which I mentioned in my post. But I am not able to find mduchgverrors anywhere in SAS EG and neither is any change on the server file mduchgverrors.sas7bdat. However other library files got updated with my user id.

AmitSingh
Obsidian | Level 7

Thanks a lot Timmy for the quick respose and fixing the issue. 

 

Just to summarize, the issue was due to change/update done for one User's informatoin in Active Directory. Due to which SAS Macro's were giving error while executing as there were two records in mduchgverrors. 

So deleted the user which was mentioned in the mduchgverrors from SAS Management Console and take Metadata backup before making changes in the SAS Mangement Console. 

After that execute the same script(importad_sync.sas) from SAS EG and the new users which were waiting got added in SAS. 

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!

Discussion stats
  • 11 replies
  • 3205 views
  • 2 likes
  • 2 in conversation