When you need to store database login credentials securely, two common options are available to DBAs:
using Oracle Wallet
or SQLcl’s -savepwd
option.
Oracle Wallet
is a secure, encrypted container managed by Oracle,
while -savepwd
stores credentials in a user-local encrypted file.
Those methods differ significantly in security and usage.
Oracle Wallet is a secure container for storing credentials or certificates used to connect to databases. It supports auto-login, allowing passwordless connections.
ewallet.p12
and cwallet.sso
.-savepwd
SQLcl allows saving login credentials using either full connection strings or TNS aliases defined in tnsnames.ora
, such as:
# Using a full connection string
sql -save my_conn -savepwd scott/tiger@//dbhost:1521/orclpdb1
# Using a TNS alias
sql -save my_alias -savepwd scott/tiger@ORCL_ALIAS
connections.json
file in the user’s home directory :
~/.sqlcl
on Linux%USERPROFILE%\sqlcl
on Windows).Feature | Oracle Wallet | SQLcl -savepwd |
---|---|---|
Security level | High (strong encryption) | Medium (OS user-dependent) |
OS user dependency | No | Yes |
Tool support | All Oracle tools | Only SQLcl |
Production suitability | Recommended | Not recommended |
Developer convenience | Requires initial setup | High |
Use Oracle Wallet for secure, production-grade automation.
Use -savepwd
only for quick, personal, or development use where convenience outweighs strict security.