sp_jreconfig

Description

Manages the Java PCA/JVM. Enables or disables arguments and directives, changes configuration values, and reports configuration values.

NoteYou can safely change the pca_jvm_module_path, pca_jvm_work_dir, pca_jvm_dbg_agent_port, pca_jvm_java_dbg_agent_suspend, pca_jvm_java_options and pca_jvm_netio arguments. Do not use sp_jreconfig to change other arguments or directives unless instructed to do so by Sybase Technical Support.

Syntax

sp_jreconfig {
	add array_arg, new_string |
	array_clear array_arg |
	array_enable array_arg |
	array_disable array_arg |
	delete array_arg, string_value |
	disable { directive | argument | array_arg, string_value } | 
	enable { directive | argument | array_arg, string_value } |
	list { list_type [, formatted ] | units | units, units_type[, formatted ] } |
	reload_config |
	report { directive[, formatted ] | directive, args[, formatted ]
		|argument[, formatted ] } |
	update { argument, old_value, new_value } }

Parameters

add

adds a new argument to an argument array. Use add only with arguments where units_type is array.

array_arg

is the name of an argument where units_type is array.

new_string

is the string value for a new array element.

array_clear

deletes all element in an argument array.

array_enable

enables all elements in an argument array. Sets each array element to enabled.

array_disable

disables, but does not delete, all elements in an argument array. Sets each element to disabled.

delete

removes an existing element from an argument array. Use delete only with arguments where units_type is array.

disable

disables the specified directive or argument.

string_value

identifies an array element in the named argument array that is to be deleted, enabled, or disabled.

directive

is the name of a valid directive.

argument

is the name of a valid argument.

enable

enables a directive or an argument.

list

lists groups of related arguments as, for example, sp_jreconfig list, directives or sp_jreconfig list, enabled. Also, lists all arguments of a specific type as, for example, sp_jreconfig list, units, string. To see all current units_types values, use sp_jreconfig list, units.

formatted

formats the displayed list for readability; longer values may be truncated.

NoteIn formatted reports, the process of improving readability may truncate wide columns. In addition, column headings may be overridden and may not match the actual table name. Do not format reports if the output will be parsed or potential data truncation is not acceptable.

list_type

specifies a type of list. Values are:

  • directives – list of directives

  • enabled – list of enabled arguments

  • disabled – list of disabled arguments

  • argnames – list of argument names, each argument’s units_type, and the directive to which each belongs

units

when used with list, generates a list of units_type currently in use.

units_type

is a type of argument. Every argument has a units_type that identifies its type. Values are:

  • switch

  • string

  • number

  • array

reload_config

reloads the configuration from the sybpcidb tables into memory. See “Restoring default configuration values to sybpcidb” in Chapter 2, “Managing the Java Environment,” in Java in Adaptive Server Enterprise.

report

creates a report based on arguments supplied. Usually used to generate a report for an argument to see its current value and whether or not it is enabled. Can also be used to generate a report for a directive or its arguments.

directive

is any valid directive.

args

is a keyword used with report to generate a list of argument names for the named directive. For example:

sp_jreconfig report, "PCA_JVM", "args"
update

modifies a string or numeric value for an argument where units_type is string, number, or array. You cannot modify an argument when units_type is switch.

old_value

is a string or numeric value that identifies the existing argument or array element being updated.

new_value

is a string or numeric value that defines the new argument or array element.

Examples

Example 1

Generates a formatted report for the PCA_JVM_OPT directive:

sp_jreconfig "report", "PCA_JVM_OPT", "formatted"

Example 2

Generates a report of the arguments of the PCA_JVM_OPT directive:

sp_jreconfig "report", "PCA_JVM_OPT", "args"

Example 3

Generates a report for the argument pca_jvm_netio.

sp_jreconfig "report", "pca_jvm_netio"

Example 4

Generates a report for all arguments that match "pca_jvm". A partial argument name generates a report for all matching arguments.

sp_jreconfig "report", "pca_jvm_"

Example 5

Generating lists – displays a list of all directives and their state: enabled or disabled.

sp_jreconfig "list", "directives"

Example 6

Generating lists – displays a list of all arguments, their units types, and directives.

sp_jreconfig "list", "argnames", "formatted"

Example 7

Generating lists – displays a list of all currently enabled arguments.

sp_jreconfig "list", "enabled"

Example 8

Generating lists – displays a formatted list of all array arguments.

sp_jreconfig "list", "units", "array", "formatted"

Example 9

Generating lists – display a list of argument unit types. The report for this command is formatted by default. Using the “-formatted” option generates an error.

sp_jreconfig "list", "units"

Example 10

