More on ? and catpatch.sql

When I was writing about the ? shortcut in sqlplus, I half-remembered that I’d discovered this while some time ago while looking at Oracle-supplied scripts (always a useful learning experience). So I went to check that I was right that Oracle uses this and couldn’t find an example. Annoying, because I was sure I’d seen it on previous versions. I checked various installations at work and still couldn’t find it in any scripts. Maybe Oracle stopped using it because of the problems you can run into that Jeff highlighted?

So I kept digging around trying to find an example and finally came across one in catpatch.sql. Here’s a small section :-

Rem *************************************************************************
START Component Patches */
Rem *************************************************************************


Rem Setup component script filename variable
COLUMN file_name NEW_VALUE comp_file NOPRINT;
Rem JServer
SELECT dbms_registry.script('JAVAVM','?/javavm/install/jvmpatch.sql') AS file_name FROM DUAL;
@&comp_file
SELECT dbms_registry.time_stamp('JAVAVM') AS timestamp FROM DUAL;
Rem XDK for Java
SELECT dbms_registry.script('XML','?/xdk/admin/xmlpatch.sql') AS file_name FROM DUAL;
@&comp_file
SELECT dbms_registry.time_stamp('XML') AS timestamp FROM DUAL;

Leave a comment

Your email address will not be published. Required fields are marked *