Problem in running Perl script through oracle

Hi,
I am facing one problem in perl script.
" I have one perl script which is interact with sybase database.We have migrated the sybase database to oracle successfully.Now i wanna to change the perl script to interact with oracle database.
I am using the code like that for interacting the oracle database
Old Code with sybase database : use DBI::Sybase::GFAS;
New code with oracle database : Use DBI::oracle::GFAS;
When i am running the perl script,Its showing the below mentioned error:
Can't locate DBI/oracle.pm in @INC (@INC contains: C:\oracle\product\10.2.0\db_1
\perl\5.8.3\lib\MSWin32-x86 C:\oracle\product\10.2.0\db_1\perl\5.8.3\lib/MSWin32
-x86-multi-thread C:\oracle\product\10.2.0\db_1\perl\5.8.3\lib C:\oracle\product
\10.2.0\db_1\perl\5.8.3\lib\MSWin32-x86 C:\oracle\product\10.2.0\db_1\perl\site\
5.8.3 C:\oracle\product\10.2.0\db_1\perl\site\5.8.3\lib/MSWin32-x86-multi-thread
C:\oracle\product\10.2.0\db_1\perl\site\5.8.3\lib C:\oracle\product\10.2.0\db_1
\sysman\admin\scripts C:/Perl/lib C:/Perl/site/lib .) at hello.pl line 4.
BEGIN failed--compilation aborted at hello.pl line 4.
Anyone have any idea about this error.
Thx in advance.

If you look in the oracle home in the perl\site\5.8.3\lib\MSWin32-x86-multi-thread directory you will see two directories. Once is DBI and one is DBD.
All you need in your perl program is a line 'use DBI'. It will use DBD automatically as and when required. You can specify the necessary connection information when you issue the DBI->connect statement.
I have successfully managed to connect to Oracle databases and perform DML using the software installed by default. You don't need to download and install anything else.
I'm no perl expert so maybe some functionality is missing using the interfaces provided by Oracle but for my needs it has sufficed.
Hope this helps.

