2.3.4 Import Connections
Import one or more connections to the common connection store.
Connect files may contain encrypted passwords and other credentials.
When importing connections with encrypted passwords, the encryption key is required to decrypt the passwords. The encryption key may be provided with the import command by first securing it with a secret. For more information about using a secret, see SECRET Command. If no key is provided with the import command, a prompt is displayed to request the key.
The passwords can be removed from imported connections by specifying the
-strip_passwords
option.
Syntax
connmgr|cm import {OPTIONS} {PARAMETERS}
Options
Option | Description |
---|---|
-duplicates | d | dups |
Indicates how to handle imported connections whose names match an existing connection.
|
-key | The public name of a secret that protects the encryption key used
to encrypt passwords in the file.
Note: If the encryption key is invalid, the connections are imported with the passwords removed. |
-strip_passwords | s | strip | Indicates that encrypted passwords be stripped from imported connections. |
Parameters
Parameter | Description |
---|---|
path | A single file or directory containing one or more connections to import. If the path is an archive file, the archive is checked for a single connection definition. If the path is a JSON file, it is checked for legacy connection definitions. If the path is a directory, it is checked for more archives containing connection definitons. |
Example
To create a secret for the encryption key and specify the secret name when importing connections from a file:
SQL> SECRET SET mySecret <encryption key>
SQL> CONNMGR IMPORT -KEY mySecret myconns.json