1261329 - DBA Cockpit - Oracle as a remote database
1261329 - DBA Cockpit - Oracle as a remote database
Symptom
Overview
This SAP Note provides information about the connection of an Oracle remote
database to the DBA Cockpit.
Other Terms
Solution
Step by step
1. Technical requirements
In the operating system, you can access the application server of the DBA
Cockpit system as the operating system user <sapsid>adm.
The server on which the Oracle database to be connected runs can be accessed
from the application server using a network connection. You can check this using
The database user who is to be entered for the database connection can be the
relevant schema owner, in other words, SAPR3, SAP<SID>, SAPSR3, or SAPDB<SID>.
In MCOD systems, you must select the database user who is the owner of tables
SDBAH and SDBAD and to which the public synonyms SAP_SDBAH and SAP_SDBAD point.
If the use of the SAP schema user is not possible, you can also
use a different user. The SAPDBA role (see SAP Note 134592) must have been
assigned to this different user.
Alternatively, the required GRANTS can also be assigned to the user explicitly
or implicitly using roles. For this, you must also have implemented the
correction from SAP Note 1866011.
The following GRANTS are required:
(<sap schema> is the schema owner, that is SAPSR3, SAP<SID>, SAPR3 or SAPSR3DB;
for non-SAP databases, this is the schema user SAPSR3 in accordance with SAP
Note 320457.)
However, if you use a user that is not a schema user, some functions can no
longer be used in the DBA Cockpit:
System Event History (Performance -> Wait Event Analysis)
Performance Database (Performance -> Statistical Information)
Undo Statistics (Performance -> Statistical Information)
Oracle Net (Performance -> Additional Functions)
Explain (Diagnostics -> Explain)
In addition, the following functions are no longer available in the explain
display:
"Explain with hint"
"Analyse"
"Alter Session"
As of SAP_BASIS 7.02 SP13 or 7.31 SP7, the optional connection parameter "Schema"
is available. Here, you can enter the schema that you want to be monitored. If
you use another user than the schema user as the connect user and the
authorization SELECT ANY TABLE has been assigned to this user (grant select any
table to <user>;), the function "Explain" (Diagnostics -> Explain) is displayed
again and the functions "Explain with hint" and "Alter Session" are also
possible in the explain display.
To create a connection from the SAP Solution Manager to a database, you require
the SAP Basis software ("kernel") and two other database system-specific
software components. These are the database shared library (DBSL) from SAP and
the database client library from the relevant manufacturer of the database
system. You can download both of these components from SAP Service Marketplace.
As of SAP_BASIS 7.50 or SAP Kernel > 7.45, Oracle Database Client Version 12.1
or above is required.
a) Download of DBSL
After you successfully unpack the archive, you no longer require the file
lib_dbsl_<patchlevel>-<nnnnnnnn>.sar and you can delete it.
Here, download the Oracle client file <most recent version> (zip file) into a
temporary directory and unpack the file. The unpacked zip file contains the
Oracle client OCL<nnnn>.SAR in the subfolders OCL_<operating system>. Copy the
file "OCL<nnnn>.SAR" into a temporary folder on the application server and use
the program SAPCAR to unpack the archive:
After you successfully unpack the archive, you no longer require the file
OCL<nnnn>.SAR and you can delete it.
After you download and unpack the required software, the two components DBSL and
Oracle client software are installed in the ABAP central instance and all of the
ABAP application servers of your SAP Solution Manager. This section describes
this for Windows or UNIX/Linux-based systems.
Move the files that you obtained in step 3.a) ("Download the DBSL") to the
directory
<drive>:\usr\sap\<SAPSID>\SYS\exe
Move the files that you obtained in step 3.a) ("Download of DBSL") to the
directory
/usr/sap/<SAPSID>/SYS/exe/run
and
Move the files that you obtained in step 3.b) ("Download the Oracle client
software") to a directory on the application server of the DBA Cockpit system.
For example:
<drive>:\oracle\client\instantclient
Add this directory to the environment variable PATH: To do this, choose Start ->
Settings -> Control Panel -> System -> Advanced -> Environment Variables ->
System variables -> "Path" -> Edit and attach the above directory to the
available entry. Separate this using a semicolon (;).
Create another directory:
<drive>:\usr\sap\<SAPSID>\SYS\profile\oracle
Enter this directory into another system environment variable with the name
TNS_ADMIN.
To ensure that the changed environment is available for the application server,
you must restart the system.
Move the files that you obtained in step 3.2 ("Download the Oracle client
software") to a directory on the application server.
Note: SAP recommends the following naming convention, which differs in the
Oracle Database Client Version 11 and Version 12: As of Version 12, the part
with the bit width ("_<64|32>") of the architecture is completely omitted in the
following paths.
/oracle/client/11x_<64|32>/instantclient_<version>
Where <version> of the component <nnnn> corresponds to the downloaded file OCL
<nnnn>.SAP. To facilitate a later upgrade of the Oracle client software, create
a link to instantclient_<version> in /oracle/client/11x_<64|32> (Oracle Client
v12 in /oracle/client/12x):
ln -s instantclient_<version> instantclient
In this case, SHLIB_PATH is also possible for HP-UX. The variable then has the
following contents, for example:
/usr/sap/C11/SYS/exe/run:/oracle/client/11x_64/instantclient
/usr/sap/C11/SYS/exe/run:/oracle/client/12x/instantclient
/usr/sap/<SAPSID>/SYS/profile/oracle
Enter this directory into another system environment variable with the name
TNS_ADMIN.
In addition, you must set the environment variable NLS_LANG in the environment
of the user <sid>adm:
For Windows, you must set the variable in the registry under "HKEY_LOCAL_MACHINE
-> Software -> SAP -> <sid> -> Environment".
For more detailed information, see Note 556232.
To ensure that the changed environment is available for the application server,
you must restart the system.
If the SAP application server of the DBA Cockpit system has one of the following
Basis Support Package levels, you must implement the corrections that are
contained in Note 1409472:
• sqlnet.ora:
NAMES.DIRECTORY_PATH = (EZCONNECT,TNSNAMES)
• protocol.ora:
• tnsnames.ora (optional):
When you use the EZCONNECT mechanism, you can continue with setup step a) "Set
the DBCON parameter". However, if you use the TNS connect mechanism, in the file
tnsnames.ora that is in the directory on the application server and points to
the environment variable TNS_ADMIN, you must add an entry like the one that
follows for each Oracle remote database:
<SID> =
(DESCRIPTION =
(SDU = 32768)
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = TCP)
(PROTOCOL = TCP)
(HOST = <database_host>)
(PORT = <port>)
)
)
(CONNECT_DATA =
(SID = <DB_ID>)
)
)
• <SID> = the ID that you want to use to access this database ("TNS Name")
Usually, you can copy the entry in the file tnsnames.ora from the relevant file
of the remote system. To obtain the contents of tnsnames.ora in the remote
system, log on to the remote system as the database user ora<sid> (UNIX or
Linux) or as the database user <sid>adm (Windows) on operating system level.
There, you call the following command from the command line.
tnsping <SID>
The output specifies the connection parameters and the path to the file
sqlnet.ora. The directory in which this file is stored, also includes the file
tnsnames.ora.
To ensure that the SAP Solution Manager system can use and query the remote
database, you must define the access data. This is saved in encrypted form in
the table DBCON. There are several options for setting the DBCON entries: You
can either use the DBA Cockpit or you can use transaction DBCO to do it
directly. In addition, you can use transaction SOLMAN_SETUP to create the DBCON
entries.
DBA Cockpit
Call transaction DBACOCKPIT. Choose System Configuration -> Add and enter the
following values:
• System = the name that you want to use to manage the remote database in the
DBA Cockpit.
Choose Remote Database -> Database Connection -> Create (button to the right
beside the input field for the database connection).
Enter the following values:
• When you use the EZCONNECT mechanism (systems with SAP NetWeaver as of 7.02
Support Package 4, SAP Solution Manager 7.1), enter the following
parameters:
• When you use the TNS connect mechanism, you must specify the following
parameter:
• TNS Name = The value for SID from the file tnsnames.ora.
Note the following: You can maintain the field in addition to the
fields of the EZCONNECT mechanism. If this is the case, using the TNS
connect mechanism is preferred to using the EZCONNECT mechanism.
However, the prerequisite for this is a relevant entry in the file
tnsnames.ora.
Choose Save twice - once for the database connection and once for the system
configuration entry.
The database entry is then immediately available for use in the DBA Cockpit.
Transaction SOLMAN_SETUP
For SAP Solution Manager 7.0 systems prior to Support Package 18, you can call
the same wizard from the diagnostics setup of the SAP Solution Manager:
http://<server name>:<http_port>/smd -> "Diagnostics Setup" -> "Managed Systems"
-> "Database Monitoring".
• In the Wizard, choose the system for which you want to set up the DBA
Cockpit (if required). The field for the DB host name and the DB name should
already be populated.
• You can leave the entry for the database schema empty (if it exists).
• On the screen that is displayed now, enter the parameters for the database
host, the TNS name (if required; this is optional), the username, and the
password.
• Database host
• If you use the EZCONNECT mechanism (systems with SAP NetWeaver as of 7.02
SP4, SAP Solution Manager 7.1), enter the following parameters:
• When you use the TNS connect mechanism, specify the following parameter:
• TNS name = value for SID from the file tnsnames.ora (TNS name)
Note the following: You can maintain the field in addition to the
fields of the EZCONNECT mechanism. If this is the case, using the TNS
connect mechanism is preferred to using the EZCONNECT mechanism.
However, the prerequisite for this is a relevant entry in the file
tnsnames.ora.
Transaction DBCO
Call transaction DBCO. Choose Display/Change -> New Entries. Enter the following
values:
• DBMS = "ORA"
• DB password = the password of the above user. You must enter this twice.
• Conn. info = the value for SID from the file tnsnames.ora ("TNS name")
• When using the EZCONNECT mechanism (systems with SAP NetWeaver as of 7.02
Support Package 4, SAP Solution Manager 7.1):
• Permanent = unchecked
Choose Save.
If problems occur when you test the database connection, check whether the
problems are caused by one of the following errors.
• You can use the following small ABAP program to test the database
connection. If this is unsuccessful, the developer trace (dev_w*) of the
work process contains precise error messages that can be used to solve the
relevant problem.
To test the function of the database connection outside of the DBA Cockpit, use
the ABAP program ADBC_TEST_CONNECTION.
Software Components
ST 400 - 400
Other Components
Component Description
BC-DB-ORA Oracle
Support Package