Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


5.9.3 Delete an Oracle DB user

Function

This plug-in deletes existing database users from the Oracle Database server.

This plug-in starts SQL*Plus 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), and then executes the "DROP USER" statement. Note that "CASCADE" is not specified.

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 as a bundle 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.

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 delete database users of 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

- Red Hat Enterprise Linux Server 6 (32-bit x86), Red Hat Enterprise Linux Server 6 (64-bit x86_64)

- Red Hat Enterprise Linux Server 7 (64-bit x86_64)

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

[Conditions for using the prerequisite 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 value specified for the database user ID property (database.dbUserId) 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) If the OS of 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) is Windows, 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.

(5) If the OS of the database server is UNIX, this plug-in references the "oratab" file that was created by the Oracle Database installer 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 "oratab" file has been changed from its state immediately after installation for some particular reason such as the update, transfer, or deletion of the file), this plug-in assumes that 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) 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

- For Windows: Users who belong to the ora_dba group

- For UNIX: Users who belong to the OSDBA group

Version

02.00.00

Plug-in tags

Control Database,Oracle Database

Plug-in name displayed in the task log

dbDeleteOracleUser

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 the database user to be deleted.

--

Input

R

common.returnValue

Return value for the plugin

The return value of this plugin stored.

--

Output

O