Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


5.9.5 Add an Oracle DB user (Windows)

Function

This plug-in adds new database users to the Oracle Database server for Windows.

On the Oracle Database server (hereinafter referred to as the "database server") that is specified for the host name of the execution-target server (the plugin.destinationHost property), this plug-in starts SQL*Plus and then executes the "CREATE USER" statement.

As in the case of a "GRANT" statement in SQL*Plus, you can specify system privileges, object privileges, and role names for the database privilege property (database.dbPrivilege) by using commas to delimit items. If you specify a value for the database privilege, the "GRANT" statement is executed after the "CREATE USER" statement. You cannot specify "WITH HIERARCHY OPTION" or "WITH GRANT OPTION" for the "GRANT" statement.

If you do not specify a value for the database privilege, database users who have no privileges will be added.

The following Oracle-related terms are used in this document:

- Oracle Database instance

An instance of the database that is installed on the database server.

Multiple instances can exist on the same database server. Each instance has a unique ID name (see "Oracle system identifier (SID)" below) and its own installation folder on the database server.

Oracle Database instances are bundles of database table areas, database user account information, and information about user privileges.

- SQL*Plus

A utility tool that is provided with Oracle Database.

This tool provides unique commands for operating and maintaining Oracle Database from the command line interface (CLI). It also provides a database client functionality for executing SQL statements.

- Oracle system identifier (SID)

A name that identifies an Oracle Database instance.

In Oracle online manuals, this name is referred to as the Oracle system identifier or SID.

- System privilege

See the specifications of Oracle Database.

- Object privilege

See the specifications of Oracle Database.

- Role

See the specifications of Oracle Database.

The following server is required for this plug-in:

- Oracle Database server (execution-target server)

A server on which Oracle Database is installed.

Use situation

This plug-in can be used to add new database users to Oracle Database instances that are running.

Prerequisites

For the most recent information about the prerequisite products in the system, the prerequisite products in the execution-target system, and the supported OSs for the prerequisite products in the execution-target system, see the Release Notes.

[Prerequisite products in the system]

JP1/Automatic Operation 11-00 or later

[Prerequisite products in the execution-target system]

(1) Oracle Database server

- Oracle 11g Standard/Enterprise

[Supported OSs for the prerequisite products in the execution-target system]

(1) Oracle Database server

- Windows Server 2008 R2 Standard/Enterprise/Datacenter

- Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Enterprise/Datacenter

Note, however, that these OSs must meet the requirements for Oracle Database.

[Conditions for using the required products in the execution-target system]

(1) Conditions related to the Oracle Database server

- Oracle Database has been installed normally.

- SQL*Plus has been installed.

- The Oracle Database instance corresponding to the specified Oracle system identifier (SID) is not running.

Cautions

(1) When specifying values for the properties of this plug-in, do not specify any character string that contains a double quotation mark (") or a single quotation mark (').

(2) The Oracle system identifier (hereinafter referred to as the SID) that is specified for the property database.oracleSid is case sensitive. The SID cannot contain any of the prohibited characters below. In addition, Oracle might impose other limitations. For details on the limitations, see the specifications for Oracle Database.

Prohibited characters:

- Line feed characters (\n)

- Halfwidth spaces ( )

- Semicolons (;)

(3) The values specified for the database user ID property (database.dbUserId) and the database user password property (database.dbUserPassword) must not contain any of the prohibited characters in (2) and must not exceed 30 bytes. For details on other prohibited characters, see the specifications for Oracle Database. Note that these properties are case sensitive.

(4) The value specified for the database privilege property (database.dbPrivilege) must not contain any of the prohibited characters in (2) other than halfwidth spaces. In addition, this value must not conflict with reserved keywords. For details on reserved keywords and other prohibited characters, see the specifications for Oracle Database. This property is not case sensitive. If you specify the name of a privilege that does not exist, the plug-in ends abnormally and database users who have no database privileges might remain. If necessary, delete such users.

(5) This plug-in references the registry and then obtains information about the installation folder corresponding to the specified SID. If the plug-in cannot correctly obtain information about the actual installation folder (for example, because the registry has been changed from its state immediately after installation for some particular reason), the plug-in assumes that the Oracle Database instance corresponding to the SID (hereinafter referred to as the "target instance") does not exist or that Oracle Database has not been installed, and then ends abnormally.

(6) The encoding type set for the target instance must be the same as the encoding type set for the OS of the database server. If these encoding types are different, an error or incorrect operation might occur.

(7) For services that use this plug-in, treat the properties that are mapped to the database user password property (database.dbUserPassword) as password-type properties.

(8) If this plug-in ends abnormally, an error code beginning with "ORA-" and a message might be output to the task log. In such cases, search for the error code on the manual website for Oracle Database.

Execution privilege

- Users who belong to the ora_dba group

Version

02.00.00

Plug-in tags

Control Database,Oracle Database

Plug-in name displayed in the task log

dbAddOracleUser_Win

Return code

0: Normal

12: Error (Mistake by user) Invalid property

23: Error (Invalid environment) The environment requirements are not met.

27: Error (Check with the task log about the error detail) Unidentified error

41: Error (An error has been detected in the plug-in) Property not entered (An error has been detected in the component script)

Property list

The following table lists the properties:

Property key

Property name

Description

Default value

I/O type

Required

plugin.destinationHost

Host name of the execution target server

Specify the host name or IP address of the server on which this plugin will be executed. IPv6 addresses are not supported.

--

Input

R

database.oracleSid

Oracle database system identifer (SID)

Specify the system ID (SID) for the target Oracle database instance.

--

Input

R

database.dbUserId

Database User ID

Specify the user ID for a new database user.

--

Input

R

database.dbUserPassword

Database User Password

Specify the password for a new database user.

--

Input

R

database.dbPrivilege

Database privileges

Use commas to separate the listed privilege names to be granted to the new database user.

--

Input

O

common.returnValue

Return value for the plugin

The return value of this plugin stored.

--

Output

O