The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Calling a perl script from a perl script new2ss Shell Programming and Scripting 6 05-24-2009 05:03 PM
Access Sharepoint via perl tcomku Shell Programming and Scripting 0 03-04-2008 11:12 PM
Perl Database access mercuryshipzz Shell Programming and Scripting 2 01-16-2008 01:54 AM
Perl: Run perl script in the current process vino Shell Programming and Scripting 10 12-09-2005 10:45 AM
Perl CGI to access / edit "root" owned config files WIntellect Shell Programming and Scripting 1 04-23-2003 03:48 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-28-2008
jisha jisha is offline
Registered User
  
 

Join Date: Jan 2008
Location: Bangalore,India
Posts: 144
Arrow How to access psql from perl script?

Hi All,

How to access the postgreSQL from a perl script?
Thanks in advance
JS
  #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
  #3 (permalink)  
Old 04-28-2008
KevinADC KevinADC is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2008
Posts: 731
use the DBI module and the respective driver for the type of database. You will probably have to install the DBI module and the driver. You can find them on CPAN.

The CPAN Search Site - search.cpan.org

I can't help with code examples because my SQL knowledge is very limited.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:51 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0