Enabling directives and arguments – enables the PCA_JVM_WORK_DIR directive. You can use a partial directive name as long as it includes sufficient information to uniquely identify the directive.

sp_jreconfig "enable", "PCA_JVM_WORK_DIR"
sp_jreconfig "enable", "WORK_DIR"

Example 11

Enabling directives and arguments – enables the pca_jvm_netio argument.

sp_jreconfig "enable", "pca_jvm_netio"

Example 12

Disabling directives and arguments – disables the WORK_DIR directive. This example uses a partial directive name, which must include sufficient information to uniquely identify the directive.

sp_jreconfig "disable", "WORK_DIR"

NoteDisabling a directives causes its arguments to behave as disabled, but does not change their base states.

Example 13

Disabling directives and arguments – disables the pca_jvm_netio argument.

sp_jreconfig "disable", "pca_jvm_netio"

Example 14

Disabling directives and arguments – disables array elements in PCA_JVM_WORK_DIR. The path, but not the permissions mask, is required. See Chapter 8, “File and Network Access Using Java,” in Java in Adaptive Server Enterprise.

sp_jreconfig "disable", "pca_jvm_work_dir",
    "/some/path"

Example 15

Updating string, number, and array arguments – pdates a string argument. This example updates the file location of the pca_jvm_log_filename argument.

sp_jreconfig "update", "pca_jvm_log_filename", "/old/path/filename.log",
	"/new/path/filename.log"

NoteThe update option cannot be used with directives or switch argument as these items can not be modified.

Example 16

Updating string, number, and array arguments – updates a number argument. Numeric values must be enclosed in quotes (as strings) for the stored procedure. Adaptive Server stores them as numeric values.

sp_jreconfig "update", "pca_jvm_min_port", "1026", "2056"

Example 17

Updating string, number, and array arguments – for the PCA_JVM_WORK_DIR directive, work_dir values consist of a path and an optional permission mask. Although the permission mask is optional, you must include the original string path to identify the work_dir. A permission mask is optional. If it is not supplied, the system uses a default mask with an octal equivalent of 0666. Example a does not set a permission mask; it uses the default mask. Examples b and c each set a permission mask of 0644.

[a] sp_jreconfig "update", "pca_jvm_work_dir",
"/old/path","/new/working/directory"

[b] sp_jreconfig "update", "pca_jvm_work_dir",
 "/old/path", "/new/working/directory(u=rw,go=r)"

[c] sp_jreconfig "update", "pca_jvm_work_dir",
 "/old/path", "/new/working/directory(u+w,ugo+r)"

Example 18

Adding array elements – adds new elements to the pca_jvm_work_dir argument array in the PCA_JVM_WORK_DIR directive. Example a uses the default mask. Examples b and c each set a permissions mask of 0644. (The mask is evaluated from left to right.)

[a] sp_jreconfig "add", "pca_jvm_work_dir",
 "/new/working/directory"

[b] sp_jreconfig "add", "pca_jvm_work_dir",
 "/new/working/directory(u=rw,go=r)"

[c] sp_jreconfig "add", "pca_jvm_work_dir",
 "/new/working/directory(u+w,ugo+r)"

Example 19

Deleting array elements – Deletes an array element in pca_jvm_work_dir.

sp_jreconfig "delete", "pca_jvm_work_dir", 
		"/new/working/directory"

NoteTo delete a an element in pca_jvm_work_dir in the PCA_JVM_WORK_DIR directive, you can specify a partial string if the string supplied identifies a unique record. The permission mask is not required; you only need to supply the path even if the work_dir element was originally defined with a specific permission mask.

Example 20

Enabling or disabling all elements in an array – enables all elements in the pca_jvm_work_dir array.

sp_jreconfig "array_enable", "pca_jvm_work_dir"

Example 21

Enabling or disabling all elements in an array – disables all elements in the pca_jvm_work_dir array.

sp_jreconfig "array_disable", "pca_jvm_work_dir"

Example 22

Clearing all records in an array – deletes all records in the pca_jvm_work_dir array and creates an empty array.

sp_jreconfig "array_clear", "pca_jvm_work_dir"

Example 23

Reloading default configuration values – Loads the configuration values stored in sybpcidb into memory.

sp_jreconfig "reload_config"

Usage


Enabling and disabling directives and arguments

Enabling and disabling a directive works like a toggle:

Arguments can be individually enabled or disabled. Arguments are of these types:

Permissions

Only a System Administrator can execute sp_jreconfig to change the settings of the PCA/JVM.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

Event

Audit option

Command or access audited

Information in extrainfo

38

exec_procedure

Execution of a procedure

  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

See also

Stored procedures sp_pciconfig