Delete Content Folder via DB

Nick shared this question 4 years ago
Answered

Hi,

We have a customer who mistakenly imported a report with its dependencies, including the data source. This caused a license breach and caused SR to be inaccessible. We were able to login as the default system admin, but as soon as we got to the Admin Console page, the user got kicked out and was brought back to the login page. Instead, we performed the following steps to add the the default system admin as part of the client org:

Insert into IpRltshp (IpParent, IpChild, RltshpTypeCode, StartDate, EndDate, EndReasonCode, InternalReferenceId, PrivacyLevelCode, RltshpLevelCode, DefReHireCode) values ( 12101, 5, 'STAFFMEMBER', '2001-01-01 00:00:00.000', '9999-12-31 00:00:00.000', NULL, NULL, NULL, NULL, NULL)

Post this, the user was able to login to SR and delete the extra data source; but now, the content folders that were imported did not get deleted.

When we try to delete them, it says that it is being used by 2 views. As the data source was deleted, it shouldn't have any associated views or reports.

Are you able to provide the queries needed to get rid of them? See attached.

We have renamed the content folders by appending 'zz' in front.

Replies (6)

photo
1

Hi Nick,

Thanks for reaching out. The Content Folders are stored in the Content Management table of the config db. If you changed your folder names by appending 'zz' in front, they should be easy enough to locate and subsequently delete directly from that table.

When running any queries directly against the Yellowfin Configuration Database it's possible to cause irrevocable data loss. Before running any queries against your Yellowfin Configuration Database, please make sure you have full, up-to-date backups of both your Yellowfin Configuration Database and your Yellowfin Installation folder. This way, if something goes wrong you can revert back to your current state.

Please take a look there and let me know how goes and whether you have any further questions.

Regards,

Mike

photo
1

Hi Mike,

Ok will give it a go.

Seems some entries get inserted in OrgReferenceCodeDesc as well.

Do these need to be deleted as well?

The other way I was thinking of doing it would be to delete the relationships from the Views but not sure in which tables they would be stored.

Thanks,

Nick

photo
1

Hi Nick,

Can you provide a screenshot and/or text output of what the suspected corresponding entries in the OrgReferenceCodeDesc table are? I don't think anything in this table should be deleted.

In terms of the other way, what relationships specifically are you looking to remove? I'm also wondering if we may be able to get away with doing this a more crude way, if the previous ideas don't wind up helping - are you able to Copy the affected report? And if so, are you then able to Edit it?

Regards,

Mike

photo
1

Hi Mike,

I've tested deleting the content from the contentmanagement table, and it seems to work as expected in my test environment. I'll let you know outcome once we have tried it on the customer's environment.

Regarding the other way, I was referring to the actual relationships between the duplicate folders and the 2 views that appear to be linked to them. This is based on the message that pops up when we try to delete the duplicate folders via the UI. I think these 2 views shouldn't exist as well and would have been a result of the user importing them when they imported the report - who knows.

From what I've seen, deleting the duplicate content folders via the contentmanagment table as you suggested should work. Happy to wait and see instead of overcomplicating...

:)

Thanks,

Nick

photo
1

Hi Nick,

Sounds good! From past experience, I'm confident deleting the folders from Content Management will do the trick, as you seem to have found in your test environment, but I'll leave this ticket open pending actually doing this in prod. I'll check back in on you in a week or so if I don't hear back on results.

Regards,

Mike

photo
1

Hi Mike,

This can be marked as complete.

Thanks for the assistance.

Nick

Leave a Comment
 
Attach a file