Oracle8i SQLJ Developer's Guide and Reference
Release 3 (8.1.7)

Part Number A83723-01

Library

Product

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

SQLCheckerCustomizer for Profile Semantics-Checking

Oracle provides a special customizer, SQLCheckerCustomizer, that will perform semantics-checking on a profile that was produced during previous execution of the translator. This semantics-checking is similar to what is normally performed during translation of the source code.

This is particularly useful when the database to be used at runtime differs from what was available to use for semantics-checking during translation. In these circumstances, you can use SQLCheckerCustomizer after deployment, against the runtime database, typically in a scenario where the source code is no longer available.

You can specify the checker to use. If you accept the default OracleChecker front end, SQLCheckerCustomizer will perform online semantics-checking using an appropriate online checker.


Note:

For online semantics-checking of the profile, you must also specify connection parameters using the customizer harness connection options.  


Invoking SQLCheckerCustomizer with the Customizer Harness verify Option

Following are examples of how to specify the Oracle customizer harness verify option to run SQLCheckerCustomizer in its default mode. Because it defaults to an online checker, you typically must provide connection parameters through the customizer harness user, password, and url options. (The first example is a single wrap-around command line.)

sqlj -P-verify -P-user=scott -P-password=tiger -P-url=jdbc:oracle:oci8:@ 
Foo_SJProfile0.ser Bar_SJProfile0.ser

sqlj -P-verify -P-user=scott -P-password=tiger -P-url=jdbc:oracle:oci8:@ *.ser

The verify option results in the customizer harness instantiating and invoking the following class:

sqlj.runtime.profile.util.SQLCheckerCustomizer

This class coordinates semantics-checking of the SQL operations in the profile. You can specify a semantics-checker or accept the default OracleChecker semantics-checker front end.

The -P-verify option is equivalent to the following:

 -P-customizer=sqlj.runtime.profile.util.SQLCheckerCustomizer

This overrides the customizer specified in the SQLJ -default-customizer option.


Notes:

  • As with any Oracle customizer, help output and an option list will be provided if you specify -P-verify together with -P-help on the SQLJ command line.

  • It is important to realize that because the verify option invokes a customizer, and only one customizer can run in any single running of SQLJ, you cannot do any other customization when you use this option.

  • You also cannot use more than one of -P-print, -P-debug, and -P-verify simultaneously, because each of these invokes a specialized customizer.

 

Command-line syntax
sqlj -P-verify <conn params> profile_list
Command-line example
sqlj -P-verify <conn params> Foo_SJProfile*.ser
Properties file syntax

profile.verify

(You must also specify profiles, and typically customizer harness connection options, in the SQLJ command line.)

Properties file example

profile.verify

(You must also specify profiles, and typically customizer harness connection options, in the SQLJ command line.)

Default value

n/a

SQLCheckerCustomizer Options

Like any customizer, SQLCheckerCustomizer has its own options, which can be set using the -P-C prefix on the SQLJ command line (or profile.C, instead of -P-C, in a SQLJ properties file).

SQLCheckerCustomizer supports the following options:

SQLCheckerCustomizer Semantics-Checker Option (checker)

The checker option allows you to specify the semantics-checker to use in checking the SQL operations in a profile.

This defaults to the Oracle semantics-checker front end, oracle.sqlj.checker.OracleChecker, which for SQLCheckerCustomizer chooses an appropriate online checker for your environment. For more information about OracleChecker, see "Semantics-Checkers and the OracleChecker Front End (default checker)".)

Following is a full command-line example, showing how to use the SQLCheckerCustomizer checker option, in conjunction with the customizer harness verify option and connection options.

sqlj -P-verify -P-user=scott -P-password=tiger -P-url=jdbc:oracle:oci8:@ 
-P-Cchecker=abc.def.MyChecker *.ser

(This is a single wrap-around command line.)

Command-line syntax
-P-Cchecker=checker_class
Command-line example
-P-Cchecker=a.b.c.MyChecker
Properties file syntax
profile.Cchecker=checker_class
Properties file example
profile.Cchecker=a.b.c.MyChecker
Default value
oracle.sqlj.checker.OracleChecker

SQLCheckerCustomizer Warnings Option (warn)

The warn option is equivalent to the SQLJ translator -warn option, allowing you to choose the categories of warnings and messages to be displayed as semantics-checking is performed on a profile.

For a complete description of the functionality and possible settings of these options, see "Translator Warnings (-warn)".

This defaults to the all,noverbose,noportable settings, resulting in all warning categories except verbose and portable being enabled. You will receive any warnings regarding data precision, conversion loss for nullable data, and strict matching for named iterators. These are the same defaults as for warnings during SQLJ translation.

Following is a full command-line example, showing how to use the SQLCheckerCustomizer warn option, in conjunction with the customizer harness verify option and connection options. This would result in only portability warnings being displayed.

sqlj -P-verify -P-user=scott -P-password=tiger -P-url=jdbc:oracle:oci8:@ 
-P-Cwarn=none,portable *.ser

(This is a single wrap-around command line.)

Command-line syntax
-P-Cwarn=comma-separated_list_of_flags
Command-line example
-P-Cwarn=none,verbose
Properties file syntax
profile.Cwarn=comma-separated_list_of_flags
Properties file example
profile.Cwarn=none,verbose
Default value
all,noverbose,noportable



Go to previous page
Go to beginning of chapter
Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index