salt.modules.oracle
Oracle DataBase connection module
- maintainer
-
Vladimir Bormotov <bormotov@gmail.com>
- maturity
-
new
- depends
-
cx_Oracle
- platform
-
all
- configuration
-
module provide connections for multiple Oracle DB instances.
OS Environment
ORACLE_HOME: path to oracle product PATH: path to Oracle Client libs need to be in PATH
pillar
oracle: dbs: <db>: uri: connection credentials in format: user/password@host[:port]/sid[ servicename as {sysdba|sysoper}] optional keyword servicename will determine whether it is a sid or service_name <db>: uri: .....
-
Oracle Client Version
CLI Example:
salt '*' oracle.client_version
salt.modules.oracle.client_version()
-
Run SQL query and return result
CLI Example:
salt '*' oracle.run_query my_db "select * from my_table"
salt.modules.oracle.run_query(db, query)
-
Show databases configuration from pillar. Filter by *args
CLI Example:
salt '*' oracle.show_dbs salt '*' oracle.show_dbs my_db
salt.modules.oracle.show_dbs(*dbs)
-
Show Environment used by Oracle Client
CLI Example:
salt '*' oracle.show_env
Note
at first _connect()
NLS_LANG
will forced to '.AL32UTF8'
salt.modules.oracle.show_env()
-
Show Pillar segment oracle.* and subitem with notation "item:subitem"
CLI Example:
salt '*' oracle.show_pillar salt '*' oracle.show_pillar dbs:my_db
salt.modules.oracle.show_pillar(item=None)
-
Server Version (select banner from v$version)
CLI Example:
salt '*' oracle.version salt '*' oracle.version my_db
salt.modules.oracle.version(*dbs)
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.oracle.html