Search through all Customizations containing a string value?

We have many BPMs and Customizations containing hard-coded server names, which I need to identify ASAP. I know, I know, this is an awful idea, that is why I am trying to clean it up :slight_smile:

I got all the BPMs with the following SQL code:
select * from BpDirective where cast(Body as nvarchar(max)) like ‘%servername%’

But I can’t think of how to do this for customizations. I feel like I’m missing something obvious. Much of our code base is still foreign to me, and while I have spent a ton of time lately pouring over it all, I don’t quite feel comfortable enough banking on the knowledge I have…

I already have plans to improve all this, but for right now I just need to put a band-aid on it and identify everything with “servername1” and change it to “servername2”.

This post may shed some guidance…

This will do the job for you:

select *
from ice.XXXDef
where content like '%YOUR_SEARCH_TERM_HERE%'
1 Like

The post @Mark_Wonsil referenced works for older versions. The more current versions store the Client customizations in plain text (xml) in the xxxDef table Content field.

If your system has the Content field on xxxDef, that is where you would look.

1 Like

Thanks, all. Looks like I missed out on the easy way; our Live system is on 10.1.400 and XXXDef.Content doesn’t exist in the database. But I’ll keep this in mind for when we finish upgrading.

The post Mark referenced might be a bit much for me, I think I’ll just skim through manually.