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 (optional, defaults to
"apm_ns_write_callback"
)- Parameters:
- file (required)
- Partial Call Graph (max 5 caller/called nodes):
- 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