Similar Messages

  • How to run Perl script in Java program?

    Some say that the following statement can run Perl script in Java program:
    Runtime.getRuntime().exec("C:\\runPerl.pl");
    But when I run it, it'll throw IOException:
    java.io.IOException: CreateProcess: C:\runPerl.pl error=193
    at java.lang.Win32Process.create(Native Method)
    at java.lang.Win32Process.<init>(Win32Process.java:63)
    at java.lang.Runtime.execInternal(Native Method)
    at java.lang.Runtime.exec(Runtime.java:566)
    at java.lang.Runtime.exec(Runtime.java:428)
    at java.lang.Runtime.exec(Runtime.java:364)
    at java.lang.Runtime.exec(Runtime.java:326)
    at test.runPerl.main(runPerl.java:16)
    Exception in thread "main"
    Where is the problem? In fact, I do have a Perl script named "runPerl.pl" in my C:/ directory. Could anybody tell me why it can't be run? Thanks in advance.

    Hello sabre,
    First of all thanks for your reply.
    I have tried like what you mentioned.
    Eventhough, i could get the exact error message.
    I could get the Exception
    "Exception:java.lang.IllegalThreadStateException: process hasn't exited"
    <code>
    import java.io.*;
    public class Sample{
    public static void main(String args[]) {
    String s = null;
    Process p;
    try
         p = Runtime.getRuntime().exec("tar -vf sample.tar");
         //p.waitFor();
         if(p.exitValue() == 0)
              System.out.println("CommandSuccessful");
         else
              System.out.println("CommandFailure");
    catch(Exception ex)
         System.out.println("Exception:"+ex.toString());
    </code>
    In this code, i tried to run the "tar command". In this command i have given -vf instead -xvf.
    But it is throwing
    "Error opening message catalog 'Logging.cat': No such file or directory
    Exception:java.lang.IllegalThreadStateException: process hasn't exited
    CommandFailure"
    "Error opening message catalog 'Logging.cat'" what this line means ie,
    I dont know what is Logging.cat could you explain me its urgent.
    Thanks in advance.
    Rgds
    tskarthikeyan

  • Can servlets/ jsp automatically run perl scripts and executables?

    I'm a student and am new to to servlets and web programming in general.
    I need to know if it's possible to run perl scripts and executables automatically from servlets/ jsp.
    The program I am planning on creating should have a client outside a firewall that uploads perl files to a gateway machine inside the firewall, the servlet should be able to run this perl file, and then pass the resulting file as an argument to an executable, to be run by another servlet on a different server.
    I've tried looking everwhere for an answer to this and am about to revert to a cgi based approach because I'm not sure if it would work so any help/ suggestions would be much appreciated.

    Hallo,
    I think using java Runtime will help. you can do Processes that execute shell or system commands through
    Process process = Runtime.getRuntime().exec("your perl scripts here!");
    Bye

  • Can I run perl scripts on a iplanet App Server instead of web server

    Hello,
    We have some perl scripts running on a iWS 6.0 in DMZ (Tier1) which acess Oracle Server(Tier 3). I want to restrict machines on DMZ access Oracle server directly. Instead I want all the database calls to orignate from iPlanet App server on Tier 2. To make this happen I have to run Perl scripts on App server. Is this feasible as the J2EE iPlanet App can run only C++ or Java.. Any leads helps me lot..
    Thanks
    Sudhir Nallagangu

    According to the J2EE specs you should use EJBs and Servlets in the iAS! Running a perl script for db access sounds like good old cgi times.
    But generally it is possible to call a perl script from within iAS. But don't do it!

  • Run Perl script in my Java program

    Some say that the following statement can run Perl script in Java program:
    Runtime.getRuntime().exec("C:\\runPerl.pl");
    But when I run it, it'll throw IOException:
    java.io.IOException: CreateProcess: C:\runPerl.pl error=193
    at java.lang.Win32Process.create(Native Method)
    at java.lang.Win32Process.<init>(Win32Process.java:63)
    at java.lang.Runtime.execInternal(Native Method)
    at java.lang.Runtime.exec(Runtime.java:566)
    at java.lang.Runtime.exec(Runtime.java:428)
    at java.lang.Runtime.exec(Runtime.java:364)
    at java.lang.Runtime.exec(Runtime.java:326)
    at test.runPerl.main(runPerl.java:16)
    Exception in thread "main"
    Where is the problem? In fact, I do have a Perl script named "runPerl.pl" in my C:/ directory. Why can't it be run?

    Please don't crosspost
    http://forum.java.sun.com/thread.jspa?threadID=703918

  • Run Perl script in JAVA

    Can we run perl scripts in java, still supporting perl API?
    Thanks a lot for help!

    I haven't tried it but I think 6.0 supports some
    scripting.But NOT perl!Sorry, I didn't mean some Perl Scripting. I meant some scripting and I wasn't sure what languages.

  • How we can call or execute a SHELL script through Oracle forms or Reports

    How we can call or execute a SHELL script through Oracle forms or Reports.Its urgent.......

    Use HOST command.

  • Perl problem? Run postflight script

    Yesterday my USB mobile internet aircard wouldn't mount in OS X (10.5.6). I spent hours on the phone with the ISP's tech support, and they ultimately had me download and reinstall the software. When I attempted to install that software, it failed with this error message: "The following install step failed: run postflight script for Franklin Wireless".
    A few hours later I tried to install a different program (unrelated to the internet issue) and I got the same kind of message "The following install step failed: run postflight script"
    I've googled for hours, and there's almost nothing out there. Everything I did find led me to stuff about "perl" and "bash". I'm not exactly new to computers, but I'm not a programmer either and I don't understand any of that.
    I don't know what to do here. Is it possible my "perl" is corrupted or missing? Or my "bash"? I checked my software updates and I happened to be due for an upgrade to 10.5.7. So, I did that hoping it might fix anything that was corrupted or missing. But, afterwards I tried the install again and got the same error.
    I'm 2,000 miles from home on the second day of a two-week business trip. I need my computer to work, I need the internet access...basically I'm screwed. If ANYONE can offer any insight, I would be eternally grateful.
    Thank you.

    Check the Console messages and post back anything that looks interesting after getting the postflight error.
    Eric
    Ps. Doesn't the hotel have internet you can hook to?
    Message was edited by: ericmeyers

  • How to run a script on Oracle server from isqlplus

    Hi I am trying to run a script on my workstation from Oracle server through isqlplus workarea. I entered following command and get the following error. i have enabled isqlplus URL by editing web.xml file already. Can please someone help how to run the script?
    @http://myaixserver.com:5560/scripts/Databasestartupstages.sql;
    SP2-0920: HTTP error 'page not found (505)' on attempt to open URL

    So far, you haven't specified your rdbms version and isqlplus behaved differently on a 9iR1, 9iR2 from the one release on 10gR1/R2. on 9i it was a servlet based on a JServ servlet executor machine, meanwhile on 10g it is a J2EE compliant application deployed on an OC4J container, so configuration is different.
    You may want to take a look at these references -->
    * Starting iSQL*Plus from a URL
    * Creating Reports using iSQL*Plus
    ~ Madrid

  • Problem when running a script

    Hi, i am trying to run a script in SQL*Plus that has been supplied by Metalink but i am very new to SQL*Plus and i connot get the script to run correctly.
    FYI we are curently using Oracle 11.5.10.
    I logon to SQL*Plus successfully then i start the script like this:-
    Start INVct115h
    The script appears to run correctly and prompts me to enter the the user name, but after i do this i get the following error:-
    ERROR - Could not retrieve any responsibilities for this User
    ACTION - Ensure User is valid and has at least one responsibility assigned.
    Type Ctrl-C <Enter> to exit the script. Rerun the script with a valid user
    name.
    Do you have any ideas what it is that i am doing wrong? I know the password and host names are correct.
    Thanks
    Anna

    Hi, thank you for your comments but i am trying to run the script in SQL*Plus version 9.2.0.1.0 and while yes i agree the error is not a SQL*Plus error it was the error that the script produced.
    The script should be list all the responsibilites for the user entered but for reasons that i do not understand it is not being able to find the user.
    SQL*Plus indictates that i have successfuly connected to the correct database.
    But maybe you are correct and this not a SQL*plus problem.
    Regards,
    Anna

  • Cannot run SQL script on Oracle Database 10g Express Edition

    I'm trying to upload a script, and the file is being uploaded fine, but in the Script Editor window where I'm going to actually run the script, the entire file content is shown on one line and the whole edit area is in red. I'm not being able to run that script. Also if I create a new script from the editor, the edit area is again in red and I'm not able to save it. Please help me understand what's to be done so that I can run my SQL scripts.

    I'd bet the database is down.
    Try a login through sqlplus ("Run SQL Command Line" in the Oracle Express Edition 'Start' menu).
    Do a CONN / AS SYSDBA
    If you get a message about database or memory area not available, try STARTUP.
    If that doesn't work, you are best off in the General Database forum or the Express Edition forum.
    You'll probably get the most expert response in General Database, but the Express Edition forum can be gentler on newbies (as it is more accepted that questioners are not and do not have access to full-time DBAs).

  • ANM VA - run perl script to obtain and genarate reports.

    Good day,
    We have a customer who has an ANM deployment at a site. This is a HA deployment on RedHat. The customer created a perl script to run off an external host to generate reports. This was acheievd by querying the sqldatabase (dcm_ems). ANM version is 3.2. No problems.
    An additional ANM deployment was done on another site. ANM version 4.2. This deployment is the VA edition. They would like to deploy and run the same perl script.
    Is this possible on the VA Edition? Even with the RootPatch? Not sure of the level of access the patch provides, or if it is even recommened or would then still allow for the ANM to be supported? If possible, has the sqldatabase structure changed (suppose would need this for the guy's to ammend the script)? How would we obtain the "sqluser" and "sqlpwd" info for the perl script to use?
    Appreciate any guidance or feedback.
    Thank you in advance.
    Paul.

    Hi esteemed forum members,
    Any ideas or feedback anyone?
    Thanks.
    Paul.

  • Issue with running a script in Oracle test manager

    Tool - Open Script 9.0.1 , OTM
    Hi All
    I am facing issue while executing a open script with Oracle Test Manager , I have a script which was made with open script 9.0.1 and which is running very fine with the Open Script UI ,
    problem occurs once I am trying to run this with OTM.Issue looks that playback was so fast in OTM so that script was not able to recognize some of the objects.
    Is there anyway so that I can control the speed of playback at any particular step when I am using OTM
    Thanks

    Hi Kumar,
    Regarding your query below is the suggestion:
    You have to configure the job server with the repository. While configuring the adapter, you have to configure the job server in management console also..
    Still if you are facing issue then please share Job Server logs available in BODS Job Server Folder and error screenshot to debug the issue.
    Thanks,
    Daya

  • Problems to run shell scripts in terminal

    Hey mates,
    I'm not very experienced in writing shell scripts. However, I received a few shell scripts I wanted to execute. I used following command:
    chmod u+x model.sh
    I did not received any error message so that I think that this command works. Afterwards, I wanted to run these file with:
    ./model.sh
    However, it doesn't work, I receive an error message:
    -bash: ./model.sh: /bin/sh^M: bad interpreter: No such file or directory
    If I choose another shell script of my colleague I can run it and it works properly. What's the problem?
    I use in all shell scripts the same syntax starting with
    "! /bin/sh
    Thus, I don't see the reason why the first script isn't running while the second one is fine.
    Help appreciated!
    cheers,
    Thomas

    Unix and Terminal questions are best asked in the Mac OS X Technologies > Unix Forum
    <http://discussions.apple.com/forum.jspa?forumID=735>
    As jsd2 has pointed out, you CANNOT have Windows <CR><LF> line terminators in your file (aka ^M^J). Just about every Unix shell will choke on the <CR>
    We run into this problem all the time with users moving Unix shell scripts through a Windows system and having Windows convert the <LF> terminated Unix files into Windows <CR><LF> files, and then either use them in a Windows Cygwin environment (where they "Barf"), or move them back to a Unix system with the <CR><LF> line terminations still in the scripts, and they "Barf".
    You can look at the contents of your scripts using the following command
    cat -v script.name
    Any ^M characters found at the end of lines will be part of <CR><LF> Windows line terminators.
    You can use the following command to remove the <CR> from those files
    tr -d '
    ' <script.name >new.name
    chmod +x new.name
    If you wish to pursue this further, I would suggest using the Mac OS X Technologies > Unix Forum
    <http://discussions.apple.com/forum.jspa?forumID=735>

  • Problems in running the servlet in Oracle JDeveloper

    I have problems in running servlets(http servlet) in oracle jDeveloper.
    Heres the code
    package view;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Servlet1 extends HttpServlet {
    private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    public void doGet(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException {response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.println("<head><title>Servlet1</title></head>");
    out.println("<body>");
    out.println("<p>The servlet has received a GET. This is the reply.</p>");
    out.println("</body></html>");
    out.close();
    When Im about to run this code in the IDE it throws a fatal error
    Error initializing server: At least one valid code-source or import-shared-library element is required for shared-library "global.libraries" in /D:/jdevstudio10132/jdev/system/oracle.j2ee.10.1.3.40.66/embedded-oc4j/config/server.xml.
    07/09/12 21:37:43 Fatal error: server exiting
    does anyone know here whats the problem???

    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Servlet1 extends HttpServlet {
    private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter(); out.println("<html>"); out.println("<head><title>Servlet1</title></head>");
    out.println("<body>");
    out.println("
    The servlet has received a GET. This is the reply.
    "); out.println("</body></html>");
    out.close();
    When Im about to run this code in the IDE it throws a fatal error Error initializing server: At least one valid code-source or import-shared-library element is required for shared-library "global.libraries" in /D:/jdevstudio10132/jdev/system/oracle.j2ee.10.1.3.40.66/embedded-oc4j/config/server.xml. 07/09/12 21:37:43
    Fatal error: server exiting does anyone know here whats the problem???

Maybe you are looking for