db_get_sql_user (public)

 db_get_sql_user [ -dbn dbn ]

Defined in packages/acs-tcl/tcl/01-database-procs.tcl

Oracle only.

Switches:
-dbn (optional)
The database name to use. If empty_string, uses the default database.
Returns:
a valid Oracle user@database/password string to access a database through sqlplus.

This proc may well work for databases other than Oracle, but its return value won't really be of any use.

Partial Call Graph (max 5 caller/called nodes):
%3 db_load_sql_data db_load_sql_data (public) db_get_sql_user db_get_sql_user db_load_sql_data->db_get_sql_user db_source_sql_file db_source_sql_file (public) db_source_sql_file->db_get_sql_user db_source_sqlj_file db_source_sqlj_file (public) db_source_sqlj_file->db_get_sql_user db_available_pools db_available_pools (public) db_get_sql_user->db_available_pools

Testcases:
No testcase defined.
Source code:
    set pool [lindex [db_available_pools $dbn] 0]
    set datasource [ns_config "ns/db/pool/$pool" DataSource]
    if { $datasource ne "" && ![string is space $datasource] } {
        return "[ns_config ns/db/pool/$pool User]/[ns_config ns/db/pool/$pool Password]@$datasource"
    } else {
        return "[ns_config ns/db/pool/$pool User]/[ns_config ns/db/pool/$pool Password]"
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: