db_source_sqlj_file (public)

 db_source_sqlj_file [ -dbn dbn ] [ -callback callback ] file

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

Oracle only.

Sources a SQLJ file using loadjava.

Switches:
-dbn
(optional)
The database name to use. If empty_string, uses the default database.
-callback
(defaults to "apm_ns_write_callback") (optional)
Parameters:
file

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_install_data_model apm_package_install_data_model (private) db_source_sqlj_file db_source_sqlj_file apm_package_install_data_model->db_source_sqlj_file packages/acs-admin/www/apm/bulk-install.tcl packages/acs-admin/ www/apm/bulk-install.tcl packages/acs-admin/www/apm/bulk-install.tcl->db_source_sqlj_file ad_file ad_file (public) db_source_sqlj_file->ad_file apm_callback_and_log apm_callback_and_log (public) db_source_sqlj_file->apm_callback_and_log db_get_sql_user db_get_sql_user (public) db_source_sqlj_file->db_get_sql_user

Testcases:
No testcase defined.
Source code:
    set user_pass [db_get_sql_user -dbn $dbn]
    set fp [open "|[ad_file join $::env(ORACLE_HOME) bin loadjava] -verbose -user $user_pass $file" "r"]

    # Despite the fact that this works, the text does not get written to the stream.
    # The output is generated as an error when you attempt to close the input stream as
    # done below.
    while { [gets $fp line] >= 0 } {
        # Don't bother writing out lines which are purely whitespace.
        if { ![string is space $line] } {
            apm_callback_and_log $callback "[ns_quotehtml $line]\n"
        }
    }
    if { [catch {
        close $fp
    } errmsg] } {
        apm_callback_and_log $callback "[ns_quotehtml $errmsg]\n"
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: