June 11, 2015

Messing with J2EE destinations on the tables

We had a case where we had to touch the destinations of a portal directly from the DB (Not recommended by SAP) to avoid a bigger impact.

We used the following query first to get all the destinations from the DB:
SELECT p.CID, p.CPATH, v.ISFILE, v.NAME, v.VSTR
FROM SAPSR3DB.J2EE_CONFIG p, SAPSR3DB.J2EE_CONFIGENTRY v
WHERE v.CID=p.CID and p.CPATH like 'destination%' and v.NAME='~URL' and v.VSTR like '%oldhost%'
ORDER BY  p.CPATH;

Once we identified the RFCs that should be modified we updated the table with the following query:
update SAPSR3DB.J2EE_CONFIGENTRY set VSTR='http://newhost:50100/AdobeDocumentServices/Config?style=document' where CID=-9223372036987567321 and NAME='~URL';
COMMIT;