Sqlldr ops$user/password in a shell script - problem

Hello All:
i run the sqlldr command from a unix shell script that has
sqlldr ops$user/password@alias control='/path1/control.ctl' log='/path2/log.log'
I am geeting invalid user/password because of the $ sign in the username. What is the workaround for this? How to handle this in the script?
I tried single quote, USERID= unsuccessfully. Any ideas?
Thanks
San~

Hello,
Single quote should work fine , can you post your shell script specially couple of line and try connecting from command line.
$ sqlplus 'test$user'/*****
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Apr 14 14:36:04 2009
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine optionsRegards
Edited by: OrionNet on Apr 14, 2009 2:38 PM

Similar Messages

  • How to avoid password prompt in shell script for zip password protection

    Hi
    I am trying to set password protection to my oracle database export backup. Once the backup completed, it should compress with a password protection. Thats the plan. Initialy we were using the gzip for the compression. Then realized that there is no password protection for the gzip. Started using zip option. I tried using
    zip -P <password> filename
    But it was throwing below error.
    -bash-3.2$ zip -P expreports REPORTS_2013FEB14.dmp
    zip warning: missing end signature--probably not a zip file (did you
    zip warning: remember to use binary mode when you transferred it?)
    zip warning: (if you are trying to read a damaged archive try -F)
    zip error: Zip file structure invalid (REPORTS_2013FEB14.dmp)
    Not quite sure why.
    Then I used zip -e REPORTS_2013FEB14.dmp.zip REPORTS_2013FEB14.dmp
    But this prompting for the password. As I am trying to put the command in the script. It will be tough if it prompts for the password.
    I would like to know how to avoid the password prompting by saving somewhere or how the code should be written. Tried using expect feature of shell script. Below was the code I tried. It didnt work.
    [oracle@SF40V6636 test]$ cat repexp.sh
    zip -e REPORTS_imp.log.zip REPORTS_imp.log
    expect "Enter password:"
    send "imprep"
    expect "Verify password:"
    send "imprep"
    So please help in avoiding this password prompt or let me know how to change the code.
    Thanks
    SHIYAS M

    How about using gpg and adding a secret key to the requirement of a password? No one should be able to decrypt your file, not by knowing only the password.
    1. Generate a public and private key pair:
    $ gpg --gen-key
    When it shows "We need to generate a lot of random bytes…" open another terminal session and type "dd if=/dev/sda of=/dev/null" to create traffic. When the public and secret key created and signed you can Ctrl-C the dd command.
    To see what you have created:
    $ gpg --list-keys
    2. Encrypt and gzip your stuff:
    $ tar zcf stuff.tgz file_or_folder
    $ gpg recipient "Some Name" encrypt stuff.tgz
    $ rm -f stuff.tgz
    3. Decrypt and extract the archive:
    $ gpg batch yes --passphrase "password" -d stuff.tgz.gpg > stuff.tgz
    $ tar zxvf stuff.tgz
    Again, knowing the password alone will not let anybody decrypt your stuff.

  • OPS@ user password (homogenous system copy)

    I have successfully restored the Production data to the QA system . the database is ON .
    Now when i try to start the application i get the following error.
    The OPS@GAQADM is available in the SAPUSER table.
    there is something abt the password . I have gone through the SNOTE :400241
    Here its says to change the password using the follwing command
    brconnect -u system/<syst_pwd> -f chpass -o SAP<SID> -p <new_sap_pwd>
    but i dont know what is the "system" user and what is its default password.
    gaqscm:gaqadm 2%
    gaqscm:gaqadm 2% more trans.log
    4 ETW000 R3trans version 6.13 (release 640 - 21.06.06 - 08:38:00).
    4 ETW000 ===============================================
    4 ETW000
    4 ETW000 date&time   : 20.05.2008 - 11:30:23
    4 ETW000 control file: <no ctrlfile>
    4 ETW000 R3trans was called as follows: R3trans -d
    4 ETW000  trace at level 2 opened for a given file pointer
    4 ETW000  [dev trc     ,00000]  Tue May 20 11:30:23 2008                             235  0.000235
    4 ETW000  [dev trc     ,00000]  db_con_init called                                    51  0.000286
    4 ETW000  [dev trc     ,00000]  create_con (con_name=R/3)                            148  0.000434
    4 ETW000  [dev trc     ,00000]  Loading DB library '/usr/sap/GAQ/SYS/exe/run/dboraslib.so' ...
    4 ETW000                                                                             180  0.000614
    4 ETW000  [dev trc     ,00000]  load shared library (/usr/sap/GAQ/SYS/exe/run/dboraslib.so), hdl 0
    4 ETW000                                                                           65241  0.065855
    4 ETW000  [dev trc     ,00000]  Library '/usr/sap/GAQ/SYS/exe/run/dboraslib.so' loaded
    4 ETW000                                                                           10617  0.076472
    4 ETW000  [dev trc     ,00000]  function DbSlExpFuns loaded from library /usr/sap/GAQ/SYS/exe/run/dboraslib.so
    4 ETW000                                                                             128  0.076600
    4 ETW000  [dev trc     ,00000]  Version of '/usr/sap/GAQ/SYS/exe/run/dboraslib.so' is "640.00", patchlevel (0.125)
    4 ETW000                                                                             801  0.077401
    4 ETW000  [dev trc     ,00000]  function dsql_db_init loaded from library /usr/sap/GAQ/SYS/exe/run/dboraslib.so
    4 ETW000                                                                             108  0.077509
    4 ETW000  [dev trc     ,00000]  function dbdd_exp_funs loaded from library /usr/sap/GAQ/SYS/exe/run/dboraslib.so
    4 ETW000                                                                             110  0.077619
    4 ETW000  [dev trc     ,00000]  New connection 0 created                              59  0.077678
    4 ETW000  [dev trc     ,00000]  0: name = R/3, con_id = -000000001 state = DISCONNECTED, perm = YES, reco = NO , timeout = 000
    , con_max = 255, con_opt = 255, occ = NO
    4 ETW000                                                                             125  0.077803
    4 ETW000  [dev trc     ,00000]  db_con_connect (con_name=R/3)                         54  0.077857
    4 ETW000  [dev trc     ,00000]  find_con_by_name found the following connection for reuse:
    4 ETW000                                                                              82  0.077939
    4 ETW000  [dev trc     ,00000]  0: name = R/3, con_id = 000000000 state = DISCONNECTED, perm = YES, reco = NO , timeout = 000,
    con_max = 255, con_opt = 255, occ = NO
    4 ETW000                                                                              89  0.078028
    4 ETW000  [dev trc     ,00000]  Got ORACLE_HOME=/oracle/GAQ/920_64 from environment
    4 ETW000                                                                             397  0.078425
    4 ETW000  [dev trc     ,00000]  -->oci_initialize (con_hdl=0)                        181  0.078606
    4 ETW000  [dev trc     ,00000]  got NLS_LANG='AMERICAN_AMERICA.WE8DEC' from environment
    4 ETW000                                                                              89  0.078695
    4 ETW000  [dev trc     ,00000]  Client NLS settings: AMERICAN_AMERICA.WE8DEC        7404  0.086099
    4 ETW000  [dev trc     ,00000]  Logon as OPS$-user to get SAPGAQ's password           66  0.086165
    4 ETW000  [dev trc     ,00000]  Connecting as /@GAQ on connection 0 (nls_hdl 0) ... (dbsl 640 310306)
    4 ETW000                                                                              86  0.086251
    4 ETW000  [dev trc     ,00000]  Nls CharacterSet                 NationalCharSet              C      EnvHp      ErrHp ErrHpBat
    ch
    4 ETW000                                                                              90  0.086341
    4 ETW000  [dev trc     ,00000]    0 WE8DEC                                                    1  10124ce20  1012560b0  101255a
    48
    4 ETW000                                                                             106  0.086447
    4 ETW000  [dev trc     ,00000]  Allocating service context handle for con_hdl=0       51  0.086498
    4 ETW000  [dev trc     ,00000]  Allocating server context handle                      59  0.086557
    4 ETW000  [dev trc     ,00000]  Attaching to DB Server GAQ (con_hdl=0,svchp=101255978,svrhp=101257e18)
    4 ETW000                                                                             155  0.086712
    4 ETW000  [dev trc     ,00000]  Assigning server context 101257e18 to service context 101255978
    4 ETW000                                                                           65351  0.152063
    4 ETW000  [dev trc     ,00000]  Allocating user session handle                        88  0.152151
    4 ETW000  [dev trc     ,00000]  Starting user session (con_hdl=0,svchp=101255978,srvhp=101257e18,usrhp=101261870)
    4 ETW000                                                                             126  0.152277
    4 ETW000  [dev trc     ,00000]  Assigning user session 101261870 to service context 101255978
    4 ETW000                                                                           12674  0.164951
    4 ETW000  [dev trc     ,00000]         BEGIN DBMS_APPLICATION_INFO.SET_MODULE (:A0, :A1); END;
    4 ETW000                                                                             187  0.165138
    4 ETW000  [dev trc     ,00000]         BEGIN DBMS_APPLICATION_INFO.SET_CLIENT_INFO (:A0); END;
    4 ETW000                                                                             293  0.165431
    4 ETW000  [dev trc     ,00000]  Now '/@GAQ' is connected (con_hdl 0, nls_hdl 0).
    4 ETW000                                                                            1709  0.167140
    4 ETW000  [dev trc     ,00000]         ALTER SESSION SET NLS_SORT = BINARY
    4 ETW000                                                                             130  0.167270
    4 ETW000  [dev trc     ,00000]         SELECT USERID,PASSWD FROM SAPUSER WHERE USERID IN (:A0, :A1)
    4 ETW000                                                                             861  0.168131
    4 ETW000  [dev trc     ,00000]  Got SAPGAQ's password from OPS$-user                1393  0.169524
    4 ETW000  [dev trc     ,00000]  Disconnecting from connection 0 ...                   60  0.169584
    4 ETW000  [dev trc     ,00000]  Rolling back transaction ...                          82  0.169666
    4 ETW000  [dev trc     ,00000]  Closing user session (con_hdl=0,svchp=101255978,usrhp=101261870)
    4 ETW000                                                                             411  0.170077
    4 ETW000  [dev trc     ,00000]  Now I'm disconnected from ORACLE                     788  0.170865
    4 ETW000  [dev trc     ,00000]  Connecting as SAPGAQ/<pwd>@GAQ on connection 0 (nls_hdl 0) ... (dbsl 640 310306)
    4 ETW000                                                                             113  0.170978
    4 ETW000  [dev trc     ,00000]  Nls CharacterSet                 NationalCharSet              C      EnvHp      ErrHp ErrHpBat
    ch
    4 ETW000                                                                              87  0.171065
    4 ETW000  [dev trc     ,00000]    0 WE8DEC                                                    1  10124ce20  1012560b0  101255a
    48
    4 ETW000                                                                              85  0.171150
    4 ETW000  [dev trc     ,00000]  Assigning username to user session 101261870          54  0.171204
    4 ETW000  [dev trc     ,00000]  Assigning password to user session 101261870          56  0.171260
    4 ETW000  [dev trc     ,00000]  Starting user session (con_hdl=0,svchp=101255978,srvhp=101257e18,usrhp=101261870)
    4 ETW000                                                                              88  0.171348
    4 ETW000  [dboci.c     ,00000]  *** ERROR => OCI-call 'OCISessionBegin' failed: rc = 1017
    4 ETW000                                                                            1792  0.173140
    4 ETW000  [dbsloci.    ,00000]  *** ERROR => CONNECT failed with sql error '1017'
    4 ETW000                                                                             104  0.173244
    4 ETW000  [dblink      ,00419]  ***LOG BY2=>sql error 1017   performing CON [dblink#2 @ 419]
    4 ETW000                                                                             143  0.173387
    4 ETW000  [dblink      ,00419]  ***LOG BY0=>ORA-01017: invalid username/password; logon denied [dblink#2 @ 419]
    4 ETW000                                                                              80  0.173467
    2EETW169 no connect possible: "DBMS = ORACLE                           --- dbs_ora_tnsname = 'GAQ'"
    Regasrds
    Akif

    i recall having the same problem and even after having changed the password through brconnect i still wasn't able to login using sqlplus and connect / (as an example)...so:
    you could also go for the ORADBUSR.SQL skript which is attached to sapnote 50088...download and append it:
    > sqlplus /nolog @oradbusr.sql <schemaowner> NT <userdomain>
    or on unix
    > sqlplus /nolog @oradbusr.sql <Schema-Owner-ID> UNIX <SAP-ID> X
    schema id environment (dbs_ora_schema) is set for the target db?
    GreetZ, AH

  • How to submit "active users" standard report using shell scripting

    Hi All,
    Greetings.
    I want to submit the "Active Users" standard report in Sysadmin responsibility using a shell script.
    I also want to pass a parameter named email to this..
    can anyone help me do this?
    Thanks in Advance,
    Bhaskar

    Hi Bhaskar,
    You can achieve this by shell scripting either by scripting via CONCSUB utility (invoked from OS) or you can use the FND_SUBMIT package (through PL/SQL package), and in the script itself you can create the outputs or any hardcode messages to a file, and then mail the output to your desired mail address.
    If you use mail or mailx command using the OS utility then you can even send mail to external users which should not necessarily be a registered EBS users.
    Google, Forum Search and metalink will provide you loads of articles on how to use CONCSUB and FND_SUBMIT packages.
    Thanks &
    Best Regards,

  • Ananomous block inside shell script problem

    I am having problem using / inside the anonymous block...
    I have a shell script which is somethinglike this.
    $ORACLE_HOME/bin/sqlplus -s << EOF
    --set head off;
    --set feedback off;
    set serverout on;
    Cursor c1 is
    select --------
    Begin
    for x in c1 loop
        Begin
          <do something>
        End;
    End Loop;
    End;
    End;
    EOF
    mail -s -----If i don't use / certian things are not executed.
    If i use exit instead of /, then it will not reach the end ie., the mail part.
    can somebody guide me ??

    sb92075 wrote:
    sunil_dba wrote:
    I am having problem using / inside the anonymous block...anonymous blocks begin with
    DECLARE
    which posted code seems to be lackingOr also a BEGIN if no variables, constants or user types are declared.

  • Do shell script problem in Applescript

    Hi,
    I am an Applescript novice and have been trying to write a code to go to a particular folder, look for all files in the folder tree with extension .m2v and run an executable file to decode them. My problem is that when I run my code (containing do shell script), it searches through all files and folders on Mac HD and starts decoding .m2v files elsewhere that I don't want.
    Eventually it runs out of space (.m2v file decoding takes a lot of space), because it is dumping all decoded .yuv files onto the HD.
    When I run the command on Terminal, it executes the decoding perfectly and stores the decoded files in the same folder.
    Please help me about what's going on.
    My code is something like:
    tell application "Finder"
    set DestinationFolder to "xxxxxx:xxxx:xxxx"
    set NumFolders to (get count of folders under Destination folder)
    repeat for SomeVar from 1 to NumFolders
    set FolderinQuestion to folder SomeVar of DestinationFolder
    -- Tried tell application "Terminal" here, but did not know --how to export the FolderinQuestion variable from Finder to --Terminal
    do shell script " \" cd \" & (POSIX path of (result as text));
    for file in `find $pwd \"*.mov\"`
    do
    /usr/local/bin/decode file
    done"
    end repeat
    end tell
    I would greatly appreciate some guidance.

    The root of the problem is that you're trying to quote the cd command for some reason:
    <pre class=command>do shell script " \" cd \" & (POSIX path of (result as text));
    ...</pre>
    In addition to that you're including the & (POSIX path of (result as text)) as part of the shell command whereas this should be OUTSIDE of the quotes in order to get evaluated
    If you work that through you'll end up with a shell command that looks like:
    <pre class=command>" cd " & (POSIX path of (result as text))</pre>
    If you try to run that in a terminal you'll get a cd : command not found error and that's why the rest of it appears to fail.
    The solution to that one is simple - just don't bother quoting the cd and put the POSIX path stuff outside of the quotes to get it evaluated at runtime:
    <pre class=command>do shell script "cd " & quoted form of POSIX path of (FolderInQuestion as text)) & ";
    # rest of shell commands here"</pre>
    Now, as for the rest of the script there are a few things I would change.
    First, unless you need to know the index, don't do:
    >repeat for SomeVar from 1 to NumFolders
    set FolderinQuestion to folder SomeVar of DestinationFolder
    the issue is that the number of folders to process may change during the script's execution (other processes may create or remove folders). This will, at best, cause some folders to be skipped and, at worst, cause the script to fail.
    If you're iterating through a list, the best option is to just:
    <pre class=command>repeat with FolderInQuestion in (folders of DestinationFolder)
    ...</pre>
    This automatically sets the iterator (in this case, FolderInQuestion, to the first item in the list and increments it for each iteration through the loop.
    Secondly, in your shell script itself, scrub the entire do/done loop. You're already using find, so have that do the hard work using the -exec switch:
    <pre class=command>find path -name "*.mov" -exec /usr/local/bin/decode {} \;</pre>
    In find's case, {} is substituted with the current file's path.
    Putting this together you'd get:
    <pre class=command>tell application "Finder"
    set DestinationFolder to "xxxxxx:xxxx:xxxx"
    repeat with folderInQuestion in (get folders of folder DestinationFolder)
    do shell script "cd " & quoted form of POSIX path of folderInQuestion & "; find . -name \"*.mov\" -exec /usr/bin/decode {} \\;"
    end repeat
    end tell</pre>
    Note that I've used 'quoted form of POSIX path' - this takes care of any shell-unsafe characters like spaces in the path name. I've also used \\; for the -exec switch - this is so that AppleScript passes the \ to the shell command rather than using it for its own escaping.
    But you're not done yet!
    There's still one fatal flaw in this process - and that is the fact that find by default, is recursive - it will walk through every directory that it finds.
    This means that if you start at the top folder and iterate through, find will find all .mov files and decode them. Your script then cd's to the first subdirectory and repeats the process - decoding all the .mov files in that directory and all its subdirectories even though they've ALREADY been decoded.
    The upshot is that you only need to run one loop starting at the top level. You don't need to iterate through all the subdirectories since find will do that for you.
    In addition to that, there might not be a need to use cd at all since the first argument to find is the directory to start searching in. Unless there's some reason that you need to start decode from the top level directory (e.g. is that where it saves the files?), you can drop the whole repeat loop altogether and just run with:
    <pre class=command>set startFolder to (choose folder)
    do shell script "find " & quoted form of posix path of startFolder & " -name \"*.mov\" -exec /usr/bin/decode {} \\;"</pre>
    That's the entire script - a radical compression of your original.

  • Executing native library under Java - shell script problem

    I am running a Java application on the command line bash shell. I have a few JAR files in the directory and a few native libraries. When I run the application using the command line, all works fine. This is the command I use:
    java -classpath MyGame.jar:log4j-1.2.16.jar:jme/jme-colladabinding.jar:jme-audio.jar:jme-awt.jar:jme-collada.jar:jme-editors.jar:jme-effects.jar:jme-font.jar:jme-gamestates.jar:jme-model.jar:jme-ogrexml.jar:jme-scene.jar:jme-swt.jar:jme-terrain.jar:jme.jar:jogl/gluegen-rt.jar:jogl/jogl.jar:jorbis/jorbis-0.0.17.jar:junit/junit-4.1.jar:lwjgl/jinput.jar:lwjgl/lwjgl.jar:lwjgl/lwjgl_util.jar:lwjgl/lwjgl_util_applet.jar:swt/windows/swt.jar:jbullet/jbullet-jme.jar:jbullet/asm-all-3.1.jar:jbullet/jbullet.jar:jbullet/stack-alloc.jar:jbullet/vecmath.jar:trove-2.1.0.jar:sceneMonitor/jmejtree_jme2.jar:sceneMonitor/propertytable.jar:sceneMonitor/scenemonitor_jme2.jar:sceneMonitor/sm_properties_jme2.jar -Djava.library.path="lwjgl/native/linux" -Xmx1024m -Xms768m -ea com.mygame.MainThis works fine and the application starts up as expected. LWJGL native library is loaded in and works fine as expected.
    The problem occurs when I try to run this command via the shell using a shell script. Here is my script:
    #!/bin/bash
    # Set the minimum and maximum heap sizes
    MINIMUM_HEAP_SIZE=768m
    MAXIMUM_HEAP_SIZE=1024m
    if [ "$MYAPP_JAVA_HOME" = "" ] ; then
        MYAPP_JAVA_HOME=$JAVA_HOME
    fi
    _JAVA_EXEC="java"
    if [ "$MYAPP_JAVA_HOME" != "" ] ; then
        _TMP="$MYAPP_JAVA_HOME/bin/java"
        if [ -f "$_TMP" ] ; then
            if [ -x "$_TMP" ] ; then
                _JAVA_EXEC="$_TMP"
            else
                echo "Warning: $_TMP is not executable"
            fi
        else
            echo "Warning: $_TMP does not exist"
        fi
    fi
    if ! which "$_JAVA_EXEC" >/dev/null ; then
        echo "Error: No Java environment found"
        exit 1
    fi
    _MYAPP_CLASSPATH="MyGame.jar:log4j-1.2.16.jar:jme/jme-colladabinding.jar:jme-audio.jar:jme-awt.jar:jme-collada.jar:jme-editors.jar:jme-effects.jar:jme-font.jar:jme-gamestates.jar:jme-model.jar:jme-ogrexml.jar:jme-scene.jar:jme-swt.jar:jme-terrain.jar:jme.jar:jogl/gluegen-rt.jar:jogl/jogl.jar:jorbis/jorbis-0.0.17.jar:junit/junit-4.1.jar:lwjgl/jinput.jar:lwjgl/lwjgl.jar:lwjgl/lwjgl_util.jar:lwjgl/lwjgl_util_applet.jar:swt/windows/swt.jar:jbullet/jbullet-jme.jar:jbullet/asm-all-3.1.jar:jbullet/jbullet.jar:jbullet/stack-alloc.jar:jbullet/vecmath.jar:trove-2.1.0.jar:sceneMonitor/jmejtree_jme2.jar:sceneMonitor/propertytable.jar:sceneMonitor/scenemonitor_jme2.jar:sceneMonitor/sm_properties_jme2.jar"
    _VM_PROPERTIES="-Djava.library.path=\'lwjgl/native/linux\'"
    _MYAPP_MAIN_CLASS="com.mygame.Main"
    $_JAVA_EXEC -classpath $_MYAPP_CLASSPATH $_VM_PROPERTIES -Xmx${MAXIMUM_HEAP_SIZE} -Xms${MINIMUM_HEAP_SIZE} -ea $_MYAPP_MAIN_CLASSThe shell script is in the same directory as the JAR files (the same directory where I ran the Java command above). When I execute the shell script ( sh MyGame.sh ), I get the UnsatisfiedLinkError message:
        14-Feb-2011 19:46:28 com.wcg.game.DefaultUncaughtExceptionHandler uncaughtException
        SEVERE: Main game loop broken by uncaught exception
        java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
           at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
           at java.lang.Runtime.loadLibrary0(Runtime.java:823)
           at java.lang.System.loadLibrary(System.java:1028)
           at org.lwjgl.Sys$1.run(Sys.java:73)
           at java.security.AccessController.doPrivileged(Native Method)
           at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
           at org.lwjgl.Sys.loadLibrary(Sys.java:82)
           at org.lwjgl.Sys.<clinit>(Sys.java:99)
           at org.lwjgl.opengl.Display.<clinit>(Display.java:130)
           at com.jme.system.lwjgl.LWJGLDisplaySystem.setTitle(LWJGLDisplaySystem.java:118)
           at com.wcg.game.WcgStandardGame.initSystem(WcgStandardGame.java:287)
           at com.wcg.game.WcgStandardGame.run(WcgStandardGame.java:185)
           at java.lang.Thread.run(Thread.java:662)I don't understand what I am doing wrong. I am executing the exact same command via a shell script and it is not working. Any ideas, solutions, most welcome.
    I am running Linux Mint Debian 201012, Linux mint 2.6.32-5-amd64 #1 SMP Thu Nov 25 18:02:11 UTC 2010 x86_64 GNU/Linux. JDK is 1.6.0_22 64-bit. I have 64-bit .so files in the correct place too.
    Thanks
    Riz

    Thanks for the replies guys/gals.
    I have modified the script and echoed my command that should be running under the shell script, it is:
    java -classpath WcgFramework.jar:WcgPocSwordplay.jar:log4j-1.2.16.jar:jme/jme-colladabinding.jar:jme-audio.jar:jme-awt.jar:jme-collada.jar:jme-editors.jar:jme-effects.jar:jme-font.jar:jme-gamestates.jar:jme-model.jar:jme-ogrexml.jar:jme-scene.jar:jme-swt.jar:jme-terrain.jar:jme.jar:jogl/gluegen-rt.jar:jogl/jogl.jar:jorbis/jorbis-0.0.17.jar:junit/junit-4.1.jar:lwjgl/jinput.jar:lwjgl/lwjgl.jar:lwjgl/lwjgl_util.jar:lwjgl/lwjgl_util_applet.jar:swt/windows/swt.jar:jbullet/jbullet-jme.jar:jbullet/asm-all-3.1.jar:jbullet/jbullet.jar:jbullet/stack-alloc.jar:jbullet/vecmath.jar:trove-2.1.0.jar:sceneMonitor/jmejtree_jme2.jar:sceneMonitor/propertytable.jar:sceneMonitor/scenemonitor_jme2.jar:sceneMonitor/sm_properties_jme2.jar -Djava.library.path="lwjgl/native/linux" -Xmx1024m -Xms768m -ea com.mygame.MainI am more confident that now the shell script should be fine (I am a shell script noob) because this very command if I copy from terminal and paste into the terminal, runs the application no problem at all. But I am amazed that it is still not working. I must be doing something obviously wrong. :-(
    I used the code as suggested:
    _VM_PROPERTIES='-Djava.library.path="lwjgl/native/linux"'I am stumped!? :-(
    Thanks for help.

  • Simple shell script problem...

    I am trying to get a list of directories on a remote machine, compare them with the directories on the local machine and copy any that dont match on the local machine to a backup folder. Heres my code but i am a newbie and i cant get my shell script to read from a file. The for loop never executes so i am guessing i am not reading the file correctly - see below.
    #!/bin/ksh
    ssh -l removeserver 192.168.xxx.xxx ls /remote/server/directory/ > /store/remote/directory/listing/motapp1files.txt
    newfile=''
    $newfile < /store/remote/directory/listing/motapp1files.txt
    for file in $newfile;
    do echo $file
    if [ ! -d local/machine/directories/$file/ ]; then
    echo "this folder doesnt exist on on remote server "; echo $file;
    fi
    done

    Re-inventing the wheel perhaps. Look into rsync. Great program!
    I used it in FreeBSD to do a very similar task.

  • Rman shell script problem

    Hello,
    While running the following rman commands directly from the shell , its work fine :
    $ rman CATALOG=catman/man@rman TARGET=/
    RMAN> run {
    2>   allocate channel 'dev_1' type 'sbt_tape'
    3>   parms  'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=bz,OB2BARLIST=bz_archive,OB2BARHOSTNAME=bz)';
    4>   allocate channel 'dev_2' type 'sbt_tape'
    5>   parms  'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=bz,OB2BARLIST=bz_archive,OB2BARHOSTNAME=bz)';
    6>   restore archivelog from time "to_date('2011-02-14 08:31:55','YYYY-MM-DD HH24:MI:SS')" until time 'SYSDATE';
    7>     }
    allocated channel: dev_1
    channel dev_1: sid=323 devtype=SBT_TAPE
    channel dev_1: Data Protector A.06.11/243
    allocated channel: dev_2
    channel dev_2: sid=438 devtype=SBT_TAPE
    channel dev_2: Data Protector A.06.11/243
    Starting restore at 2011-02-14 19:01:38
    ....When trying to run it as shell script :
    #!/bin/ksh
    ssh -l oracle 172.22.xx.xx . /software/oracle/.profile ;
    export NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'
    rman CATALOG=catman/man@rman TARGET=/
    run {
       allocate channel 'dev_1' type 'sbt_tape'
       parms  'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=bz,OB2BARLIST=bz_archive,OB2BARHOSTNAME=bz)';
       allocate channel 'dev_2' type 'sbt_tape'
       parms  'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=bz,OB2BARLIST=bz_archive,OB2BARHOSTNAME=bz)';
       restore archivelog from time "to_date('2011-02-14 08:31:55','YYYY-MM-DD HH24:MI:SS')" until time 'SYSDATE';
       }The script succeded to connect to rman but it stuck hir:
    $ ./yoav.sh  
    Recovery Manager: Release 10.2.0.4.0 - Production on Mon Feb 14 20:13:41 2011
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    connected to target database: BZ (DBID=3044220964)
    connected to recovery catalog database
    RMAN> Any suggestion why it stuck ?
    Thanks

    It is stucked because RMAN it waiting input on STDIN and you don't give anything as input to STDIN.
    Try to use
    $ rman CATALOG=catman/man@rman TARGET=/ <<EOF
    <your RMAN script>
    EOFor try to use RMAN command file like a SQL file:
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/setup001.htm#sthref206
    Edited by: P. Forstmann on 14 févr. 2011 20:05

  • How to pass password to an lftp connection using shell script

    Hi
    I need to transfer a file to server which support FTPS protocol. I am using lftp utility for this purpose. User credentials used to establish the connection expires after a period(eg: 45 days/3 months) . Can anyone guide me with me an approach to use the password in the shell script which transfer the file to the remote server other than hard coding the password in the script.
    Thanks
    Ramya

    SSH is a better option but unfortunately it's not always available. If you worry about security, you could use the bookmark lftp feature:
    $ lftp ftp://username@server
    Password:
    lftp username@server:~>  set bmk:save-passwords true
    lftp username@server:~> bookmark add yourserver
    lftp username@server:~> bookmark list
    lftp username@server:~> quit
    $ lftp yourserver &
    $ ps -aux | grep lftp
    The password is stored in ~/.lftp/bookmarks (not encrypted) but you can protect the file with the right permissions as you would do with your certificates with SSH.

  • Shell script adapter and passwords

    Does anyone know how to get a password into a shell script resource adapter?
    I've set up the "password" attribute in my resource adapter's schema, expecting at least to see the encrypted password in in $WSUSER_password, but it's always empty. Other attributes I add to the resource scheme show up in the scripts as shell variables just fine.
    Side question - the Solaris resource adapter, which looks a lot like the shell script adapter, doesn't even have a password in its schema map, yet it seems to set passwords just fine. What's up with that?
    The ShellScriptResourceObjects55.xml example doesn't seem to deal with passwords at all.

    Hi,
    Have you been able to resolve this issue?
    I am currently working on configuring a Shell Script Resource on my IDM system.
    I am still in the "*Create User"* stage of things (I haven't even begun working with the other Actions : Get User, Get All Users, Delete User, Update User)
    After a month-long period of trial-and-error, and a lot of headaches, I finally succeeded in Creating a new user on my Unix Machine, without any errors
    Except for one thing : for some reason, the user I create is not being given a password!
    A first, I configured the "Attribute Mapping" page to include a "Password" attribute. This did not work.
    Then I removed the password from there (I figured that when I input the user's basic information on the IDENTITY tab in IDM, then the password gets automatically passed to the Unix machine).
    Still, this did not work.
    The funniest thing is : I am not getting any errors. The user is created on my Unix machine. And, also, in my My-SQL database.
    The problem is : when I try to log into that same Unix machine as the user, it does not work, because......of course.....*.there is NO PASSWORD*.
    What could be the problem?

  • Shell script that required password

    Hi,
    I'm using an automator script to upload some files to a remote Linux server, and I'm using rsync in an automator shell script action.
    That command required a password to work, how can I enter the password in the shell script action?
    Thanks

    Thanks for your answer, but as I'm no expert in AS,
    I'm not sure to understand your answer.
    How do those parameters are sent to AS?
    You put it in the statement:
    do shell script "rsync /source /dest" password "xyzzy" user name "you"
    You can set up a keychain for the password and retrieve it when needed, to be secure in your code. Post back or head over to AS forum, we'll help you out. http://discussions.apple.com/forum.jspa?forumID=724
    I suppose it can be run within Automator using a run
    AS instead of a run shell script. As my automator do
    some other task too.
    Yes, Automator has Run AppleScript action.
    And yes, you're right, iWeb publishing that is! Good
    guest!
    I saw some of your posts in iWeb board.
    I'm mucking around with iWeb, it's a bloated monster. There are quite a few restrictions in iWeb, I had to hand code some of the stuffs, such as meta data keywords, tricky stuffs... I'm thinking of writing a script for post production.

  • Execute txkWfClone.sh in a shell script

    We have a requirement that needs txkWfClone.sh to run inside a shell script (unix). We need to pass the username/password in the shell script. Basically we need to run this as a silent process.
    Any suggestions on how to accomplish that?

    900441 wrote:
    We have a requirement that needs txkWfClone.sh to run inside a shell script (unix). We need to pass the username/password in the shell script. Basically we need to run this as a silent process.
    Any suggestions on how to accomplish that?Yes.
    How to Change the System Name in Workflow? [ID 387337.1]
    Txkwfclone.Sql Script Is Receiving The Parameters In Incorrect Order [ID 880264.1]
    You may also view the script and you will find if any parameters need to be passed.
    Thanks,
    Hussein

  • Shell Script Resource-Timeout error

    Hi!!
    I have an issue with the Shell Script Resource, the problem is as follows:
    When I created a user in this resource and appears a error message:
    com.waveset.util.WavesetException: An error occurred adding user 'user01' to resource 'Shell Script'. com.waveset.util.WavesetException: Script failed waiting for "_,)#+(:" in response "" com.waveset.util.WavesetException: Script processor timed out with nothing to read and the following unprocessed text: "".
    I added the timeout property = 300 000 in my shell script is as follows:
    <ResTypeAction restype='Shell Script' timeout='300000'>
    but it doesn't work.
    I had the IDM 8 with the patch 4 but the problem beging when I did upgrade to patch 4 to 6.
    Does anyone knows what could be the problem.
    Thanks in advance!

    Hello!
    That isn't the problem the test connection works fine but when I try provisioning a user the shell script execute some instructions, in the shell script I need to set the timeout property in order to give more time to finish execute the instructions before the script execute the following command.
    I tested the timeout property in the shell script and work to fine for IDM 8 patch 4 I upgrade to patch 10 and stopped to work.
    Does anyone knows What could be the rigth way to set the timeout property in a resource action for shell script resource?
    Thanks...

  • Shell script question

    Hi all,
    I know this is a little bit off subject but i have a shell scripting problem and was wondering if any of you could help...
    so:
    L=`wc -l $CATALINA_HOME/webapps/EmailSignup/Data/add.txt`
    stores the number of lines some file has...
    eg output:0 /usr/local/tomcat4/webapps/EmailSignup/Data/add.txt
    so now i want to have an if statement that will compare to see if the number of lines are equal to zero...
    how can i do that... this is what i do but it never seems to go in the if...
    it always goes in the else..
    if [ "$L" == " 0 /usr/local/tomcat4/webapps/EmailSignup/Data/add.txt" ] ;
    then
    echo $L
    echo No additions to the Email List
    else
    echo --$L
    echo Adding new entries to the Email List
    fi
    any ideas?
    thanks
    udam

    Try using the '-eq' operator of the 'test' program. (Square [] brackets in a Bourne shell script invoke the '/bin/test' program for your convenience. See the man page for 'test' for more info.)
    '-eq' compares two values NUMERICALLY, while '==' compares two values as STRINGS.
    Oops, I see what the other poster said about the leading space. What you really need to do is cut the number out of the string. You don't care about the file name.
    if [ `echo "$L" | cut -c 1-7` -eq 0 ] ;
    then
      echo $L
      echo No additions to the Email List
    else
      echo --$L
      echo Adding new entries to the Email List
    fi

Maybe you are looking for

  • Downloading on same account, different computers

    I have two computers in my house. Different family members have their iPods registered to the different computers, but use the same Apple Account for iTunes. Do I have to download songs and videos and pay for them again if i'm downloading them on the

  • Access applescript in illustrator CS2 plugin

    Does anyone have an update to the ASScripting.h file that allows for the execution of applescript with Illustrator CS2. Can compile plugin but get runtime errors on applescript. My ASScripting.h is from Illustrator 10 is there a new and improved vers

  • Sample Sales Content Guide for OBIEE11g

    Hi, For OBIEE 10g we had a Sample Sales Content Guide document based on which we could practice and recreate the repository, dashboards etc. Can we find out any similar document for OBIEE11g ?

  • What happend to the 580 Lightning ?

    My shops only have this card now: http://www.alternate.de/html/product/MSI/N580GTX_Twin_Frozr_III_15D5_Power_Edition/967642/? Both Lightning versions of the 580 are not in the product list anymore Did they stop produce those cards  ? And is this card

  • " itunes has detected a problem with your audio configuration....." PLZ HLP

    every time i open up my itunes it comes up with " itunes has detected a problem with your audio configuration audio/video playback may not operate properly" then when i tunes does open up i double click on a song and it dosent go, it dosent even show