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

Dear Friends,

 

I did a blunder of deleting some tables from a library through SAS EG. I realized it and created them again and reregistered them in the SAS DI studio.

Now the DI jobs are throwing error that the tables were deleted outside the DI job. It’s not showing the tables names but the Metadata ID’s of the tables.

 

Thankfully I have metadata id’s of the deleted tables through which I able to know which are the tables. However when I check the recreated/registered table properties its shows a different Metadata ID.

 

I think if we can find a way to restore the old ID's for those deleted/recreated table that will solve the issue. The question is how we can do it and if we have some metadata instruction code which can force the table to change its metadata ID. 

 

Or if we have any other way to solve this. 

 

Regards,

Suvi

1 ACCEPTED SOLUTION

Accepted Solutions
Patrick
Opal | Level 21

The metadata id's are generated and internal to SAS metadata. Even if you would find a way don't even try to change these ID's as you would very highly likely severely corrupt SAS metadata.

 

From what you describe you didn't only delete the physical tables but you actually deleted the SAS Metadata table objects. The recreated objects are different objects so the DIS jobs won't know about them and are now broken.

 

Sooo... IF you're lucky and got a .spk with these jobs before you broke them then it's simple:

1. Take a backup of your current metadata (or at least export all the broken jobs into a .spk)

2. Delete the broken jobs.

3. Import the jobs from the good .spk
    - SAS uses the metadata NAMES for import so here if your new metadata table objects got the same name then the jobs will link to these tables during import.

 

IF you haven't got a .spk with good jobs then things will become more complicated.

Option A

Manually fix all your broken jobs

Option B

- Have an admin do a rollback of SAS metadata to the latest point available before you deleted SAS metadata.

- Create a .spk of all the jobs you've broken

- Have the admin restore metadata to the latest point in time

- Import your .spk

Option C

....or if you're in a small environment then you get eventually away by just asking for a rollback to the latest state before your blunder and then re-apply manually all the changes done since the date of the backup used.

 

 

 

View solution in original post

4 REPLIES 4
Patrick
Opal | Level 21

The metadata id's are generated and internal to SAS metadata. Even if you would find a way don't even try to change these ID's as you would very highly likely severely corrupt SAS metadata.

 

From what you describe you didn't only delete the physical tables but you actually deleted the SAS Metadata table objects. The recreated objects are different objects so the DIS jobs won't know about them and are now broken.

 

Sooo... IF you're lucky and got a .spk with these jobs before you broke them then it's simple:

1. Take a backup of your current metadata (or at least export all the broken jobs into a .spk)

2. Delete the broken jobs.

3. Import the jobs from the good .spk
    - SAS uses the metadata NAMES for import so here if your new metadata table objects got the same name then the jobs will link to these tables during import.

 

IF you haven't got a .spk with good jobs then things will become more complicated.

Option A

Manually fix all your broken jobs

Option B

- Have an admin do a rollback of SAS metadata to the latest point available before you deleted SAS metadata.

- Create a .spk of all the jobs you've broken

- Have the admin restore metadata to the latest point in time

- Import your .spk

Option C

....or if you're in a small environment then you get eventually away by just asking for a rollback to the latest state before your blunder and then re-apply manually all the changes done since the date of the backup used.

 

 

 

Suvi2020
Fluorite | Level 6
Thanks Patrick!

I will be going for option B.
Patrick
Opal | Level 21

@Suvi2020 wrote:
Thanks Patrick!

I will be going for option B.

Make sure you also include the dependent table objects in the .spk

SASKiwi
PROC Star

Typically SAS metadata repositories are backed up each night. You could restore your complete repository from yesterday as long as you are sure of backing out all changes since then. To be safe you could take a current backup and if the restore of yesterday's metadata doesn't fix your problem, just restore from your current backup and you will be back to normal again. SAS Management Console makes this all pretty easy. 

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1283 views
  • 1 like
  • 3 in conversation