If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Perl and the DBI > SQLLDR in Perl

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-19-08, 09:58
radsampath radsampath is offline
Registered User
 
Join Date: Nov 2008
Posts: 3
SQLLDR in Perl

Hi

I am able to use the sqlldr in shell command but when i try to use the same in the perl script i am facing problem

The following is the command which i am using

sub oracleConnectivity()
{
my $db_instance = $PROPERTIES{"ENCORE_DB_INSTANCE_NAME"};
my $db_user = $PROPERTIES{"ENCORE_DB_SCHEMA_NAME"};
my $db_pass = $PROPERTIES{"ENCORE_DB_PASSWORD"};
my $encore_table = $PROPERTIES{"ENCORE_TABLE"};

my $bad_file = $PROPERTIES{"ENCORE_SECURITIES_BAD"};
my $cntrl_file = $PROPERTIES{"ENCORE_SECURITIES_CTRL"};
my $log_file = $PROPERTIES{"ENCORE_SECURITIES_LOG"};
my $data_file = $PROPERTIES{"ONETIMELOAD_DIR"}."/".$PROPERTIES{"ONETIMELOAD_FILE"};

&Log ("The data file is $data_file");
&Log ("The bad file is $bad_file");
&Log ("The control file is $cntrl_file");
&Log ("The db instance is $db_instance ");
&Log ("The db user is $db_user");
&Log ("The db pass is $db_pass");
&Log ("The log file is $log_file");

`sqlldr '$db_user'/'$db_pass'@'$db_instance' \
data='$data_file' \
bad='$bad_file' \
control='$cntrl_file' \
log='$log_file'`;
}
The error which i am getting is

SQL*Loader-704: Internal error: ulconnect: OCIServerAttach [0]
ORA-12545: Connect failed because target host or object does not exist


Iam not getting the same when i use in shell script

any clues
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On