Problem in running the Perl script by oracle

Hello
I am facing a problem in the perl script.

«I have a perl script which is interacting with the sybase database.» We have migrated successfully to the sybase database to oracle. Now, I want to change the perl script to interact with the oracle database.
I use code like this to the interaction of the oracle database

Old Code with sybase database: use DBI::Sybase:GFAS;
New oracle database code: use DBI::oracle:GFAS;

When I execute the script perl, its display of the mentioned below error:

Cannot find 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
x 86-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.) on line 4 of the hello.pl.
BEGIN failed--compilation abandoned at hello.pl line 4.


Anyone has any idea about this error.

Thanks in advance.

If you look in the oracle in the perl\site\5.8.3\lib\MSWin32-x86-multi-thread directory, you will see two directories. Once is DBI and DBD is.

Everything you need in your perl program is a line 'using the DBI '. It will use DBD automatically as needed. You can specify the necessary connection information when you cause the DBI-> connect statement.

I managed to connect to the Oracle database and perform DML through the software installed by default. You don't need to download and install anything else.

I'm no expert, so maybe it lacks some features by using the interfaces supplied by Oracle, but for my needs, it sufficed to perl.

I hope this helps.

Tags: Database

Similar Questions

  • need help to run the perl script invoking ESX ssh command power CLI

    I tried with the VCLI function call, but my perl script does not work... If I want to download my script for ESX (not ESxi) perl file, then run the command that will display the value in the directory/tmp, then pull the output file in/tmp local VC no matter what directory

    something like this article using plink.exe http://communities.VMware.com/message/1260100#1260100

    comm and I want to run ""iam_extract_global.pl perl - customer < customer name > - /tmp/xxxxxx.mef outfile " "


    so I need pul /tmp/xxxxx.mef to the local directory

    Try to place the string values in the first 3 lines in quotes.

    $User = "root".
    $Pswd = "xxxxx".
    $ESXname = "xxxxxxx".

  • Problem to run the shell script procedure

    Hello

    I wrote a shell script which needs to execute the stored procedure

    The shell script:
    cat bi_loading2.sh
    #!/usr/bin/ksh
    export ORACLE_BASE=/u01/app/oracle
    export ORACLE_HOME=/u01/app/oracle/product/11.2.0/DWH11gR2
    export ORACLE_SID=DWH
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
    echo "zero  arg  is  :$0"
    echo "First arg  is  :$1"
    echo "Second arg is  :$2"
    
    
    /u01/app/oracle/product/11.2.0/DWH11gR2/bin/sqlplus  system/xxx@dwh << EOF
    insert into SYSTEM.POC_EXDATA_RESULTS  values($1,'$2',sysdate,null);
    commit;
    
    
    execute system.$2;
         
    update SYSTEM.POC_EXDATA_RESULTS
    set end_date=sysdate
    where id= $1;
    
    commit;
    EOF
    exit 0
    The script gets two parameters: id (1) (2) the procedure that I have to run

    As you can see below oracle is to omit the 'run' command
    Please notice why I can't run the stored procedure.


    $ 83 poc_cf54xbx6cchf2 bi_loading2.sh
    zero  arg  is  :bi_loading2.sh
    First arg  is  :83
    Second arg is  :poc_cf54xbx6cchf2
    
    SQL*Plus: Release 11.2.0.2.0 Production on Thu Dec 15 17:46:37 2011
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    With the Partitioning, Automatic Storage Management and Real Application Testing options
    
    SQL> 
    1 row created.
    
    SQL> 
    Commit complete.
    
    SQL> SQL> SQL> BEGIN  system.poc_cf54xbx6cchf2; END;
    
                    *
    ERROR at line 1:
    ORA-06550: line 1, column 17:
    PLS-00103: Encountered the symbol "SYSTEM" when expecting one of the following:
    := . ( @ % ;
    The symbol ":=" was substituted for "SYSTEM" to continue.
    
    
    SQL> SQL>   2    3  
    4 rows updated.
    
    SQL> 
    Commit complete.

    Read the error stack.

    ORA-06512: at "SYSTEM.POC_CF54XBX6CCHF2", line 3
    

    The error is on line 3 of the POC_CF54XBX6CCHF2 procedure
    If the procedure is called.

    ----------
    Sybrand Bakker
    Senior Oracle DBA

  • If I run the calc script to aggregate a BSO cube, it blocks and release each block in a few seconds?

    Hello

    If I run the calc script to aggregate a BSO cube, it blocks and release each block in a few seconds? Or is it keep held locked blocks even after aggregation for this block is over?

    For example if I correct sparse dimensions Forecast, FY15, dec.  and my accounts dimension is only dense, after calc has my senior level members in the accounts, it it will issue after updating (i.e. in fractions of seconds) or is agg keep it held in a lock?

    I ask because I want to run scripts tot., but there is the update of our cube users.  I never had a problem to start agg, while users are updating.  But maybe I am lucky.  If a user updates a closed block, they will receive an error message that I think.  They may try to update again after a few seconds, I hope.

    Thank you.

    Locking behavior for BSO Essbase is described in the database administrator's Guide: http://docs.oracle.com/cd/E57185_01/epm.1112/essbase_db/dstinteg.html

    It is certainly theoretically possible that a user can obtain a lock because of a calc, although I can't say I saw him be a problem in real-world applications (perhaps because access uncommitted is the default).

  • Run the PLSQL Script from Batch file

    I am trying to run a PL/SQL script in a batch file in sp1 Windows 7 Prof

    N ° 1) I wrote a simple PL/SQL script:

    --

    -The scope of variables

    --

    DECLARE

    v_sal number (7.2): = 50000;

    v_comm number (7.2): = v_sal *. 20;

    v_message varchar2 (100): = 'eligible for the commission;

    BEGIN

    declare

    v_sal number (7.2): = 50000;

    v_comm number (7.2): = 0;

    v_total_comp number (7.2): = v_sal + v_comm;

    Start

    v_message: = "not committed not" | v_message;

    dbms_output.put_line (' message of sub-block is ' | v_message);

    dbms_output.put_line (' subblock v_comm is ' | v_comm);

    end;

    v_message: = 'seller '. v_message;

    -dbms_output.put_line ('Main block v_total_comp' | v_total_comp); -Error: not visible in the main block

    dbms_output.put_line ('Main block v_comm' | v_comm);

    dbms_output.put_line (' main block message is ' | v_message);

    END;

    /

    Step 2) then I wrote a simple batch TstBatch.bat file

    sqlplus scott/tiger@orcl < PLSqlVarInputTst1.sql > > TstBatch.log

    Step 3) in the BACK of cmd, I tried to run TstBatch.bat

    C: > TstBatch.bat

    The log file tells me that I have connected to Oracle Database 11 g Enterprise Edition Release...

    Then a lot of SQL > SQL > SQL >... 26 times

    Procedue of PL/SQL completed successfully.

    Disconnected from Oracle database

    I also tried running the PLSQL script in SQLPlus:

    SQL: > @PLSqlVarInputTst1.sql

    Tell me the procedure completed successfully.

    QUESTION: So, where is the output of the PL/SQL script?

    Hello

    You must activate the output: Add the following line at the beginning of your PL/SQL script:

    SET SERVEROUT ON

    ...

  • Is it possible to run the command script with user account administrator rights?

    Is it possible to run the command script with administrator user account rights means please tell me how to...

    I need to run it in windows 7 professional service pack 1.

    There are a few myths that won't go away, for example

    • You can perform administrative tasks when you are working from a command prompt.
    • A script (batch file, VBScript, PowerShell) gives you administrative rights.

    There is no substance to a myth. Your account has administrator privileges, or it does not. There is no backdoor.

  • Keyboard shortcut to run the last Script?

    Anyone know of a keyboard shortcut to run the last script that was executed? I'm editing an animation and wrote a script that writes code based on it, and I need a quick way to run it without the open file dialog box.

    Thank you!

    Method 1:

    You can assign shortcut keys to the first 20 scripts listed under the file > Scripts menu via the file «Adobe after effects 10.5 shortcuts» Just search for "ExecuteScript' in the shortcuts file find the section.

    Method 2:

    You can use ft_ToolBar which allows to launch scripts with the click of a button. You can also create a new button and just paste your script code directly in the window provided without having to create a jsx/jsxbin file.

  • Elements 4.0: run the postflight script fails

    I ALMOST built Elements 4.0 as root on Mac OS 10.5.6 successfully (CPU PPC G5).  Towards the end of construction, I see 'missing file' then 'cannot run the postflight script.

    Any ideas?  Thank you.

    http://forums.Adobe.com/community/photoshop_elements

  • The perl script is running slow

    Hello

    I am currently faced with a rather annoying problem.

    I installed the SDK for perl to monitoring of the resources of the ESX Server. Status of pl (in the apps directory) scripts work correctly. However, scripts to take an incredible time to run (about minimum 40-60 seconds!). After checking the logs on the ESX Server, it seems that there is a significant delay between the beginning of the 'Util::connect' and the "connected/authenticated" message in the syslog ESX.

    I tried the SDK for perl 1.6 and vSphere SDK for Perl 4, without differences.

    Someone have already faced this problem of performance?

    The recommendations of any idea or investigation would be greatly appreciated.

    Yannick

    Environment: ESX 3.5, perl scripts started the Debian (Lenny Server

    Below is an example of script used:

    /var/tmp/TestSimple.pl--entite HostSystem - Server 192.168.1.200 - xxx - xxx password username

    Lenny$ cat /var/tmp/testsimple.pl

    #! / usr/bin/perl

    use strict;

    use warnings;

    use VMware::VIRuntime;

    My % opts =)

    entity = & gt; {

    Type = & gt; "=s",

    variable = & gt; "VI_ENTITY,"

    help = & gt; "Type of ManagedEntity: HostSystem, etc.,"

    required = & gt; 1,

    },

    );

    OPTS::add_options (%OPTS);

    OPTS::parse();

    OPTS::Validate();

    Util::Connect();

    1. Get all items in the inventory of the specified type

    My $entity_type = Opts::get_option ('entity');

    My $entity_views = Vim::find_entity_views)

    view_type = & gt; $entity_type);

    1. The results of the process and output in the console

    foreach my {$entity_view (@$entity_views)}

    My $entity_name = $entity_view - & gt; name;

    Util::trace (0, "found the $entity_type:")

    ("$entity_name\n");

    }

    1. Disconnect from the server

    Util::Disconnect();

    There might be something worth investigating within the time of authentication.  However, I ran your script against my current environment (~ 100 guests, no VM yet).  Execution of the script has been very slow.  I experience this problem with large environments quite frequently, but there is a difficulty.

    So, when you use the call of find_entity_views() default it will look all the properties of an entity.  This can be very expensive in terms of script execution time.  It's especially bad when you have a _view call nested inside a loop.

    You can probably greatly increase the speed of your script by changing the following:

    
    #!/usr/bin/perl
    use strict;
    use warnings;
    use VMware::VIRuntime;
    
    my %opts = (
         entity => {
         type => "=s",
         variable => "VI_ENTITY",
         help => "ManagedEntity type: HostSystem, etc",
         required => 1,
         },
    );
    Opts::add_options(%opts);
    Opts::parse();
    Opts::validate();
    Util::connect();
    
    # Obtain all inventory objects of the specified type
    my $entity_type = Opts::get_option('entity');
    my $entity_views = Vim::find_entity_views(
         view_type => $entity_type,
         properties => \[ 'name' ]); # Remove the backslash before the '[' here, the forum will not parse it properly.
    
    # Process the findings and output to the console
    
    my $entity_cnt = @{$entity_view};
    foreach my $entity_view (@$entity_views)
    {
         my $entity_name = $entity_view->name;
         Util::trace(0, "Found $entity_type: $entity_name\n");
    }
    
    # Disconnect from the server
    Util::disconnect();
    

    If you notice the argument of the properties to the find_entity_views() call.  This will search only the name property.  You can of course add additional properties to the table reference.  But you will find that this will dramatically increase your script execution time.  In my environment, the script went to almost several minutes to run in less than 10 seconds.

  • How to close all windows after running the SaveAsPDF script?

    I ran into the problem where I adjusted the SaveAsPDF script to backup my PDF files with a preset specific PDF I use. But after executing the script, all newly created PDF files are open in illustrator and I have to close it manually one by one, choose if I want to 'Save' or 'do not save' (even if they are already registered). I would like for them to close right after that the PDF is created.

    I've added in the script:

    if (myFile.open("w")) {
      myFile.close(SaveOptions.DONOTSAVECHANGES);
      }
    

    Who's going to run the script and close the files, but for only 3 of the 10, I opened. The 7 remaining won't be saved or converted to PDF. Is there something wrong in my script or anything else that I can try to solve this problem?

    Here is my complete script:

    /** Saves every document open in Illustrator
      as a PDF file in a user specified folder.
    */
    
    
    // Main Code [Execution of script begins here]
    
    
    try {
      // uncomment to suppress Illustrator warning dialogs
      //app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
    
    
      if (app.documents.length > 0 ) {
    
    
      // Get the folder to save the files into
      var destFolder = null;
      destFolder = Folder.selectDialog( 'Select folder for PDF files.', '~' );
    
    
      if (destFolder != null) {
      var options, i, sourceDoc, targetFile;
    
      // Get the PDF options to be used
      options = this.getOptions();
      // You can tune these by changing the code in the getOptions() function.
    
      for ( i = 0; i < app.documents.length; i++ ) {
      sourceDoc = app.documents[i]; // returns the document object
    
      // Get the file to save the document as pdf into
      targetFile = this.getTargetFile(sourceDoc.name, '.pdf', destFolder);
    
      // Save as pdf
      sourceDoc.saveAs( targetFile, options );
    sourceDoc.close();
      }
    
    
      alert( 'Documents saved as MarkPreset PDF' );
      }
      }
      else{
      throw new Error('There are no document open!');
      }
    }
    catch(e) {
      alert( e.message, "Script Alert", true);
    }
    
    
    /** Returns the options to be used for the generated files.
      @return PDFSaveOptions object
    */
    function getOptions()
    {var NamePreset = 'MarkPreset'; 
      // Create the required options object
      var options = new PDFSaveOptions();
      options.pDFPreset=NamePreset; 
    
    
      // See PDFSaveOptions in the JavaScript Reference for available options
    
      // Set the options you want below:
    
    
      // For example, uncomment to set the compatibility of the generated pdf to Acrobat 7 (PDF 1.6)
      // options.compatibility = PDFCompatibility.ACROBAT7;
    
      // For example, uncomment to view the pdfs in Acrobat after conversion
      // options.viewAfterSaving = true;
    
      return options;
    }
    
    
    /** Returns the file to save or export the document into.
      @param docName the name of the document
      @param ext the extension the file extension to be applied
      @param destFolder the output folder
      @return File object
    */
    function getTargetFile(docName, ext, destFolder) {
      var newName = "";
    
    
      // if name has no dot (and hence no extension),
      // just append the extension
      if (docName.indexOf('.') < 0) {
      newName = docName + ext;
      } else {
      var dot = docName.lastIndexOf('.');
      newName += docName.substring(0, dot);
      newName += ext;
      }
    
      // Create the file object to save to
      var myFile = new File( destFolder + '/' + newName );
    
      // Preflight access rights
      if (myFile.open("w")) {
      myFile.close(SaveOptions.DONOTSAVECHANGES);
      }
      else {
      throw new Error('Access is denied');
      }
      return myFile;
    }
    

    Try this change

    for (i = 0; i< app.documents.length;="" i++="" ) ="">

    for (i = app.documents.length; i > 0; i--)

  • How to identify the name of the cluster to run the createresourcepool script?

    I want to manage the resource in ESX 4.1 Pool.

    And fortunately, I found a script from here, written by William Lam in 28/11/09.

    Lam, Hello, how are you?

    I want to test your code, but I don't know how to use it.

    I mean, I have a machine ESX, alone, with host name datastore1.vlab.iu.hio.no, that should not be called a cluster.

    But if I want to run your script, I should offer you a cluster name. So, what is the name of the cluster here?

    Thank you.

    Hello

    If you're referring to the createResourcePool.pl script, the documentation provides an example on how to use the vSphere SDK for Perl script.

    ./createResourcepool.pl--serveur reflex.primp - industries.com - username primp - cluster "R & D" - resourcepool rp6

    You will need to provide the name of the vCenter cluster where you want to create the pool of resources, in the example I created a pool of resources called "rp6" to the title of the group 'R & D'.

    If you are just to handle a crowd of ESX (i) autonomous which looks like you are, then you will need some modification of the script to allow you to create a pool of resources directly on the host ESX (i). Attached is a quick tweak to the script existing and all what you need to do is to connect directly to your host and specify the name of the list of resources you want to create. It assumes that there is no existing resource pool and this will be attached to the main world 'resourcePool' which is there by default, but you don't see it.

    Here's the syntax:

    . /RP.pl - Server himalaya.primp - industries.com - username root resourcepool - myRP

  • How to create editable text on the path of the perl script

    Hello

    I'm lost. I have exhausted all possible ways but nothing works. My problem is easy to describe: I have a Perl script that creates a design, and the design should be editable in artificial intelligence. Drawing text on a path (curved text - drawing is an access plan).

    Now I don't like how I do - I want to just make it work. I can create all types of file with Perl if someone tells me what it should look like.

    I tried to create a SVG file with text on a path. It works and the resulting file can be edited in an editor like Inkscape SVG, including the full text on the editability of the path. But if I import this file into Illustrator (AI 10 and CS3), the individual letters still sitting on the road, but all of them are facing up (instead of regardless of the direction of the path is). If it does not work. Then I said ok, because the SVG looks fine in Inkscape, let me just export EPS form Inkscape and use in artificial intelligence. Now the file looks good in artificial intelligence, but the text has been converted by trace himself, with each letter on its own session - not editable. Next thing I've tried generates directly from Perl, using a PathText function that I found in the Cookbook of Adobe PostScript EPS. Once again the EPS resulting looks good in artificial intelligence and the text is correct, no curves - but still a time, all the letters is its own, so if you go there with the text and tool removes a letter, it leaves a blank spot, and if you insert a letter, it replaces the next letter. Duh!

    So I tried the opposite: make a text on a path in artificial intelligence and save, with the plan to look at the file and generate what is there with my Perl script later. Unfortunately, the file saved by HAVE contains a chunk of binary garbage (be they saved as editable SVG or as file) that does not lend itself to facilitate the interpretation of yours really.

    I'm really not much. And I'm willing and able to create any type of file. Everything I need is something that I read, and which translates a text on a path that is editable in artificial intelligence.

    Does anyone have a pointer to a documentation, or existing in any programming language, source code that could help me in creating such a file?

    Thank you

    DZ

    I think you should look in the AI7FileFormat.pdf file (available many places online), specifically the pages 85 to 87 and 105 page, who speak of the operators of text, including text on a path.

    If we exclude the 4000 lines or so of boilerplate prolog and procsets, the code base for a text on a path is as simple as that:

    2 to
    1 0 0 1 - 4013.5 4715,5 0.4 Tp
    0 m 0
    0 200 400 200 400 0 c
    TP N
    0 tr
    TF/_Myriad-Roman 12
    (This text is in the path of access. \r) TX
    TO

    Record cleaning (first use cleaning brush/Style/Swatch action) file eps, version 6, and you shouldn't get any binary stuff.

  • Running the logon script after AnyConnect VPN connection

    Is it possible (such as the Launcher on the IPSec client) to run a login script after establishing a VPN connection? When a user connects to the VPN client AnyConnect I need to be able run a login script to map drives. I looked the ASDM, but see anywhere that it seems that this would be configured. I thought I would check to make sure I'm not missing something.

    We lack ASA IOS v8.2 (2), ASDM 6.2 (5).

    Thank you.

    You can learn more about the AnyConnect script capabilities on the link below...

    http://www.Cisco.com/en/us/docs/security/vpn_client/AnyConnect/anyconnect25/Administration/Guide/ac03features.html#wp1068902

  • Need to run the Calc Script in sequence in MAXL

    Hello

    I need a idea how to run calc in sequence through Maxl scripts. My requirement is to run calc script loads after the end of the last. I try to make the method below, but some how its not working. I'd appreciate any help.

    Thank you

    login password admin on ServerName.

    spool to 'K:\test\MXLTest.log ';

    / * Calculate * /.

    run the calculation App.db.Test;

    function SIERREUR 'error ';

    run the calculation App.db.Test2;

    set the label 'error ';

    spool off;

    disconnection;

    "exit";

    Seems iferror works only with the batch/shell script. I was trying to run EAS.

  • Run the Ant script using Java in webcenter Portal

    Hi all

    I have requirement where I have to run an ant script using java or by any means to the webcenter portal.

    Ant script must be run on a triggering action.

    Please help me in this direction.

    Thank you and best regards,

    Shakir

    Hey all,.

    Here is the solution, I had finally

    BuildFile file = new File ("myBuild.xml");

    Project p = new Project();

    p.setUserProperty ("ant.file", buildFile.getAbsolutePath ());

    ConsoleLogger DefaultLogger = new DefaultLogger();

    consoleLogger.setErrorPrintStream (System.err);

    consoleLogger.setOutputPrintStream (System.out);

    consoleLogger.setMessageOutputLevel (Project.MSG_INFO);

    p.addBuildListener (consoleLogger);

    p.init ();

    ProjectHelper helper = ProjectHelper.getProjectHelper ();

    p.addReference ("ant.projectHelper", assistance);

    Helper.Parse (p, buildFile);

    p.executeTarget (p.getDefaultTarget ());

    Kind regards

    Shakir

Maybe you are looking for