Directory and DB alias configuration

This topic describes the directory and DB alias configuration command-line syntax and keywords.

Platform support

Optim™ 11.3.0.7 and earlier provided directory and DB alias configuration support for Windows®.

Optim 11.3.0.8 added configuration support for UNIX® or Linux® platforms, with the following limitations:
  • Only DB alias tasks are available. Directory tasks are not supported on UNIX or Linux.
  • Only DB2 and Oracle DB aliases can be created/updated on UNIX or Linux.
  • Only a subset of PR0CNFG keywords are available. Refer to each keyword description to determine if it is enabled on UNIX or Linux. If an unsupported keyword is specified then it will be ignored.

On UNIX or Linux, each invocation of PR0CNFG is logged in file pr0cnfg.<pid>.log located in the /tmp directory. This feature is especially useful if the /SILENT keyword is specified.

Syntax

Use the following command-line syntax.

General

PR0CNFG [ /NOLOGO ] /FILE={ filename | 
   /AUTORUN={ TRUE | FALSE }  
   /GRANTAUTHID={ userid | PUBLIC }
 [ /RESPONDFILE=filename ]
 [ /IGNORE ]
 [ /SILENT ]

Directory


   /PSTDIRNAME={ pstdirname | currentdir } 
   /PSTDIRID=pstdirid  
   /PSTDIRCONNECTSTR=dbmscnctionstr  
   /PSTDIRPASSWORD=password  
   /PSTDIRUSERID=userid 

DB alias


   /DBAACTION={ CreateNew | UseExisting }
   /DBANAME=dbaliasname  
   /CONNECTSTR=dbmscnctionstr  
   /PASSWORD=password  
   /PASSWORDREQUIRED={ TRUE | FALSE }
   /USERID=userid 
   /ACCOUNTID=[Teradataaccountid] 
   /DBMSTYPE={ MVSDB2 | INFORMIX | ORACLE | SYBASE | SQLSERVER |
                           TERADATA | UDB | NETEZZA | POSTGRESQL | HIVE }
   /DBMSVERSION={ versionnum | NA }
   /DBQUALIFIER=databasequal
   /SPSHARE={ TRUE | FALSE }
   /DESCRIPTION=description/UNICODEDB={ TRUE | FALSE }
   /MULTIBYTEDB={ TRUE | FALSE }

Directory or DB alias


   { /SPACTION | /BINDACTION }={ CreateNew | UseExisting }
   { /SPQUALIFIER | /COLLECTIONNAME }=name  

Task


   TASK={ DB | MAINTPST | MAINTCAT | MERGE_CURRENT_USER } } 

Keywords

You can specify the following keywords in the syntax.

General

PR0CNFG
Initiate® command-line processing. The character that follows PR is the number 0 (zero).

/NOLOGO
Suppress the splash logo (Windows only).

/FILE=
The source of parameters or the parameters.
filename
The fully qualified path and name of a text file that contains parameters for one or more tasks. If the file name includes blanks, you must enclose the file name in quotation marks.
When the FILE keyword is specified, any subsequent keywords that are specified on the command line are ignored.
parameters
As described below.

/AUTORUN=
Level of user intervention when the program is running (Windows only).
TRUE
Run the configuration program in AUTORUN mode, hiding dialogs unless user intervention is required to correct or cancel the task. If an error cannot be corrected, the error message is displayed on the Log dialog. This setting is the default for a parameter file.
FALSE
Run the configuration program normally, displaying all dialogs. This setting is the default for parameters from the command line.

/GRANTAUTHID=
Identifier for authorized users. Specify a user ID or group name, or specify PUBLIC if all users can run the Optim solution.

/RESPONDFILE=
The source of default values for message IDs when AUTORUN=ON (Windows only).
filename
The fully qualified path and name of a text file. A sample file, RESPOND.PST, in the RT/BIN directory can be modified and used as necessary. You must enclose a file name that includes blanks in quotation marks.

/IGNORE
Begin a comment or disregard parameters. All parameters that follow and are on the same line have no effect on processing.

/SILENT
Suppress all messaging.
On UNIX or Linux platforms, output is redirected to a file located in the /tmp directory whose name is in the form pr0cnfg.<pid>.log, where pid refers to the process id of the process associated with the executing PR0CNFG command.

Directory

/PSTDIRNAME=
Directory for the task.
pstdirname
Name of the directory.
currentdir
(Windows only.) The current directory (default).

/PSTDIRID=
Identifier that prefixes directory table names.
pstdirid
Schema name, creator ID, or owner ID for the directory tables.

/PSTDIRCONNECTSTR=
Connection to the directory (Windows only).
dbmscnctstr
Name that is used to access the database that contains the directory.

/PSTDIRPASSWORD=
Password for connection.
password
A value is required if the Always Prompt for Password option is active for the directory.

/PSTDIRUSERID=
User account with DBMS permission to connect.
userid
If /TASK=MAINTPST, the user account must have the authority, through system privileges or roles, to create the tables and to catalog the packages, plans, or procedures under the appropriate table identifier.

DB Alias

/DBAACTION=
Processing indicator for the DB alias.
CreateNew
Create a DB alias that is named by DBANAME.
UseExisting
Use the existing DB alias indicated by DBANAME.

/DBANAME=
Name of DB alias.
dbaliasname
Required if /TASK=DB or /TASK=MAINTCAT.

/CONNECTSTR=
Connection string for the database that is associated with the DB alias.
dbmscnctstr
Required if /TASK=DB or /TASK=MAINTCAT.

/PASSWORD=
Password for connection.
password
Required if the Always Prompt for Password option is active for the DB alias or if you are creating a DB alias by using /TASK=DB.

