DBLOGIN

Use DBLOGIN to establish a database connection through GGSCI in preparation to issue other Oracle GoldenGate commands that affect the database. The user who issues DBLOGIN should have the appropriate database privileges to perform the functions that are enacted by those commands.

Any other special privileges that are required for a GGSCI command are listed with the reference documentation for that command.

Requirements When Configuring Extract or Replicat in Integrated Mode (Oracle)

If using DBLOGIN to issue ADD EXTRACT, ALTER EXTRACT, or REGISTER EXTRACT to initiate integrated Extract or ADD REPLICAT, ALTER REPLICAT, or REGISTER REPLICAT to initiate integrated Replicat against an Oracle database, the user who issues DBLOGIN must:

  • have privileges granted through the Oracle dbms_goldengate_auth.grant_admin_privilege procedure.

  • not be changed while Extract or Replicat is in integrated mode.

Syntax

DBLOGIN {
[SOURCEDB data-source] |
[, database@host:port] |
USERID {/ | userid}[, PASSWORD password]
   [algorithm ENCRYPTKEY {keyname | DEFAULT}] |
USERIDALIAS alias [DOMAIN domain] |
[SYSDBA | SQLID sqlid]
[SESSIONCHARSET character-set]
}
SOURCEDB data-source

SOURCEDB specifies a data source name. This option is required to identify one of the following:

  • The source or target login database for SQL Server, MySQL, and databases that use ODBC

database@host:port

(MySQL) Specifies a connection string that contains the database name, host name, and database port number. Can be used to specify a port other than the default that is specified in the database configuration.

USERID

Supplies a database login credential, if required. Can be used if an Oracle GoldenGate credential store is not in use. Input varies, depending on the database, as follows:

userid

Specifies the name of a database user or a schema, depending on the database configuration. Use a TNS connection identifier (alias) to connect to any database.

To log into a PDB in an Oracle multitenant container database, specify userid as a connect string, such as gguser@DBEAST. To log into the root container, specify userid as a common user, including the c## prefix, such as c##ggadmin@DBEAST.

/

(Oracle) Directs Oracle GoldenGate to use an operating-system login for Oracle, not a database user login. Use this argument only if the database allows authentication at the operating-system level. To use this option, the correct user name must exist in the database, in relation to the value of the Oracle OS_AUTHENT_PREFIX initialization parameter. For more information, see the USERID | NOUSERID parameter.

NOPASSWORD | PASSWORD password

The NOPASSWORD option is the alternative to the PASSWORD option when using external authentication because password is not required for external authentication such as using Kerberos authentication. See Configuring Kerberos Authentication .

Use when authentication is required to specify the password for the database user. If the password was encrypted by means of the ENCRYPT PASSWORD command, supply the encrypted password; otherwise, supply the clear-text password. If the password is case-sensitive, type it that way.

If the PASSWORD clause is omitted, you are prompted for a password, and the password is not echoed.

For PostgreSQL, DBLOGIN fails when login password contains a semicolon.

algorithm

If the password was encrypted with the ENCRYPT PASSWORD command, specify the encryption algorithm that was used:

AES128

AES192

AES256

ENCRYPTKEY {keyname | DEFAULT}

Specifies the encryption key that was specified with the ENCRYPT PASSWORD command. Use one of the following:

ENCRYPTKEY keyname

Specifies the logical name of a user-created encryption key in the ENCKEYS lookup file. Use if ENCRYPT PASSWORD was used with the KEYNAME keyname option.

ENCRYPTKEY DEFAULT

Directs Oracle GoldenGate to generate a Blowfish key. Use if the ENCRYPT PASSWORD command was used with the KEYNAME DEFAULT option.

USERIDALIAS alias [DOMAIN domain]

Supplies a database login alias, if required. Can be used instead of the USERID option if there is a local Oracle GoldenGate credential store that contains a credential with the required privileges.

alias

Specifies the alias of a database user credential that is stored in the Oracle GoldenGate credential store. To log into a pluggable database in an Oracle multitenant container database, the user must be stored as a connect string, such as gguser@DBEAST. To log into the root container, the user must be stored as a common user, including the c## prefix, such as c##ggadmin@DBEAST.

DOMAIN domain

Specifies the credential store domain for the specified alias. A valid domain entry must exist in the credential store for the specified alias.

SYSDBA

(Oracle) Specifies that the user logs in as sysdba. This option can be used for USERID and USERIDALIAS.

SQLID sqlid

(Db2 on z/OS) Issues the SQL command SET CURRENT SQLID = 'sqlid' after the USERID login (with PASSWORD, if applicable) is completed. If the SET command fails, the entire DBLOGIN command fails as a unit.

SESSIONCHARSET character-set

(Teradata and MySQL) Sets a database session character set for the GGSCI connection to the database. All subsequent commands will use the specified session character set. This command option overrides any SESSIONCHARSET that is specified in the GLOBALS file.

Examples

(Oracle with SYSDBA)
DBLOGIN USERID ggadmin@dc1 SYSDBA password AACAAAAAAAAAAAJAUEUGODSCVGJEEIUGKJDJTFNDKEJFFFTC AES128, ENCRYPTKEY securekey1
(MySQL)
DBLOGIN SOURCEDB ggadmin@host1:3305, USERIDALIAS ggeast
(MySQL)
DBLOGIN SOURCEDB database USERIDALIAS ggeast
(SQL Server with Integrated Windows authentication)
DBLOGIN SOURCEDB systemdsn
(SQL Server with SQL Server authentication)
DBLOGIN SOURCEDB systemdsn USERIDALIAS ggeast