ALTER CREDENTIALSTORE
Use this command to create credential store aliases which contains database credentials that includes username and password with the connection details. The credential store aliases can then be used to establish database connections within deployment.
See Add and Alter Database Credentials to configure the database connections from the MA web interface.
The use of a credential store is not supported for the NonStop platforms.
Syntax
ALTER CREDENTIALSTORE
{ADD USER {userid|userid@dbhost:dbport/dbname[;connection_options]|userid@odbc-dsn}
[DELETE USER alias]
[REPLACE USER alias]
[ALIAS alias]
[Domain domain]
[PASSWORD password|NOPASSWORD]
-
ADD USER {userid|userid@dbhost:dbport/dbname[;connection_options]|userid@odbc-dsn} userid-
Adds the specified user to the credential store alias. If the
ALIASoption is not used, the alias name defaults to that of theuserid. If theDOMAINoption is not supplied, the domain defaults to the OracleGoldenGate domain. For multitenant Oracle databases with different users for the CDB and the PDB, you need to specify@tns_service_namewhen adding a database user to the credential store. -
userid@dbhost:dbport/dbname[;connection_options] - For databases that support connection strings such as Oracle database,
MySQL, SQL Server, PostgreSQL, and Db2, adds the specified user and connection
information to a credential store alias. Connection string information should include
the database server name, database port, and database name. Following are the additional
connection options (per database) that are available to add to the connection string:
The
ALIASoption is required when creating an alias with database connection detailsThe required connection format is:
userid@databasehost:databaseport/databasename;option1;option2;option3For example:
ALTER CREDENTIALSTORE ADD USER ggadmin@server_west:1434/sourcedb PASSWORD ***** ALIAS SourceMSSQLConnection -
userid @odbc-dsn - For databases that support DSN connections over ODBC, including Db2 for i
Series, Db2 LUW, Db2 z/OS, SQL Server, and PostgreSQL, adds the DSN connection
information to the credential store. The DSN connection details must exist on the
system, such as in an
odbc.inifile for Linux or as a System DSN created under Windows using the ODBC data sources 64-bit client.The
ALIASoption is required when creating an alias with a DSN.The required connection format is:
userid@odbc-dsnFor example:
ALTER CREDENTIALSTORE ADD USER ggadmin@sourcedsn PASSWORD ***** ALIAS SourceMSSQLConnection
-
DELETE USER userid -
Removes the credential alias of a specified user, alias, and domain. If the
ALIASoption is not supplied, the alias name defaults to that of theuserid. If theDOMAINoption is not supplied, the credential store defaults to the OracleGoldenGate domain.For example:
ALTER CREDENTIALSTORE DELETE USER ggadmin ALIAS src_user
-
REPLACE USER userid -
Replaces the user of a given alias or can be used to change the password of an existing user. If the
ALIASoption is not supplied, then the alias name defaults to that of theuserid. If theDOMAINoption is not supplied, then the credential store defaults to the OracleGoldenGate domain.Unless the
PASSWORDoption is used, the command prompts to enter a password for the specified user. When changing the password for a user that includes database connection information, you must include the full value of the currentuserid, otherwise this command will replace the user with the new value supplied.The following example shows how to change the password of an existing user
ggadmin@sourcedsn, aliasSourceMSSQLConnection.ALTER CREDENTIALSTORE REPLACE USER ggadmin@sourcedsn PASSWORD newpassword ALIAS SourceMSSQLConnection
The example shows how to change the user ggadmin of the
pdbeast alias to a new user, which then prompts for the password.
ALTER CREDENTIALSTORE REPLACE USER ggadmin ALIAS pdbeast DOMAIN Production
-
ALIASalias -
Specifies an alias for the user name. Use this option if you do not want the user name to be in a parameter file or command. If
ALIASis not provided, the alias defaults to theUSERname, which then must be used in parameter files and commands where a login is required. You can create multiple entries for a user, each with a different alias, by using theADD USERoption withALIAS.
-
Connection Options -
These are optional connection string settings that can be added to a credential alias, including the SSL attributes. They must be specified as semicolon separated list of attributes, for example,
option1=value1;option2=value2;option3=value3, where the options are the database specific properties along with their allowed values.Following are a list of additional connection string options that can be added to a credential alias, including the SSL attributes.
Note:
Oracle GoldenGate Microservices Architecture supports SSL connections by configuring certain SSL parameters as environment variables. However, this configuration limits the Extract and Replicat process to connect using only the defined SSL environment variables for a deployment and no other SSL or Non-SSL connections are possible. However, a credential store alias also provides the flexibility of configuring the credentials with different SSL or non SSL parameters for different database connections within the same deployment. -
sslCA -
For MySQL and PostgreSQL only. The certificate used to verify the authenticity of the SSL certificates in the PEM format.
-
sslCert -
For MySQL and PostgreSQL. The client's SSL certificate file in the PEM format.
-
sslCrl -
For MySQL. The name of the file containing certification revocation lists in the PEM format.
-
sslKey -
For MySQL and PostgreSQL. The private key file of client in the PEM format.
-
sslMode -
For MySQL and PostgreSQL. The sslMode parameter values are specified in uppercase only. The sslMode options for MySQL are
VERIFY_IDENTITY, VERIFY_CA, REQUIRED, PREFERRED. The sslMode options for PostgreSQL areVERIFY-FULL, VERIFY-CA, REQUIRE, PREFER.For
sslMode=VERIFY_IDENTITY, it is mandatory to provide sslPath, sslCa, sslCert and sslKey. ForsslMode=VERIFY_CA, it is mandatory to provide sslPath and sslCa. -
sslPath -
For MySQL only. The path of the directory that contains trusted ssl Certificate Authority (CA) certificate files in PEM format.
-
DOMAINdomain -
Saves the credential alias under the supplied domain name.
The default domain is OracleGoldenGate. By choosing unique domain names, the same alias can be used by multiple Oracle GoldenGate installations that use the same credential store. For example, the administrators of system 1 might not want system 2 to have access to the same credentials that are used on system 1. Those credentials can be stored as
ALIASpdbeast, for example, underDOMAIN system1, while a different set of credentials can be stored forALIASpdbeast underDOMAIN system2.
-
NOPASSWORD | PASSWORDpassword -
Specify the user's password using the
PASSWORDoption. The password is echoed (not obfuscated) when this option is used. If this option is omitted, the command prompts for the password, which is obfuscated as it is typed (recommended as more secure).Oracle GoldenGate 23ai supports a maximum password length of 1024 bytes.
The
NOPASSWORDoption is the alternative to thePASSWORDoption when using external authentication because password is not required for external authentication such as using Kerberos authentication or IDCS. After theNOPASSWORDoption is set, theDBLOGINcommand can be used to access the database without a password.Also see
USERIDALIASparameter in the Reference for Oracle GoldenGate.
Examples
-
This example adds a user named
ggadminbut omits thePASSWORDspecification, so the command prompts for the password of the pluggable database,pdbeast.ALTER CREDENTIALSTORE ADD USER ggadmin Password: ******** -
This example adds the user
ggadminwith this passwordtigerand specifies the alias aspdbeast.ALTER CREDENTIALSTORE ADD USER ggadmin PASSWORD tiger ALIAS pdbeast -
This example adds the user
ggadminunder the domain ofOracleGoldenGate.ALTER CREDENTIALSTORE ADD USER ggadmin@dbnorth ALIAS pdbeast DOMAIN OracleGoldenGate Password: ******** -
This example adds the user
ggadminusing the Easy Connect Naming Method.ALTER CREDENTIALSTORE ADD USER ggadmin@dbnorth:1521/dbservice_north ALIAS pdbnorth -
This example issues two
ALTER CREDENTIALSTOREcommands, each of which adds aggadminentry, but with a different alias.ALTER CREDENTIALSTORE ADD USER ggadmin@dbeast ALIAS pdbeast Password: ******** ALTER CREDENTIALSTORE ADD USER ggadmin@dbwest ALIAS pdbwest Password: ******** -
The following shows how the
DELETE USERoption works with and without theALIASoption.The following command deletes the
user1entry for which theALIASis the same as the user name.ALTER CREDENTIALSTORE DELETE USER ggadmin Alias: pdbeast Userid: ggadminThe following command deletes the entry for user
ggadminthat is associated with the aliaspdbeast.ALTER CREDENTIALSTORE DELETE USER ggadmin ALIAS pdbeast Alias: pdbeast Userid: ggadmin -
This example uses a SQL*Net connect string as the user value. In this case, the
PASSWORDoption is omitted. The person issuing the command is prompted for the password, which is hidden.ALTER CREDENTIALSTORE ADD USER ggadmin@pdbeast ALIAS pdbeast
- This example creates a domain name Oracle GoldenGate with user ID
ggadminand alias aspdbeastin the Admin Client.ALTER CREDENTIALSTORE ADD USER ggadmin ALIAS pdbeast Password:
- Following example connects using a connection qualifier if using a
BEQ-Bequeath Protocoladapter. For more information on establishing a secure connection using aBEQ-Bequeath Protocoladapter, see Configure Secure Database ConnectionALTER CREDENTIALSTORE ADD USER ggadmin@inst1_beq
-
The following example (Admin Client) adds a user named
ggadminbut with external authentication and therefore uses theNOPASSWORDoption.ALTER CREDENTIALSTORE ADD USER ggadmin@dbeast nopassword alias pdbeastThe output shows:
2020-06-22T21:08:33Z INFO OGG-15102 Credential store created.Running the
INFO CREDENTIALSTOREcommand, you can check the add user to the credential store:INFO CREDENTIALSTORE Default domain: OracleGoldenGate Alias: pdbeast Userid: @ggadminAfter you update the credential store to use the
NOPASSWORDoption, you can use theDBLOGINcommand with Kerberos authentication for your database.DBLOGIN USERIDALIAS pdbeastOutput:
Successfully logged into database pdbeast.
- MySQL
-
Following are some examples to create credential in Admin Client for MySQL.
- SQL Server
-
The following example adds database connection details in the credential store using the DSN.
ALTER CREDENTIALSTORE ADD USER ggadmin@mydsn PASSWORD ***** ALIAS pdbeast