A Database Credential Group is a container for information used to query databases. They contain one or more credentials and one or more queries.
A Database Credential Group is created by the activation of a Database Pattern. A Database Pattern has its type defined as sql_discovery
.
Deep database discovery
Any database driver listed on the JDBC management page can be used to create database connections for querying from patterns. The TKU shipped with BMC Atrium Discovery provides patterns for deep discovery of the following databases:
The only items that must be configured in the user interface (UI) for a Database Credential Group are the credentials (username, password, connection information). The database queries come from the database pattern.
The following example is for MySQL and uses the MySQL_AB.MySQL_RDBMS_Extended.DatabasesAndTables
pattern.
This is the definitions
section of the MySQL_AB.MySQL_RDBMS_Extended.DatabasesAndTables
pattern. Additional comments explain various definitions.
definitions MySQLDetails 1.0 """Queries for MySQL to recover detailed content information""" // provides the description text for the Credential Group type := sql_discovery; // sql_discovery places the credential group in the Databases group := "MySQL"; // tab with the heading MySQL. The group also populates the // Name field. define showDatabases // defines a query called showDatabases """Return a list of defined databases""" // provides the description text for the showDatabases query // the query query := "SHOW DATABASES"; end define; define showTables // defines a query called showTables """Return a list of defined tables within the given database""" // provides the description text for the showTable query // the query query := "SELECT table_name FROM information_schema.tables WHERE table_schema = %db_name%"; parameters := db_name; end define; end definitions;
MySQL_AB.MySQL_RDBMS_Extended.DatabasesAndTables
pattern is activated.Enter the following information:
Field |
Description |
---|---|
Name |
Enter a name for the credential (for example, ExtendedMySQL). |
Enabled |
A checkbox to define whether or not the credential is enabled. |
Description |
Enter a free text description of the credential. |
Username |
The username used to log in to the target database. |
Password |
The password corresponding to the username. |
Database Driver |
Select an appropriate database driver from the drop-down list. When one is selected, additional fields are added to the form depending on the driver selected. |
Database IP Address |
Select "Match All" to match all endpoints. Deselect it to enter values that will be used to determine if this credential is suitable for a particular endpoint. They can be one or more of the following, separated by commas: The following address types cannot be specified • IPv6 link local addresses (prefix As you enter text, the user interface (UI) divides it into pills, discrete editable units, when you enter a space or a comma. According to the text entered, the pill is formatted to represent one of the previous types or presented as invalid. Pills are not currently supported in Opera. |
In order for BMC Atrium Discovery to retrieve the Database details, it will need to be able to access the Database
as a legitimate user, with privileges sufficient to execute the SQL Queries below. These examples pertain to Oracle. For other databases, see the relevant Configipedia pages.
Oracle Database Server SID |
Query |
---|---|
Obtaining a list of Schemas for a SID |
|
Obtaining a list of Tables within a Schema |
|
Obtaining a list of Tablespaces for a SID |
|
Obtaining a list of DataFiles within a Tablespace |
|
Oracle Database Server service_name |
Query |
Obtaining a list of Schemas |
|
Obtaining a list of Tables within a Schema |
|
Obtaining a list of Tablespaces |
|
Obtaining a list of DataFiles within a Tablespace |
|
The following table describes the additional fields:
Field |
Description |
---|---|
Database |
The database name. If you leave the Match Regular Expression check box clear, the connection will be made to any database whose name is supplied by the pattern. If the check box is selected, the connection will be made to any database whose name matches the regular expression. Select the default value check box and specify a value to be used if none is specified by a pattern. |
Database Name |
The database name (Informix). If you leave the Match Regular Expression check box clear, the connection will be made to any database whose name is supplied by the pattern. If the check box is selected, the connection will be made to any database whose name matches the regular expression. Select the default value check box and specify a value to be used if none is specified by a pattern. |
Database Instance Name |
The database instance name (Microsoft SQL Server). If you leave the Match Regular Expression check box clear, the connection will be made to any database whose name is supplied by the pattern. If the check box is selected, the connection will be made to any database whose name matches the regular expression. Select the default value check box and specify a value to be used if none is specified by a pattern. |
Server Name |
The name of the Informix server as it appears in the sqlhosts file. If you leave the Match Regular Expression check box clear, the connection will be made to any server name supplied by the pattern. If the check box is selected, the connection will be made to any database whose name matches the regular expression. Select the default value check box and specify a value to be used if none is specified by a pattern. |
System ID (SID) |
The Oracle System ID, or instance running on the Oracle host. If you leave the Match Regular Expression check box clear, the connection will be made to any database whose SID supplied by the pattern. If the check box is selected, the connection will be made to any database whose SID matches the regular expression. Select the default value check box and specify a value to be used if none is specified by a pattern. |
Service name |
The Oracle service name, an alias to an instance, or multiple instances in for example a clustered environment. If you leave the Match Regular Expression check box clear, the connection will be made to any database whose service name is supplied by the pattern. If the check box is selected, the connection will be made to any database whose service name matches the regular expression. Select the default value check box and specify a value to be used if none is specified by a pattern. |
Port |
The port number to use to connect to the database. If you leave the Match Regular Expression check box clear, any port supplied by the pattern will be used to connect to the database. If the check box is selected, any port supplied which matches the regular expression will be used to connect to the database. Select the default value check box and specify a value to be used if none is specified by a pattern. |
Additional JDBC Parameters |
Any additional JDBC parameters to use when making the connection. Select the default value check box and specify a value to be used if none is specified by a pattern. These are specified as |