In EBS JDBC connection are required while migrating XML files to other environments. XML files are source for XML publisher reports and OAF personalization.
Like FNDLOAD Oracle has provided JPXimporter and XDOloder java utilities to inport XML data into standard database tables. Java utilities require JDBC connection in order to execute and hence below are 2 methods to get JDBC connection.
Method 1 > Using Database
Parameters
|
Oralce Functions
|
Host Name/IP Address
|
UTL_INADDR.get_host_address
|
SID
|
sys_context('userenv','instance_name')
|
Port
|
Hard Code
|
Method 2 > Using context files
Server has context file to store all context details. One can connect to server and extract the jdbc connection string using unix command.
lv_contxtfile=`echo $CONTEXT_FILE`
|
echo "CONTEXT_FILE : $lv_contxtfile"
|
lv_jdbc=`grep '</jdbc_url>' $lv_contxtfile | cut -d "@" -f2 | cut -d "<" -f1`
|
echo "JDBC COnnection String : $lv_jdbc"
|
o Echo $CONTEXT_FILE will list the context file name with full path
o Grep will search string “</jdbc_url>” in context file and returned line will be cut from literal “@”. –f2 will return the right side portion from “@”.
o Which will be cut further with literal “<” and -f1 will return the left side portion now.
o The final output should be complete JDBC_STRING, which can be used.
** Thanks to my colleagues Srini & Manish for above info **
No comments:
Post a Comment