oh great
Thanks Amit
I shall let u know - how does that work for me :-)...
User Profile
Collapse
-
Hi Amit,
In perl, I am using DBI to call stored procedure. May you tell me a way so that i can write dbms_output.put _line statement to a log file through perl or to the terminal.
like in Unix we can say set serveroutput on, what we can do in perl for that...Leave a comment:
-
yes i was hoping to have the details in a configuration kind of file - like we have properties file in java.
so that when my script goes in production env - i just need to edit user name, pwd and db details in just this config file.
i searched on net - guess there rea a no of ways like 'require' , use .....
but i couldn't write the working code.
can you please gimme an example - what format should...Leave a comment:
-
Hi Amit,
I have all the database details(user name and password also) in the perl script - hard coded.
what should be the best way to hide this. I guess i should have that in a seperate file and use it in main perl script.
Can you please tell me what is the way in perl to do this...Leave a comment:
-
Oh - is it?
Thanku so much Amit.
You have been a great help to me :-)Leave a comment:
-
ok,
because of client recomendation i have to use perl now.
in perl i am getting a return value of 1 in rc:
i guess 1 is for faliure but it's not giving any error also - any thoughts?
eval { $sql_cmd = "BEGIN\n$stored _proc_mauisecon d( p_num_rec => :p_num_rec, p_upper_bound => :p_upper_bound) \;END\;";
$sth = $dbh->prepare( $sql_cmd );
...Leave a comment:
-
I cann't touch the stored procedure. I was looking for some solution in unix itself.
If i can get the error code and message in shell script. Like now when i run my shell script - at unix prompt i am getting that error message. If i can capture that message in script itself and then i can write that error message into a log file after attaching some more information to it.
I hope you are getting me....Leave a comment:
-
Thanks Amit
for such a quick response.
the thing is that i am very new to Unix - this is my first assignment.
I was searching for a sample script on net - to capture return code and also if i can get the exact return code so that i can log that in a log file with the error message and error code.
like this time i am getting the following error:
DBD::Oracle::st execute failed: ORA-01403: no...Leave a comment:
-
hi,
Thanks for all your responses.
Ok - it's working now - the user id - i was given by the DBA was not having excecute rights for the stored procedures.
need your help on - how do i know - that my stored procedure has run successfully or it has been failed.
there is some oncept of return codes - right? please help me on that....Leave a comment:
-
Ok, yeah i got a Unix server now where oracle is also installed.
Now i searched for some sample script on net and got the one below for me:
#!/bin/sh
sqlplus UID/PWD@Hostname
exec my_proc
whenever SQLError exit faliure
but it doesn't work. do you see any issues with this....Leave a comment:
-
well - In my case, I have a unix box and then the database is lying on some other database server (different phisical machine)
so can't we connect to that database from this box like we connect to any remote database through java like using jdbc driver...Leave a comment:
-
Hi Amit,
Thanks for your response.
Can you please answer the two doubts which i have asked?Leave a comment:
-
calling a stored procedure from a unix script
Hi,
I don't have any experiance of UNIX and oracle.
but i have got a short assignment for writing a unix script that will call a stored procedure. this script has to run this procedure after every two mintes.
I have a few questions before actually start writing the script:
1. Do i have to have unix and oracle on same server.
2. what libraries i need to in unix, if any
I tried...
No activity results to display
Show More
Leave a comment: