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.