Function: org-babel-sql-dbstring-oracle
org-babel-sql-dbstring-oracle is a byte-compiled function defined in
ob-sql.el.gz.
Signature
(org-babel-sql-dbstring-oracle HOST PORT USER PASSWORD DATABASE)
Documentation
Make Oracle command line arguments for database connection.
If HOST and PORT are nil then don't pass them. This allows you to use names defined in your "TNSNAMES" file. So you can connect with
<user>/<password>@<host>:<port>/<database>
or
<user>/<password>@<database>
using its alias.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ob-sql.el.gz
(defun org-babel-sql-dbstring-oracle (host port user password database)
"Make Oracle command line arguments for database connection.
If HOST and PORT are nil then don't pass them. This allows you
to use names defined in your \"TNSNAMES\" file. So you can
connect with
<user>/<password>@<host>:<port>/<database>
or
<user>/<password>@<database>
using its alias."
(when user (setq user (shell-quote-argument user)))
(when password (setq password (shell-quote-argument password)))
(when database (setq database (shell-quote-argument database)))
(when host (setq host (shell-quote-argument host)))
(cond ((and user password database host port)
(format "%s/%s@%s:%d/%s" user password host port database))
((and user password database)
(format "%s/%s@%s" user password database))
(t (user-error "Missing information to connect to database"))))