create-standby-database
¶
Description¶
Creates a new standby database for the given source database id.
Required Parameters¶
-
--database-admin-password
[text]
¶
The administrator password of the primary database in this Data Guard association.
The password MUST be the same as the primary admin password.
-
--source-database-id
[text]
¶
The OCID of the source (primary) database for the Data Guard group.
Optional Parameters¶
-
--db-unique-name
[text]
¶
Specifies the DB_UNIQUE_NAME of the standby database to be created.
-
--is-active-data-guard-enabled
[boolean]
¶
True if active Data Guard is enabled.
-
--protection-mode
[text]
¶
The protection mode to set up between the primary and standby databases. For more information, see Oracle Data Guard Protection Modes in the Oracle Data Guard documentation.
IMPORTANT - The protection mode is required for first standby to be created.
Accepted values are:
MAXIMUM_AVAILABILITY, MAXIMUM_PERFORMANCE
-
--sid-prefix
[text]
¶
Specifies a prefix for the Oracle SID of the standby database to be created.
-
--source-tde-wallet-password
[text]
¶
The existing TDE wallet password of the source (primary) database.
-
--transport-type
[text]
¶
The redo transport type to use for the standby database to be created. Valid values depend on the specified protectionMode:
MAXIMUM_AVAILABILITY - SYNC * MAXIMUM_PERFORMANCE - ASYNC
For more information, see Redo Transport Services in the Oracle Data Guard documentation.
Accepted values are:
ASYNC, SYNC
Global Parameters¶
Use oci --help
for help on global parameters.
--auth-purpose
, --auth
, --cert-bundle
, --cli-auto-prompt
, --cli-rc-file
, --config-file
, --connection-timeout
, --debug
, --defaults-file
, --endpoint
, --generate-full-command-json-input
, --generate-param-json-input
, --help
, --latest-version
, --max-retries
, --no-retry
, --opc-client-request-id
, --opc-request-id
, --output
, --profile
, --proxy
, --query
, --raw-output
, --read-timeout
, --realm-specific-endpoint
, --region
, --release-info
, --request-id
, --version
, -?
, -d
, -h
, -i
, -v
Example using required parameter¶
Copy the following CLI commands into a file named example.sh. Run the command by typing “bash example.sh” and replacing the example parameters with your own.
Please note this sample will only work in the POSIX-compliant bash-like shell. You need to set up the OCI configuration and appropriate security policies before trying the examples.
export database_admin_password=<substitute-value-of-database_admin_password> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/db/database/create-standby-database.html#cmdoption-database-admin-password
export source_database_id=<substitute-value-of-source_database_id> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/db/database/create-standby-database.html#cmdoption-source-database-id
oci db database create-standby-database --database-admin-password $database_admin_password --source-database-id $source_database_id