2.7 Connecting to a Database
Use the CONNECT
command to connect to a database.
The options specified automatically determine the kind of connection
required, such as whether it is a traditional client-server connection or a
wallet-based cloud connection. You can override this by using options that specify a
particular connection type. For example, specify -wallet
to use the
wallet connection type.
The connection types supported in SQLcl are:
- KERBEROS
- NAME
- OCI
- ORACLE
- OREST
- RADIUS
- SOCKS
- THIRD
- WALLET
For more information, see the CONNECT command.
Persistent connections can be managed with the CONMGR
command. Persistent connections are referenced by a connection name. Connections may
store a user name. If a user name is stored, a password may also be stored.
Passwords are stored in a secure wallet. If a password is not stored, it is provided
when prompted to create the connection. A stored connection may describe a
connection in a variety of formats, including basic host name, port and service name
values or a TNS name and a cloud configuration.
To add a stored connection, see NAME Connection Type.
To save a stored connection, see the options -save
,
-savepwd
, and -replace
in CONNECT.
For more information about the command, see CONMGR.