/PASSWORDREQUIRED=
Always require password option for a new DB alias (/TASK=DB). Keyword is ignored for an existing DB alias.
TRUE
Always require a password.
FALSE
Save the password in the registry.

/USERID=
User account with DBMS permission to connect to database associated with the DB alias. Required if the Always Prompt for Password option is active for the DB alias or if you are creating a DB alias by using /TASK=DB.
userid
If /TASK=DB and you are creating a new DB alias or if /TASK=MAINTCAT, the user account must have the authority, through system privileges or roles, to create the tables and to catalog the packages, plans, or procedures under the appropriate table identifier.

/ACCOUNTID=
If the specified /USERID is for a Teradata user, you can optionally specify the Teradata account ID associated with that /USERID (Windows only).

/DBMSTYPE=
The DBMS associated with the DB alias. Required if /TASK=DB.
DBMS type Used for Platform
HIVE Hive (for Hadoop) Windows only
INFORMIX Informix® Windows only
MVSDB2 DB2® for z/OS® Windows only
NETEZZA Netezza® Windows only
ORACLE Oracle Windows, UNIX or Linux
POSTGRESQL PostgreSQL Windows only
SQLSERVER SQL Server Windows only
SYBASE Sybase Windows only
TERADATA Teradata Windows only
UDB DB2 for Linux™, UNIX™, and Windows Windows, UNIX or Linux

/DBMSVERSION=
The version of the DBMS associated with the DB alias. Required if /TASK=DB, except for PostgreSQL and Hive. When required, the /DBMSVERSION must be specified after the /DBMSTYPE.
versionnum
Specify the version number for the DBMS associated with the DB alias, unless the /DBMSTYPE is PostgreSQL or Hive.
NA
If the /DBMSTYPE is PostgreSQL or Hive, you can omit the /DBMSVERSION, or you can specify /DBMSVERSION=NA for not applicable.

/DBQUALIFIER=
Database name (Windows only).
databasequal
Required if /TASK=DB and DBMS is Sybase ASE, SQL Server, or Informix.

/SPSHARE=
Indicator for sharing stored procedures for multiple Sybase ASE or SQL Server DB aliases when /TASK=DB (Windows only).
TRUE
Stored procedures are shared. For Sybase, the special Sybase ASE database sybsysprocs is used to store stored procedures. For SQL Server, stored procedures are stored in the MASTER database. Microsoft™ SQL Server documentation contains a cautionary statement about creating stored procedures in the MASTER database. Consider the implications of sharing stored procedures for SQL Server before proceeding.
FALSE
Stored procedures are not shared.

/DESCRIPTION=
Optional description for DB alias when /TASK=DB.
description
1 - 40 characters, delimited by double quotation marks.

/UNICODEDB=
Store directory data in Unicode format.
TRUE
Store data in Unicode format.
FALSE
Do not store data in Unicode format.

/MULTIBYTEDB=
Use multibyte encoding for the DB alias.
TRUE
Use multibyte encoding.
FALSE
Do not use multibyte encoding.

Directory or DB alias

The following keywords are interchangeable, and are not DBMS-dependent.

{ /SPACTION | /BINDACTION }=
Indicator for stored procedures or bind files.
CreateNew
Create new stored Procedures or bind Files.
UseExisting
Use previously loaded stored procedures or bind files.

{ /SPQUALIFIER | /COLLECTIONNAME }=
name
Schema name or owner ID of the stored procedures, or plan name of the bind files.

Task

The TASK keyword identifies the task to be done. If a task is entered on the command line, you must provide the parameters on the same line. When you are using a parameter file, the TASK keyword signals the end of a list of parameters for a task. Keywords on the lines that follow a TASK keyword are processed in the next task, if any, or are ignored if no new TASK keyword is found.

TASK=
The task identifier, as follows:
DB
Create or update a single DB alias.
MAINTPST
Apply maintenance to a single directory (Windows only).
MAINTCAT
Apply maintenance to a single DB alias (Windows only).
MERGE_CURRENT_USER
Merge all registry information for the current user account (Windows only).

UNIX or Linux implementation error codes

Code Problem description
   
  Corrupted environment errors
101 pr0cfgdba is missing.
102 Bind file is missing or not readable.
103 An SQL file is missing or not readable.
104 A stored procedure input file is missing or not readable.
105 The sqlplus command could not be found.
106 The db2 command could not be found.
107 A LST file is missing or not readable.
108 The PSTHOME environment variable is not set and exported.
109 The PSTHOME environment variable specifies a directory which does not seem to point to a valid Optim environment.
   
  Processing errors
120 A TASK keyword is set but no other task related required keywords are set.
121 FILE keyword specifies a file that does not exist or is not readable
122 An invalid keyword is specified.
123 A required keyword is missing or unset.
124 DBMSType keyword specifies an invalid or unsupported database type.
125 DBMSVersion keyword specifies an invalid or unsupported database version.
126 Could not connect to database specified by ConnectStr using credentials provided.
127 Could not find bind file corresponding to DBMSType and DBMSVersion.
128 The FILE keyword is set but no file name is specified.
129 When FILE keyword is specified no other keywords are allowed.
130 UnicodeDB and MultibyteDB may not both be set to ‘true’.
131 Optim configuration file ‘pstlocal.cfg’ or ‘pstserv.cfg’ missing or not readable.
132 The PSTDirName keyword value does not match a pstdir entry name in pstlocal.cfg or pstserv.cfg files.
133 The DBAName keyword value does not match a dbalias entry name in pstlocal.cfg or pstserv.cfg files.
134 Failed to create DBAlias entries in the Optim directory.
135 One or more required keywords are missing
136 FILE keyword set more than once.
137 Failed to bind DB2 packages.
138 Failed to create or update Oracle stored procedures.