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_privilegeprocedure. -
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]
}
-
SOURCEDBdata-source -
SOURCEDBspecifies 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
useridas a connect string, such asgguser@DBEAST. To log into the root container, specifyuseridas a common user, including thec##prefix, such asc##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_PREFIXinitialization parameter. For more information, see theUSERID | NOUSERIDparameter. -
NOPASSWORD | PASSWORDpassword -
The
NOPASSWORDoption is the alternative to thePASSWORDoption 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 PASSWORDcommand, supply the encrypted password; otherwise, supply the clear-text password. If the password is case-sensitive, type it that way.If the
PASSWORDclause is omitted, you are prompted for a password, and the password is not echoed.For PostgreSQL,
DBLOGINfails when login password contains a semicolon. -
algorithm -
If the password was encrypted with the
ENCRYPT PASSWORDcommand, specify the encryption algorithm that was used:AES128AES192AES256 -
ENCRYPTKEY {keyname| DEFAULT} -
Specifies the encryption key that was specified with the
ENCRYPT PASSWORDcommand. Use one of the following:-
ENCRYPTKEYkeyname -
Specifies the logical name of a user-created encryption key in the
ENCKEYSlookup file. Use ifENCRYPT PASSWORDwas used with theKEYNAMEkeynameoption. -
ENCRYPTKEY DEFAULT -
Directs Oracle GoldenGate to generate a Blowfish key. Use if the
ENCRYPT PASSWORDcommand was used with theKEYNAME DEFAULToption.
-
-
-
USERIDALIASalias[DOMAINdomain] -
Supplies a database login alias, if required. Can be used instead of the
USERIDoption 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 thec##prefix, such asc##ggadmin@DBEAST. -
DOMAINdomain -
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 forUSERIDandUSERIDALIAS. -
SQLIDsqlid -
(Db2 on z/OS) Issues the SQL command
SET CURRENT SQLID = 'sqlid'after theUSERIDlogin (withPASSWORD, if applicable) is completed. If theSETcommand fails, the entireDBLOGINcommand fails as a unit. -
SESSIONCHARSETcharacter-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
SESSIONCHARSETthat is specified in theGLOBALSfile.
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