The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 04-28-2008
hanu_oracle hanu_oracle is offline
Registered User
  
 

Join Date: Mar 2008
Location: MUMBAI, INDIA
Posts: 41
Connect Data Base from Shell Script

Quote:
Originally Posted by jisha View Post
Hi All,

How to access the postgreSQL from a perl script?
Thanks in advance
JS
The following method is used to connect plsql from the Bash:

sqlplus -l USERNAME/PASSWORD@DBNAME <<EOF
insert into TABLE_CFS_DUMP(FILE_NAME, REGION_ID, SDP_ID, SEQUENCE_ID, TOTAL_RECORDS) values ('$file','$region_id','$sdp_id','$sequence_id', '$sub_records');
EXIT
EOF