
set echo on;
set feedback on;

/* RESOLUTION: Run the script Dbrefrsh.sql which was delivered in previous versions for use in clearing our
   workstation cache files after an upgrade. If you don't have this script, simply adapt the sql below to run for
   'your rdbms'. This will trigger a refresh of both the workstation and application server cache files. */

UPDATE sysadm.PSLOCK SET LASTREFRESHDTTM = SYSDATE;
commit;

/*   After running this script there will be a slight performance hit as the cache files are rebuilt. 

   Be sure to run the Dbrefrsh.sql when the application server domain is DOWN! When the column
   LASTREFRESHDTTM is updated, the effect is to purge the cache files when the files are accessed by a
   process the first time, also called opening a cache file. The process will first read the
   LASTREFRESHDTTM from PSLOCK, then compare this datetime with the datetime on the cache file (a
   cache file contains a datetime to reflect when the file was created). If the two datetime values are different, the
   cache file is purged. But this comparison occurs only when a cache file is accessed by a process the first time.
   After that, the process uses the cache file without comparing the datetime values again. In 3-tier situation,
   since appserver has been up, the comparison will not be done, so the cache files are not purged/refreshed. */