Perl script and unix users

Hi, I have a perl script that connects to a regular users account, using DBI/DBD::Oracle. It works fine is the UNIX user is in the oinstall group, but if its in oracle, dba or neither it gives me the following error:
DBI connect('orcl','xxxxxxx',...) failed: ORA-24327: need explicit attach before authenticating a user (DBD ERROR: OCISessionBegin) at /terida/opt/smarthost/updatedatabases.pl line 15
I'm guessing here that Perl DBD::Oracle needs access to a specific file in the oracle installation perhaps ? I'm also gonna wager that letting it live in the oinstall group is not recommended..
Tips?
Thanks

For people running into ORA-24327 errors with DBD::Oracle: the underlying cause is often a missing hostname, but the ORA-24327 error message is misleading. I've submitted a patch for DBD::Oracle to trap and report errors like this in OCIServerAttach, which will hopefully make it into the 1.29 release.
https://rt.cpan.org/Public/Bug/Display.html?id=68958
Marc

Similar Messages

  • How to change the Default login script and the USER login script in Netware3.12

    I need to cut down the disk map from Neware 3.12 in Win98 client's PC.
    please tell me
    how to change the Default login script and the USER login script in
    Netware3.12 ?
    Or is there any other ways to do this thing?
    Thanks a lot!

    On 4/6/2006 [email protected] wrote:
    > how to change the Default login script and the USER login script in
    > Netware3.12 ?
    Please repost in the discontinued.forums.
    Edison Ortiz
    Novell Product Support Forum SysOp
    (No Email Support, Thanks !)

  • 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

  • Geany Trouble: Compiling Perl Scripts (and general Perl questions)

    I'm brand new to Perl because I hear it's one of the best and so far I've found that it is.  I used to program a little C++ here and there and a while ago taught myself python but I'd have to say Perl is better than both of them.  At any rate, that's neither here nor there.  I use Geany and love it, so I didn't see a reason to switch to something new for Perl.  Unfortunately I'm having some trouble with compiling.  Geany flat out refuses to.  I looked around and didn't find anything on here or in the wiki or on the Ubuntu forums other than one person who said to replace the compile command with the execute command. 
    So, do I even need to compile my Perl scripts or is there something else I'm missing?
    On a somewhat related note, the same user on the Ubuntu forums said that at the top of the code there should be:
    #!/usr/bin/perl -w
    I'm curious if I need the "-w" or what it even does since as of right now I have
    #!/usr/bin/perl
    and executing the program poses no problems.
    Any help is greatly appreciated,
    --Wes

    Well, for one, perl is not a compiled language. You can if you want to, but it gains you few benefits. Google for "perl compiler" if you really must.
    As for the second, do you know how the shebang line works in unix, and do you know what the -w option does for perl? The answer should reveal itself to you.
    Make sure you "use strict;", it will catch many errors.

  • FormsCentral PDFs not working for Linux and Unix users

    I recently created a PDF (using Indesign > Acrobat IX Pro > Formscentral [AFC]) that includes radio buttons, form fields, linked videos set to play in the PDF once clicked and (after running through AFC) a submit button.
    The form has been distributed and we have already had hundreds of successful responses collected in the AFC site, all is working well there.
    One major problem we are having is that we have a lot of Linux/Unix users and the response from them is that they can't activate the videos, the form fields are out of kilter alignmentwise and the submit button does not work. Even when using the proper Adobe Acrobat Reader (v9, for example).
    Is the Adobe development team aware of problems such as these for Linux/Unix platforms and is there a suggested fix that they know of?
    The link to the actual file is here: http://cms.iopscience.iop.org/alfresco/d/d/workspace/SpacesStore/b5a48eac-8642-11e2-8cf8-e 50acbc9fd86/NJP-Video-Abstracts-Competition-2013.pdf
    Thanks in advance

    Hi Jesse,
    can you email me ([email protected]) the original PDF (before you imported it in FormsCentral)? Also, I'm curious about the format of the video in the PDF. Does the video in the PDF worked in Linux/Unix before going through the FormsCentral import/export?
    When I look at your PDF on my Red Hat Entrprise Linux 6.0 system with Reader 9.5.4 it does look fine (location of the fields) but the video generate an error (which I'm still investigating). I have not yet try the submit button on your form (as I don't want to submit bad data to you) but I seem to have an issue with the submit button on other PDF forms I generated (when I try to submit from a linux machine). Still investigating that as well.
    Gen

  • Calling the DTExec from Perl Script and need to get the Return Value (Sucess or Failure)

    I am able to execute the SSIS Package from Perl Script using DTExec. But i need to get the return code of the SSIS Execution. Is their any option available to get the Success or Failure information from Perl ?

    Exit codes returned from dtexec utility             
    When a package runs, dtexec can return an exit code. The exit code is used to populate the ERRORLEVEL variable, the value of which can then be tested in conditional statements or branching logic within a batch file. The following table lists
    the values that the dtexec utility can set when exiting.
    http://technet.microsoft.com/en-us/library/hh231187.aspx
    There's a wrinkle if the package is running in the SSIS Catalog:
    http://www.mattmasson.com/2012/02/exit-codes-dtexec-and-ssis-catalog/
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Mac OS X maintenance scripts and multiple user accounts

    Hi everyone
    Just wondering how the default maintenance scripts scheduled to run in the early morning works with multiple user accounts. Our Macs at home all have multiple user accounts (one for each of us) and I'm wondering whether the scripts work their magic across all accounts (assuming the computer itself is switched on AND not asleep).
    Also, is the behaviour the same regardless of Mac OS X version? More specifically we're using snow leopard, lion, mountain lion, and maybe shortly mavericks.
    Thanks!
    Joe.

    The maintenance scripts run by periodic perform system tasks. They do nothing in a user's account (unless you modify the scripts or create your own). They are primarily designed for long lived systems (servers). There isn't any magic nor would a normal mac users find any differences whether they ran or not.
    In all the operating system versions that you mention, the scripts will run when the computer wakes, assuming that the computer was turned on before the prescribe times.

  • Runtime.exec("Perl Script writing and reading on I/O"), handling Streams

    Hi all !!
    In a first place : sorry for my english if it's not really understandable but I try to do as good as possible !
    I'm writing a GUI with Swing that will allow (in one of my multiple tables) the user to run a Perl Script.
    This Perl Script ask the user to choose a Folder ... then read all the files in this folder and for each file (xml File), extract the datas and put them in a database. But when a file that has to be inserted in the database contains this line : <Template_Used name="ST1.mtt"> and if the Template table in my database doesn't have the "ST1.mtt" stored ... the Perl Script ask to the user to give him the path of the file "ST1.mtt" so that the script can put the "ST1.mtt template" datas in the database.
    This script runs well when it is from a windows console.
    But I need a graphic interface !!!
    So I created a JButton "Process a folder".
    When the button is pressed, a JFileChooser appears and ask the user which Folder has to be processed.
    Then a Process is created with the command : ("cmd.exe /C \"C:\\Program Files\\Fluke\\Ansur\\ProcessFolder.bat\").
    The BatFile :
    {code}cd C:\Documents and Settings\tsd\Desktop\Gael-Project\Project_Files
    perl Process.pl
    exit{code}
    At this moment everything is working well.
    But my Process.pl (which is 300 lines long ... and that you don't even want to hear about), ask in a first time the Path of the folder to process and sometimes ask the path to a file (a template file).
    So I need to read and wirte on the STDIN/STDOUT during the exec of the Process.
    In order to handle this I created two different threads : one reading the Process.getInputStream with a BufferedReader and one other writing on the Process.getOutputStream with a PrintWrinter.
    What I need to do is :
    When I read a line from the InputStream saying "I need the path of the ST1.mtt file", I should run a JFileChooser ... the user find the file in the computer ... and I write in the OutputStream the path of the file, so that my Perl Script doesn't have un Unitialised value on <STDIN> and can continue to process !!
    I'm pretty sure it's possible ... because at the moment I just used a trick :
    When the user push the "process a folder" button, I write the paths in the OutputStream before than the script needs it and it works !
    But I need to write in the OutputStream only when it is time !!!
    Any idea ??
    Here are some parts of my code :
    {code}
    String filename = File.separator+"tmp";
              JFileChooser fc = new JFileChooser(new File(filename));
              fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY );
              // Show open dialog; this method does not return until the dialog is closed
         fc.showOpenDialog(null);
         Folder = fc.getSelectedFile();
              new GoodExec(cmd);
    {code}
    {code}
    public class GoodExec {
         public static Process proc;
         public static StreamGobbler errorGobbler;
         public static StreamGobbler inputGobbler;
         public static StreamGobbler outputGobbler;
         public GoodExec(String cmd)
         try
                   Runtime rt = Runtime.getRuntime();
              proc = rt.exec(cmd);
         // any error message?
         errorGobbler = new
         StreamGobbler(proc.getErrorStream(), "ERROR");
         // any input?
         inputGobbler = new
         StreamGobbler(proc.getInputStream(), "INPUT");
         // any output?
              outputGobbler = new
              StreamGobbler(proc.getOutputStream(), "OUTPUT");
         // kick them off
         errorGobbler.start();
         inputGobbler.start();
         outputGobbler.start();
         // any error???
         int exitVal = proc.waitFor();
         System.out.println("ExitValue: " + exitVal);
         } catch (Throwable t)
         t.printStackTrace();
    {code}
    {code}
    public class StreamGobbler implements Runnable
    InputStream is;
    OutputStream os;
    String type;
    Thread thread;
    public static String chaine;
    StreamGobbler(InputStream is, String type)
    this.is = is;
    this.os=null;
    this.type = type;
    StreamGobbler(OutputStream os, String type)
    this.os = os;
    this.is=null;
    this.type = type;
    public void start () {
         thread = new Thread(this);
         thread.start ();
    public void run()
    try
    if (is == null){
         PrintWriter toProgram = new PrintWriter(os);
         File FolderToProcess = ProcessFolder.Folder;
    String Folder = FolderToProcess.getPath();
    toProgram.write(Folder);
    toProgram.close();
    else {
         if (os == null){
         InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line=null;
    String comp = "Please enter the exact path of the directory that contains the files you want to process.";
    while ( (line = br.readLine()) != null){
         if (type.equals("INPUT")){
              chaine+=line+"\n";
         if (line.equals(comp)) {
              System.out.println("give directory");RUN A JFILECHOOSER AND GIVE THE DIRECTORY TO THE OUTPUTSTREAM
    System.out.println(type + ">" + line);
    is.close ();
    catch (IOException ioe){
         ioe.printStackTrace();
    {code}
    And here is an example of a simple perl script that could be used (it s a simple one !!) :
    {code}
    #!/usr/bin/perl -w
    use strict;
    print "Please enter the exact path of the directory that contains the files you want to process.\n";
    my $dir= <STDIN>;
    chomp ($dir);
    print "titallala $dir";
    if (the template of the file is not in the database){
    print "Please give me the template so that I can put it in the database";
    $dir= <STDIN>;
    chomp ($dir);
    {code}
    Thank you for your help ... if it's possible to help me !!
    Gael

    BalusC -- The line that gives me my NullPointerException is when I call the "DisplayProduct()" method. Its a dumb question, but with NetBeans how do I find out which reference could be null? I'm not very familiar with how NetBeans works with finding out how to debug. Any help you can give me would be greatly appreciated.The IDE is com-plete-ly irrelevant. It's all about the source code.
    Do you understand anyway when and why a NullPointerException is been thrown? It is a subclass of RuntimeException and those kind of exceptions are very trival and generally indicate an design/logic/thinking fault in your code.
    SomeObject someObject = null; // The someObject reference is null.
    someObject.doSomething(); // Invoking a reference which is null would throw NPE.

  • Shell or perl script from OS command_Sender File Channel

    Hi All,
    I am trying to execute a perl script from the File Sender Channel(NFS), OS command Before Message Processing. The script works fine if i run it from the shell. But when PI calls the script,  the script does not get executed. The audit logs mention that the OS command has been called.
    I tried using:
    1) /<fullpath>perlScript.pl /<fullpath>filename.dat
    2) perl /<fullpath>perlScript.pl /<fullpath>filename.dat
    Both these commands work fine when i execute them on the shell.
    I am on solaris and PI 7.0. The permission for the perl script and input files are all 777.
    FYI.. i am using this perl script to transpose a complex file and make it # delimited file.
    I have already read the blogs for OS command and executed some sample scenarios successfully.
    I tried to call a shell script that does the same functionality as the perl script. Even that does not work.
    Also, wrote a shell script to call the perl script inside it. No luck.
    eg:
    touch /fullpath>/create_before.dat
    perl /<fullpath>perlScript.pl /<fullpath>filename.dat
    touch /<fullpath>/create_after.dat
    In this case, the create_before.dat and create_after.dat is getting created but the perl is not called. I know this because i cant see the output files of the perl script.
    Regards,
    Balaji
    Edited by: Balaji M on Oct 30, 2008 2:36 PM

    Hi,
    The problem is fixed. The shell or perl both have logic to transpose a non industry starndard file to the delimited file which PI can use an FCC to pick up.
    This was the fix:
    we need to mention the shell the script is going to be run in.
    In the shell script we mentioned --> *#!/usr/bin/bash* as the first line
    normally, when we use the command -- which bash on the unix command prompt, it tells us the path for the bash used.
    another option --> #!/usr/bin/ksh
    again, on the command prompt -- which ksh command will tell us what ksh is being used.
    If the script is a simple one that does copy or move commands, i believe we need not use the commands above. But is a good practice to have them in the script.
    Regards,
    Balaji
    Edited by: Balaji M on Nov 3, 2008 4:38 PM

  • OCI NLS errors in Perl script

    I'm using Perl to access an Oracle DB, using Activestate Perl and pre-built DBI and DBD::Oracle modules.
    I'm running the scripts on a Windows XP laptop, connecting to an Oracle DB running on Solaris 10, Oracle versions are 10.2 in both cases.
    I can connect to the database successfully with sqlplus, run from the command line, using the 'easy connect' method.
    The script fails to connect, generating this error:
    DBI connect('host=host.domain.com;sid=mydb;port=1522','myusername',...)
    failed: ERROR OCINlsEnvironmentVariableGet(OCI_NLS_CHARSET_ID)
    Check ORACLE_HOME and NLS settings etc. at C:\Perl\bin/esrch line 249
    My ORACLE_HOME points to the Oracle installation directory which was used to build the module, so I believe it's OK.
    Line 249 in the script is the dbi->connect(...) method.
    I have no idea which NLS variable would need to be set or changed, if that's what's needed.
    I also know that OCI_NLS_CHARSET_ID is a #define, found in oci.h. This file is included by the header file for my code.
    Any suggestions on how to get this working are much appreciated.
    Bob

    Hmm, there seems to be some confusion on my part regarding my login. I just used one which I swear I tried previously without success.
    In any case, I'm the original poster. Sorry for any confusion this causes.
    As for the questions asked.
    1. Oracle home access: yes, not only did the same user do the install of Oracle, I've verified that the user can access all files.
    2. I've run with NLS_LANG set and unset. The value used is the one stored in the registry:
    AMERICAN_AMERICA.WE8MSWIN1252
    3. I did a 'print "$ENV{NLS_LANG}\n"' from the perl script and got the expected output, as set above.
    4. As I understand it, the PerlSetVar function is a mod_perl feature, not part of the base language. I'm using batch files to run perl on my perl scripts, started from a command prompt.
    Thanks,
    Bob

  • Call PERL script from JAVA

    I am facing a problem in running a PERL script in JAVA in UNIX box..
    I am able to call ther perlscript.
    Perl script has
    #! /usr/local/bin/perl
    print "\nEnter Your Name :";
    $name = <>;
    print "\nYour Name is : $name\n";
    exit 0;
    Perl script request for the INPUT(name) .
    My Java program is
    File perlfile = new File("test.pl");
    Runtime runtime = Runtime.getRuntime();
    Process process = runtime.exec("perl "+perlfile);
    Here is the problem tat IT IS says error =2 ..What has to be the solution so tat i can CALL PERL SCRIPT as similiar to running it separatly in prompt { >perl test.pl }
    PLEASE help me on this....

    In the PERL SCRIPT (test.pl)
    LINE 1 : #! /usr/local/bin/perl
    LINE 2 : print "\nEnter Your Name :"; .
    LINE 3 : $name = <>;
    LINE 4 : print "\nYour Name is : $name\n";
    LINE 5 : exit 0;
    When i run this script in perl test.pl in prompt (UNIX BOX), i am gettin the request for name "Enter Your Name:____ " but when i call this script from Java it doesn't request for name and moreover the process doesnt ends (use ctrl+c to come out of the process).When i come out forcefully it shows the ERROR=2.
    My requirement is such tat need to call a PERL SCRIPT from java so tat java process give the control to PERL script and it will continue the process..
    Sample scenario:
    Java move a file and store it in a new FOLDER
    MY perl script will read the file in new FOLDER.
    here the perl script will get the file name for processing... My issue comes here .$name is not be prompted while calling thro java..

  • Help with UCCX 8.5 scripting and xmls

    I have a customer with multiple scripts, we are moving them from 3.5 to 8.5 which is running on VMWare.  Here's my scenario:
    The caller can call the trigger 54779, enter a #, then a password of 12345.  Then they can set a normal condition by dialing 1, an after-hours condition by dialing 2, or an emergency condition by dialing 3.  I’m testing the “2” condition now. In the previous 3.5 system, if they dialed 2, the system copied the Doc “2.xml” and copied it to the Doc "Carolina_Access_Emergency_Check.xml", both of which are in the en_US folder in the Documents section.
    I can’t get this thing to change my document "Carolina_Access_Emergency_Check.xml". All I know is that it goes, “unsuccessful”. I’m pretty sure the authentication is working since it gets by that step.  If we can’t get the “copy” to work, really all I need to do with this option 2, is for the data in "Carolina_Access_Emergency_Check.xml" in <TYPE>1</TYPE> to change from a 1 to a 2." I'm attaching a zip with the old and new scripts along with the 2 xml files i'm referring to.  I need help on this one, please!

    Has the user you setup have Application Admin rights? I had this issue when I was trying to create an Emergency shutdown script and the user did not have sufficient rights.
    I don't mind sharing this script I created ,which effectively changes a value from 1 to a 2, which seems to be what you are trying to do but I can not figure out how to share it with you here. You could then use this as example to achieve what you are trying to do.

  • Cfexecute a Perl script.

    What would I be looking at to run a Perl script at
    d:/path/to/my/perl/loader.pl %year% with a
    <cfexecute...> tag?
    I've tried to do it directly:
    <cfexecute
    name="d:\path\to\my\perl\loader.pl"
    arguments="#year#"
    variable="goodbar"
    errorvariable="foobar"/>
    I've tried to do it through cmd.exe:
    <cfexecute
    name="c:\windows\system32\cmd.exe"
    arguments="d:\path\to\my\perl\loader.pl #year#"
    variable="goodbar"
    errorvariable="foobar"/>
    I've tried calling perl.exe:
    <cfexecute
    name="e:\Perl\bin\perl.exe"
    arguments="d:\path\to\my\perl\loader.pl"
    variable="goodbar"
    errorvariable="foobar"/>
    I am not having much luck with this. The weird thing is that
    I am not
    getting any results OR errors. Just nothing.
    This is a Windows 2003/CF 8.0.1 server.

    Azadi wrote:
    > see if this may be of help in your case:
    >
    http://www.indigostar.com/perl2exe.htm
    >
    > otherwise, isn;t there a perl.exe in a win installation?
    >
    I'll take a look at that if I get desperate enough. But yes
    there is a
    perl.exe on my windows installation. I can easily run the
    script from
    the command line. I am trying to run it from ColdFusion since
    I have
    added a process that runs before the Perl script and I just
    want to fire
    off the Perl code when the ColdFusion code is completed.

  • Perl Script & .bashrc

    Earlier I was looking for help in using the Cshell and was urged to switch to .bashrc, so I have. After creating the .bashrc file, did a chmod 755 I relaunched the terminal and and tried one the aliases I get a command not found. I've also created a subfolder and created a perl script and it won't run unless you put a "./" in front of the script. Any suggestions.

    My idea would be: debug it.
    Your post had so little technical information so I can't be more specific, sorry.
    [I know this isn't a Perl forum, but since isn't one on OTN, I'm OK with you asking it here]

  • Perl scripting a form return???

    Hello all.
    I'm completely new to perl scripting and am trying to find somewhere that will help me understand how to write a script which will return data from a form on my website to an e-mail address. There are a lot of websites out there which offer free scripts to download but since I don't understand perl yet I'd rather not use one of them since I don't understand what it is I'm using and whether it's going to give me the desired results.
    Any help anyone can give me would be excellent!
    Regards
    Matthew
    1.25ghz MDD G4   Mac OS X (10.3.5)  

    Matthew--
    This page has a section on sending an email with Perl. It looks like a pretty good tutorial to me, though I didn't try it. If you get stuck post back and I'll try to help out...
    charlie

Maybe you are looking for

  • HOW DO YOU GET NEW TABS TO LOGIN TO THE HOMEPAGE DEFAULT THAT IS IN TOOLS

    WHEN I OPEN A NEW TAB - HOE DO I GET IT TO COME UP WITH THE DEFAULT HOME PAGE THAT IS SET UP IN TOOLS / GENERAL. AT THE MOMENT IT ALWAYS COME UP BLANK

  • Urgent : Doubt on creating joins

    Hi friends, I have two tables , ekes and eine my requirement is if Ekes-ebtyp = 'X1'. then Ekes-ebtyp = EKES-EINDT + Eine-j_3alitra. the doubt is there is no primary key common between this table . actually in my whole program for purchase order i us

  • Display alias on a BR RTP

    Hyperion Planning 11.1.1.3 Scenario Transfer an employee. While selecting the employee from the WF_Employee Global Variable (Run-Time Prompt) display the alias. Currently only member names display. Failed attempts 1. Open the WF_Employee global varia

  • HowTo? Replacement pattern for StringSubstitution?

    With Perl compatible regular expressions, I can have a regex do string replacement with \1 to represent the pattern to be preserved in the replacement. IMG_1234.cr2 --> YYMMDD_061234_Description.cr2 using a pattern such as: IMG_([0-9]{4}).cr2 --> YYM

  • Messages won't stay open

    now that i have installed messenges beta, it won't stay open and keeps crashing on me....i can't keep it open long enough to uninstall it either.  what do i do?