admin_sql_connection

Definition

To manage the SQL connections of the selected instances of the SAP CC system with a given instance of the database system

Command Usage

Syntax

admin_sql_connection <CTRL_OP> <JDBC_URI_DBI_IDX> [<DB_SCOPE>] [<INST_TARGETS> ...]

Command Arguments
Name Description
<CTRL_OP> The control operation (disconnect, reconnect or status)
<JDBC_URI_DBI_IDX> The index number (1 to 12) of the JDBC URI configured in the SAP CC system for an instance of the multi-instance database system
<DB_SCOPE> Optional: The scope: "core" (available for all instances) or "session" (available for rater instances only); By default: "core"
<INST_TARGETS> Optional: Command targets (instance ID or instance type)

Detailed Information

The admin_sql_connection allows you to manage the database connections in a high availability (HA) environment. The back-end database system includes multiple database instances. You can specify the SAP CC instances and the instance of the database system. The database instance is identified by its JDBC URI and its scope configured in the SAP CC system.

You can:

  • Force the reconnection of the selected SAP CC instances with a given instance of a multi-instance database system
  • Deactivate the connection of the selected SAP CC instances from a given instance of a multi-instance database system
  • Get the status of the connections between the selected SAP CC instances and a given instance of a multi-instance database system

Note

In a non HA environment including a back-end database system with a unique instance, you cannot use the admin_sql_connection command to manage the database connections of a particular instance of the SAP CC system. Use the refresh_sql_connections command instead to force the update of all the database connections established by the complete SAP CC system and its database instance system.

Use

In an HA environment including a multi-instance database system, the SAP CC system manages a pool of JDBC URIs representing the declared database instances. The different SAP CC instances are connected to all of the database instances and use one of these connections. In case of failure, the SAP CC system provides a function that detects any disconnection from a database instance and forces a SAP CC instance to switch to another database instance. You use this command to anticipate the downtime of a database instance. Each SAP CC instance smoothly changes communication with the database by selecting another database instance from the pool of JDBC URIs.

Example

In a high availability environment, type the following command:

  • Admin+> admin_sql_connection reconnect 2 core rater#1 rater#2: Reconnects rater instances #1 and #2 with the second instance of the back-end database

Technical Operations

Preparing Multi-Instance Database Downtime

You use this command to manage the planned downtime of a database instance of a multi-instance database system

  • You disconnect the relevant SAP CC instances when you plan to shut down an instance of the multi-instance database system
  • You reconnect the relevant SAP CC instances after you restart an instance of the multi-instance database system
Troubleshooting Operations (System and User)

You use this command:

  • If an instance of the multi-instance database system (or another multi-instance database system) has failed. Because some SAP CC instances are connected to this failed database instance, you then reconnect the relevant SAP CC instances to another instance of the back-end database system.
  • If you have accidentally disconnected a SAP CC instance from a given instance of the database system. You then reconnect this SAP CC instance with the disconnected instance of the database system.
  • If you want to retrieve the status of a connection between a SAP CC instance and a given instance of the database system.

Authorization

To work with this command in the user interface, you must have a specific role in your SAP CC user profile.

Refer to the SAP CC 5.0 Security Guide for more user assistance and information about the necessary authorizations.

See Also

refresh_sql_connections - To force the update of the connections to the database

Additional Information

Consult the SAP CC System Parameter Reference for more information about the configuration settings dedicated to the multi-instance database management: The number of declared database instances (see SQLHELPER_DB_INSTANCE_COUNT), the pool of JDBC URIs (see SQLHELPER_JDBC_URI_DBI1).

Messages

Code Message Action
err.bad_targets Error: Bad target: {target}. Verify the target set in your command and consult the command information (usage, details).  
err.bad_uri_id Error: The index of JDBC URI "{}" is not valid.  
err.control_operation Error: The control operation "{}" is not valid.  
err.parameter_missing Error: This command needs at least 2 parameters.  
err.malformed_target Error: The target {target} is malformed.  
err.forbidden_target Error: The target {target} is forbidden.  
adminSQLConnection.ok OK: The SQL connections to {2} database uri #{1} are {0,choice,0#offline|1#online}  
adminSQLConnection.nok Error: An error occurred during the update of the SQL connections: "{}"