Script that works in command line fails in EM.

Hi,
I'm using AIX 5.3 and tivoli dpo 5.4.1. Oracle DB is EE version 10.2.0.3
the following script works fine when I run it through a normal shell. (i.e. invoking rman by hand)
RMAN> run {
2> allocate channel oem_sbt_backup type 'sbt_tape' format '%U' parms 'ENV=(BLKSIZE=104857600, TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
backup as BACKUPSET current controlfile tag '06052007023232';
restore controlfile validate from tag '06052007023232';
release channel oem_sbt_backup;
3> 4> 5> 6>
channel oem_sbt_backup: validation complete, elapsed time: 00:00:08
Finished restore at 05.06.2007
released channel: oem_sbt_backup
RMAN>
but the same script run through the Enterprise Manager console gives me :
RMAN-03009: failure of allocate command on oem_sbt_backup channel at 06/05/2007 14:40:46
ORA-19554: error allocating device, device type: SBT_TAPE, device name:
ORA-27000: skgfqsbi: failed to initialize storage subsystem (SBT) layer
IBM AIX RISC System/6000 Error: 610: Unknown system error
Additional information: 7011
ORA-19511: Error received from media manager layer, error text:
SBT error = 7011, errno = 610, sbtopen: system error
And I cannot find anything from this message (errno=610) in metalink, google or here.
dsmerror.log and dsmoraerror.log tell me nothing, neither does sbtio.log. tdpoerror.log is empty.
In fact everything is look fine except for EM failing to backup to tape.
Does anyone know what is happening or what that error means?
Thank you for your time.
Regards
Oli

Have you configured your default channels from OEM, try configuring all your default channels at RMAN level, so that you dont have to specifiy in run { } script;
For Eg. in my environment , i have following settings and backup command works fine both from shell and grid
its Oracle 9.2.0.6
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 3;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/rman_backup/%F';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '%F_TAPE_CONTROLFILE';
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 4;
CONFIGURE DEVICE TYPE DISK PARALLELISM 5;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/rman_backup/d_%d_s_%s_p_%p_t_%t' MAXPIECESIZE 1536 M;
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' MAXPIECESIZE 1536 M PARMS "ENV=(NB_ORA_CLIENT=topdb1,NB_ORA_SERV=ilsdb2)" FORMAT 'd_%d_s_%s_p_%p_t_%t';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt1/app/oracle/product/ora92/dbs/snapcf_topaz.f'; # default
BACKUP DEVICE TYPE SBT CURRENT CONTROLFILE;

Similar Messages

  • WebSphere ServerRepository.xml / Deployed WAR Works, LH Command Line Fails

    Anyone deploying to WebSphere that has gotten the LH Command Line tool to function with a ServerRepository.xml pointing to a DataSource within WebSphere?
    We created a ServerRepository.xml that utilizes the WebSphere DataSource as the Performance is significantly greater for the idm.war deployed to WAS. The idm.war file works & performs better using this.
    LH Command line fails with a ServerRepository.xml pointing to a WebSphere DataSource. I've been troubleshooting with SUN support & so far we have not made any progress to resolve this. LH fails trying to execute anything...see below for example & partial cut/pasted error message.
    **set WSHOME, JAVA_HOME, & WAS_HOME 1st
    $WSHOME/bin/lh -Djava.ext.dirs=$JAVA_HOME/jre/lib/ext:$WAS_HOME/lib:/ebiz/sim/dev/lib console -u configurator
    Error:
    com.waveset.util.InternalError:
    ==> com.waveset.util.ConfigurationError:
    ==> java.sql.SQLException: invalid arguments in callDSRA0010E: SQL State = null, Error Code = 17,433DSRA0010E: SQL State = null, Error Code = 17,433
    at com.waveset.repository.ServerRepository.initDataStore(ServerRepository.java:1527)
    at com.waveset.repository.ServerRepository.getPrimaryDataStore(ServerRepository.java:1343)
    at com.waveset.repository.ServerRepository.getPrimaryDataStore(ServerRepository.java:1309)
    at com.waveset.repository.ServerRepository.init(ServerRepository.java:717)
    at com.waveset.repository.ServerRepository.<init>(ServerRepository.java:693)
    at com.waveset.repository.ServerRepository.getRepository(ServerRepository.java:134)
    at com.waveset.server.Server.init(Server.java:251)
    at com.waveset.server.Server.start(Server.java:217)
    at com.waveset.server.Server.getServer(Server.java:807)
    at com.waveset.server.Server.getServer(Server.java:784)
    at com.waveset.session.SessionFactory.getLoginConfigInfo(SessionFactory.java:849)
    at com.waveset.session.SessionFactory.startupMode(SessionFactory.java:916)
    at com.waveset.session.SessionFactory.getLoginModGrp(SessionFactory.java:885)
    at com.waveset.session.SessionFactory.getSession(SessionFactory.java:170)
    at com.waveset.session.SessionFactory.getSession(SessionFactory.java:390)
    at com.waveset.session.SessionFactory.getSession(SessionFactory.java:456)
    at com.waveset.session.WavesetConsole.newSession(WavesetConsole.java:361)
    at com.waveset.session.WavesetConsole.start(WavesetConsole.java:331)
    at com.waveset.session.WavesetConsole.main(WavesetConsole.java:218)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
    at java.lang.reflect.Method.invoke(Method.java:391)
    at com.waveset.util.CommandProcess.invokeMain(CommandProcess.java:212)
    at com.waveset.util.CommandProcess.launch(CommandProcess.java:162)
    at com.waveset.util.CommandProcess.run(CommandProcess.java:300)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
    at java.lang.reflect.Method.invoke(Method.java:391)
    at com.waveset.util.Command.main(Command.java:96)
    Wrapped exception:
    Architecture:
    IDM 7.0
    WebSphere 6.x
    Oracle THIN Driver ojdbc14.jar - 10.2.0.x
    AIX 5.3 ML3

    To get the WAR deployed within WebSphere to function, I found the IDM Doc (IDM 7.0 Installation - "Configuring a WebSphere DataSource for Identity Manager" - Pgs 117 - 134) to be pretty decent for creating the actual JDBC DataSource.
    My recommendation is to setup the DataSource at the Scope=Cell Level & use a WAS J2C Auth Entry for the DataSource so you do not need to use the -U or -P options in your setRepo command...this also helps ensure its truly connecting using WAS.
    Looking at what you had, try this modified...
    $WSHOME/bin/lh -Djava.ext.dirs=$JAVA_HOME/jre/lib/ext:$WAS_HOME/lib setRepo -n -tSQLServer -icom.ibm.websphere.naming.WsnInitialContextFactory -fjdbc/idm -uiiop://localhost:9810 -o"D:\apps\temp.xml"
    *Additional comments
    -n will bypass any checking and ignore any error message.
    -f must be identical to the WAS JDBC DataSource Name jdbc/idm
    **You do not need to redeploy after replacing the ServerRepository.xml; however, you do need to bounce the WAS AppServer & should monitor the AppServer SystemOut.log on startup to ensure the IDM WAR starts up successfully
    ***This is all assuming the DataSource you have within WAS is working (you can validate via the TestConnection)

  • Scripts that work in VSTS IDE fails when run through MTM.

    Hi, we have created scripts using VSTS Coded UI that work well when triggered from VSTS IDE itself. But when we trigger them through MTM and executed from Agent Machine, it seems that some controls are not being identified properly. This is causing scripts
    to fail intermittently.
    When we re run the script again, it passes. this behaviour is inconsistent.
    Since this issue does not occur in VSTS, it has to be somehow linked to how the scripts work through MTM. any guidance on this will be much appreciated

    Hi Vasanth,
    Thank you for posting in MSND forum.
    >>But when we trigger them through MTM and executed from Agent Machine, it seems that some controls are not being identified properly. This is causing scripts to fail intermittently.
    According to your issue, could you please share me the detailed error message after you run coded UI test some controls failed through MTM?
    In addition, as you said that since this coded UI test script work well by the VSTS IDE, so the issue is not related to the coded UI test project itself.
    Therefore, to check if this issue is related to the lab environment, I suggest you could try to create a simple coded UI test from VSTS IDE and then ensure the simple coded UI test work well from the VSTS IDE.
    Then, you could try to run this simple coded UI test by MTM and then check if you could run the simple coded UI test fine.
    (1) If you still could not run simple coded UI test well, I suggest you could try to restart your test agent machine and then check this issue again.
    (2) If you could run this simple coded UI test, I suggest you could to make Coded UI Tests Wait For Specific Events and then check this issue again.
    https://msdn.microsoft.com/en-us/library/gg131072.aspx?f=255&MSPPError=-2147217396
    In addition, if you are testing the web application for coded UI test, please try to check if the test agent machine's IE browser is same with the local VS machine. Sometime, the different version of IE will impact the coded UI test.
    If you have any update message about your issue, please free fell let to me know.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Issue with variables and white space in powershell script that calls a command line command

    Guys,
    I have a question regarding this script. Each time I run it, it creates the share, but with a space after it. Also I need help figuring out how to put in the variable for the folder path.
    Below is the code
    $Users=Import-Csv C:\users2.csv
    foreach($User in $Users){
         $User.SNCORP
         $User.HPB
         $User
         cmd /c "net share "$User.SNCORP"=D:\Users\"$User.HPB" /grant:Everyone,FULL"
    The csv file looks like this
    HPB,SNCORP
    ccarter,carterch$
    This is my output in powershell
    PS C:\> .\shareflip.ps1
    carterch$
    ccarter
    HPB                                                         SNCORP
    ccarter                                                     carterch$
    The syntax of this command is:
    NET SHARE
    sharename
              sharename=drive:path [/GRANT:user,[READ | CHANGE | FULL]]
                                   [/USERS:number | /UNLIMITED]
                                   [/REMARK:"text"]
                                   [/CACHE:Manual | Documents| Programs | BranchCache | None]
              sharename [/USERS:number | /UNLIMITED]
                        [/REMARK:"text"]
                        [/CACHE:Manual | Documents | Programs | BranchCache | None]
              {sharename | devicename | drive:path} /DELETE
              sharename \\computername /DELETE
    Any help is greatly appreciated. 
    Christopher

    There is no need to use cmd /c. You should be able to use:
    net share "$($User.SNCORP)=D:\Users\$($User.HPB)" "/grant:Everyone,Full"
    Use showargs.exe (from the article) at the beginning of this line to see the command line PowerShell is actually running (very useful for troubleshooting).
    -- Bill Stewart [Bill_Stewart]

  • Script that worked in CS does not work in CS4 - multiple open page, print , pdf export and close

    I had a script that worked great for me in Indesign CS. But now does not work in CS4. Anyone knows what needs to be done to make it work again ?
    When I drop folder with indesign files on top of this script:
    1. opens first page
    2. turns specific layer on
    3. prints using preset
    4. exports using preset
    5. close without saving
    6. next page
    Anyone who can give me solution or idea how this should work is greatly appreciated.
    on open sourceFolders
    repeat with sourceFolder in sourceFolders
    tell application "Finder"
    try
    -- If you would like to include subfolders, you say - every file of entire contents of folder…
    set idFiles to (every file of folder sourceFolder whose file type is "IDd5") as alias list
    on error -- work around bug if there is only one file
    set idFiles to (every file of folder sourceFolder whose file type is "IDd5") as alias as list
    end try
    end tell
    if idFiles is not {} then
    tell application "Adobe InDesign CS4"
    set user interaction level to never interact
    repeat with i from 1 to count of idFiles
    open item i of idFiles
    tell document 1
    try
    set visible of layer "ImagesTag_Layer" to true
    end try
    set myPreset to "letter size" -- name of print style to use
    with timeout of 700 seconds
    print using myPreset without print dialog
    end timeout
    set myPreset1 to "pdf preset name" -- name of pdf export style to use
    set myName to the name -- name includes .indd should remove at some point          
    with timeout of 700 seconds
    export format PDF type to "users:temp:Desktop:pdf:" & myName & ".pdf" using myPreset1 without showing options -- set path here format ComputerName:Folder1:Folder2:......:FileName.pdf
    end timeout
    close without saving
    end tell
    end repeat
    set user interaction level to interact with all
    end tell
    end if
    return 10 -- try again in 10 seconds
    end repeat
    end open

    (Disclaimer: me not an AS guy!)
    First thing I noticed is the interaction level is set off. If you comment out this line
    set user interaction level to never interact
    you might be able to pinpoint the exact error -- ID will display a standard "failed" dialog, hopefully showing the line that it fails on.
    A quick question: the script assumes two presets in your InDesign: one for print ("letter size") and one for PDFs ("pdf preset name"):
    set myPreset to "letter size" -- name of print style to use
    set myPreset1 to "pdf preset name" -- name of pdf export style to use 
    Do these actually exist in your CS4, with the same (non)capitalization and spaces?

  • Ant deploy from Jdev works fine - same ant deploy from command line fails

    Hi
    I'm using Jdev 10.1.3 and OAS 10.1.3 and created some web services. I can deploy using the Wizard in JDev - works fine, created a build.xml file using the <oracle:deploy> ant task. Also work fine from JDeveloper.
    But when running from command line (windows) I get the following:
    d:\>ant deploy
    Buildfile: build.xml
    init:
    compile:
    copy:
    ear:
    [war] Building war: D:\invision\source\INVisionWebService1013\INVisionWebService.war
    [war] Warning: selected war files include a WEB-INF/web.xml which will be ignored (please use webxml attribute to war task)
    [ear] Building ear: D:\invision\source\INVisionWebService1013\deploy\INVisionWebService.ear
    [delete] Deleting: D:\invision\source\INVisionWebService1013\INVisionWebService.war
    deploy:
    BUILD FAILED
    D:\invision\source\INVisionWebService1013\build.xml:282: The following error occurred while executing this line:
    jar:file:/D:/apache/apache-ant-1.6.5/lib/ant-oracle-classes.jar!/oracle/antlib.xml:27: taskdef class oracle.j2ee.ws.tools.wsa.cli.ant.GenProxy cannot be found
    I have studied the web for suggestion also http://download-east.oracle.com/docs/cd/B25221_04/web.1013/b14431/anttasks.htm#sthref164 but nothing seems to work. Tried copying oracle jars to my ant directory (ant version 1.6.5) but still no success (above error message disappered but other came instead).
    Why must this process be so complex. Can anyone help?

    Hi,
    You need to have the following jars in your classpath before firing the ant deploy task.
    ${Oracle_Home}\j2ee\utilities\ant-oracle-classes.jar;
    ${Oracle_Home}\j2ee\home\lib\adminclient.jar;
    ${Oracle_Home}\2ee\home\lib\oc4j-internal.jar;
    ${Oracle_Home}\j2ee\home\lib\javax77.jar;
    ${Oracle_Home}\j2ee\home\lib\javax88.jar;
    ${Oracle_Home}\j2ee\home\lib\jmxri.jar;
    ${Oracle_Home}\OracleAS_1\webservices\lib\wsa.jar;
    Please check your classpath and add the above jars, if not present and try ant deploy task now.
    I suppose it should work fine.
    Hope its helpful.
    Rgds,
    Prashanth Babu.

  • Help! Script that works in 8.1.7 does not work in 9.2.0

    I have a generic hot backup script that runs well in our 8i environment where I source the username and password for SYS from a secured txt file. However I could not get the script to work in our recently installed 9.2.0 environment.
    Below is an extract of the hot backup script:
    # Set environment
    . ${HOME}/BACKUP/${DBNAME}.env
    CONNECT_STRING=`${HOME}/admin/Util/syspass.sh sys $DBNAME`
    export CONNECT_STRING
    #Define some commands and files
    SQLPLUS="${ORACLE_HOME}/bin/sqlplus -s ${CONNECT_STRING}"
    TIME_STAMP=`date +"%d-%b-%Y"`
    # Test for duplicate filenames
    $SQLPLUS <<-EOF
    var numfiles number;
    BEGIN
    SELECT count(*) into :numfiles
    FROM dba_data_files a, dba_data_files b
    WHERE a.file_name != b.file_name
    AND SUBSTR(a.file_NAME, INSTR(a.file_name, '/', -1) + 1)
    = SUBSTR(b.file_NAME, INSTR(b.file_name, '/', -1) + 1);
    END;
    exit :numfiles
    EOF
    FILE_ERROR=$?
    echo "Number of duplicate files $FILE_ERROR"
    if [ $FILE_ERROR -gt 0 ]; then
    echo "Aborting, ... $FILE_ERROR duplicate filenames"
    exit
    fi
    As per the extract above,
    in our 8.1.7 environment,
    (1) the command CONNECT_STRING=`${HOME}/admin/Util/syspass.sh sys $DBNAME`
    will result in CONNECT_STRING=sys/xxxxxx@<sid>
    (2) the command SQLPLUS="${ORACLE_HOME}/bin/sqlplus -s ${CONNECT_STRING}"
    will result in SQLPLUS=/usr/oracle/product/8.1.7/bin/sqlplus -s sys/xxxxxx@<sid>
    (3) and when issue $SQLPLUS <<-EOF
    it connects fine and execute the procedure successfully.
    in Oracle 9.2.0,
    (1) the command CONNECT_STRING=`${HOME}/admin/Util/syspass.sh sys $DBNAME`
    works fine with result same as in 8.1.7 - CONNECT_STRING=sys/xxxxxx@<sid>
    (2) the command SQLPLUS="${ORACLE_HOME}/bin/sqlplus -s ${CONNECT_STRING}"
    works fine with result SQLPLUS=/usr/oracle/product/9.2.0/bin/sqlplus -s sys/xxxxxx@<sid>
    (3) However, when issue $SQLPLUS <<-EOF returns an error:
    ERROR:
    ORA-28009: connection to sys should be as sysdba or sysoper
    How can I fix that??
    Is it because of the username/password structure (sys/xxxxxx@<sid>)??
    I would like to keep such username/password format if possible.
    I have also tried to hard coded the username/password for variable SQLPLUS as:
    SQLPLUS="/usr/oracle/product/9.2.0/bin/sqlplus -S '/ as sysdba'"
    But it still doesn't work when issue $SQLPLUS, it returns the following:
    Usage: SQLPLUS [ [<option>] [<logon>] [<start>] ]
    where <option> ::= -H | -V | [ [-L] [-M <o>] [-R <n>] [-S] ]
    <logon> ::= <username>[<password>][@<connect_string>] | / | /NOLOG
    <start> ::= @<URI>|<filename>[.<ext>] [<parameter> ...]
    "-H" displays the SQL*Plus version banner and usage syntax
    "-V" displays the SQL*Plus version banner
    "-L" attempts log on just once
    "-M <o>" uses HTML markup options <o>
    "-R <n>" uses restricted mode <n>
    "-S" uses silent mode
    Any ideas as to how to have the script run in 9.2.0??
    Your help is much appreciated.

    Hi, I tried CJ’s suggestion; however it still doesn’t work for me.
    I tried assigning the command line to a variable, I tried to log in directly from the command line, and both don’t work (see below). What did I do wrong??
    $ SQLPLUS="/usr/oracle/product/9.2.0/bin/sqlplus -S \"sys/xxxxxx@<sid> as sysdba\""
    $ echo $SQLPLUS
    /usr/oracle/product/9.2.0/bin/sqlplus -S "sys/xxxxxx@<sid> as sysdba"
    $ $SQLPLUS
    Usage: SQLPLUS [ [<option>] [<logon>] [<start>] ]
    where <option> ::= -H | -V | [ [-L] [-M <o>] [-R <n>] [-S] ]
    <logon> ::= <username>[<password>][@<connect_string>] | / | /NOLOG
    <start> ::= @<URI>|<filename>[.<ext>] [<parameter> ...]
    "-H" displays the SQL*Plus version banner and usage syntax
    "-V" displays the SQL*Plus version banner
    "-L" attempts log on just once
    "-M <o>" uses HTML markup options <o>
    "-R <n>" uses restricted mode <n>
    "-S" uses silent mode
    $ sqlplus "sys/xxxxxx@<sid> as sysdba"
    SQL*Plus: Release 9.2.0.4.0 - Production on Wed Mar 24 08:53:05 2004
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    ERROR:
    ORA-01031: insufficient privileges

  • Script that works in 8.1.7 does not work in 9.2.0

    I have a generic hot backup script that runs well in our 8i environment where I source the username and password for SYS from a secured txt file. However I could not get the script to work in our recently installed 9.2.0 environment.
    Below is an extract of the hot backup script:
    # Set environment
    . ${HOME}/BACKUP/${DBNAME}.env
    CONNECT_STRING=`${HOME}/admin/Util/syspass.sh sys $DBNAME`
    export CONNECT_STRING
    #Define some commands and files
    SQLPLUS="${ORACLE_HOME}/bin/sqlplus -s ${CONNECT_STRING}"
    TIME_STAMP=`date +"%d-%b-%Y"`
    # Test for duplicate filenames
    $SQLPLUS <<-EOF
    var numfiles number;
    BEGIN
    SELECT count(*) into :numfiles
    FROM dba_data_files a, dba_data_files b
    WHERE a.file_name != b.file_name
    AND SUBSTR(a.file_NAME, INSTR(a.file_name, '/', -1) + 1)
    = SUBSTR(b.file_NAME, INSTR(b.file_name, '/', -1) + 1);
    END;
    exit :numfiles
    EOF
    FILE_ERROR=$?
    echo "Number of duplicate files $FILE_ERROR"
    if [ $FILE_ERROR -gt 0 ]; then
    echo "Aborting, ... $FILE_ERROR duplicate filenames"
    exit
    fi
    As per the extract above,
    in our 8.1.7 environment,
    (1) the command CONNECT_STRING=`${HOME}/admin/Util/syspass.sh sys $DBNAME`
    will result in CONNECT_STRING=sys/xxxxxx@<sid>
    (2) the command SQLPLUS="${ORACLE_HOME}/bin/sqlplus -s ${CONNECT_STRING}"
    will result in SQLPLUS=/usr/oracle/product/8.1.7/bin/sqlplus -s sys/xxxxxx@<sid>
    (3) and when issue $SQLPLUS <<-EOF
    it connects fine and execute the procedure successfully.
    in Oracle 9.2.0,
    (1) the command CONNECT_STRING=`${HOME}/admin/Util/syspass.sh sys $DBNAME`
    works fine with result same as in 8.1.7 - CONNECT_STRING=sys/xxxxxx@<sid>
    (2) the command SQLPLUS="${ORACLE_HOME}/bin/sqlplus -s ${CONNECT_STRING}"
    works fine with result SQLPLUS=/usr/oracle/product/9.2.0/bin/sqlplus -s sys/xxxxxx@<sid>
    (3) However, when issue $SQLPLUS <<-EOF returns an error:
    ERROR:
    ORA-28009: connection to sys should be as sysdba or sysoper
    How can I fix that??
    Is it because of the username/password structure (sys/xxxxxx@<sid>)??
    I would like to keep such username/password format if possible.
    I have also tried to hard coded the username/password for variable SQLPLUS as:
    SQLPLUS="/usr/oracle/product/9.2.0/bin/sqlplus -S '/ as sysdba'"
    But it still doesn't work when issue $SQLPLUS, it returns the following:
    Usage: SQLPLUS [ [<option>] [<logon>] [<start>] ]
    where <option> ::= -H | -V | [ [-L] [-M <o>] [-R <n>] [-S] ]
    <logon> ::= <username>[<password>][@<connect_string>] | / | /NOLOG
    <start> ::= @<URI>|<filename>[.<ext>] [<parameter> ...]
    "-H" displays the SQL*Plus version banner and usage syntax
    "-V" displays the SQL*Plus version banner
    "-L" attempts log on just once
    "-M <o>" uses HTML markup options <o>
    "-R <n>" uses restricted mode <n>
    "-S" uses silent mode
    Any ideas as to how to have the script run in 9.2.0??
    Your help is much appreciated.

    My first comment is that even though you are using a secure encrypted text file, putting the SYS password on the command line can make the password available to anyone on the server who can perform a ps command:
    shvec320 ECD2 /u01/home/oracle/cronscripts $ sqlplus mark/mark4s@dbnm
    SQL*Plus: Release 8.1.7.0.0 - Production on Wed Mar 24 16:47:17 2004
    (c) Copyright 2000 Oracle Corporation. All rights reserved.
    Connected to:
    Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
    With the Partitioning option
    JServer Release 8.1.7.4.0 - Production
    SQL> !ps -ef | grep mark
    oracle 25494 25078 0 16:47:17 pts/4 0:00 sqlplus mark/mark4s@dbnm
    oracle 25497 25494 0 16:47:23 pts/4 0:00 grep mark
    Consider putting the connect string in the SQL script:
    sqlplus /nolog <<-EOF
    connect ${CONNECT_STRING}
    var numfiles number;
    BEGIN
    SELECT count(*) into :numfiles
    FROM dba_data_files a, dba_data_files b
    WHERE a.file_name != b.file_name
    AND SUBSTR(a.file_NAME, INSTR(a.file_name, '/', -1) + 1)
    = SUBSTR(b.file_NAME, INSTR(b.file_name, '/', -1) + 1);
    END;
    exit :numfiles
    EOF
    Starting in Oracle 9 (others will correct me if I am wrong) you cannot connect to the sys account without specifying as SYSDBA or SYSOPER.
    My testing (9.2.0.3) resulted in your ORA-1013 using "sys/password@dbname as sysdba". Using "sys/password as sysdba" works just fine. I seem to remember if you want to use @dbname, you will need to use password file authentication instead of OS authentication.
    My suggestion -if possible - is to use plain "connect / as sysdba" in your SQL Script and have ORACLE_HOME and ORACLE_SID set correctly in your environment (do it in ${HOME}/BACKUP/${DBNAME}.env) :
    sqlplus /nolog <<-EOF
    connect / as sysdba;
    var numfiles number;
    BEGIN
    SELECT count(*) into :numfiles
    FROM dba_data_files a, dba_data_files b
    WHERE a.file_name != b.file_name
    AND SUBSTR(a.file_NAME, INSTR(a.file_name, '/', -1) + 1)
    = SUBSTR(b.file_NAME, INSTR(b.file_name, '/', -1) + 1);
    END;
    exit :numfiles
    EOF
    HTH

  • Latest DNG converter not working in command-line mode

    Today I downloaded Adobe's latest DNG converter. It is failing with both .NEF and .CR2 files when run in command-line mode. It does appear to work in GUI mode. The switches+arguments I've used for my tests are:
    -u -e -p1 filename.CR2
    (or filename.NEF)
    With an older (CS2) version of the converter, the above arguments produce a .DNG output file as expected (with .CR2 files; I didn't try it with D3 .NEF files; surely that older version doesn't support the D3's format).
    With the very latest version, running the program with the above command produces no output. There's no error message.
    The 'readme' file that comes with the converter doesn't include any information about command-line usage, but I did find a PDF file covering this (adobe.com/products/dng/pdfs/dng_commandline.pdf). The switches+arguments shown in the PDF file appear to be exactly the ones I used in the past.
    I'm sure I'll need to use the most recent version to convert D3 RAW files. Is there something wrong with how I'm specifying its command-line switches/arguments?

    It struck me silly that I've been running tests with v.3.3 when 5.2 is the latest, so I downloaded it. The setup "wizard"...hmm, why is it a "wizard"? It provides no choice of installation path. I didn't realize this because immediately after I'd launched it, I knocked something onto the floor, reached down to pick it up ... and looked back up just in time to see the "wizard" complete the installation...but where, I didn't know. It didn't display any information about where it had installed the app. Adventures In Discoverability. :) I hunted around on the hard drive until I found it (C:\Program Files\Adobe -- well, at least you can launch it if you think to look for it in the 'Start' menu). So ... that needs a bit of work. Anyway, I copied the app into a directory of my choice -- one that's in my system's %PATH%, replacing spaces in the name with underscores. It works fine in that directory -- no problem with the name-change as far as I can tell. Now back to the fun stuff...
    This version doesn't seem to require a fully qualified path to the input file or to the output directory when "-d" is used. That's an improvement. IOW, this worked:
    converter -p1 -d DNG filename
    where "converter" is the program's name, "DNG" is the name of a subdirectory of the directory where I'm running the test, and "filename" is the name of a RAW file in that directory.
    The program still doesn't know how to create a directory (or ask about creating one if it doesn't exist). Fails silently if "-d" is used and the specified directory doesn't exist. But at least this version returns an exit code of 1 due to the failure -- better than returning 0.
    Still doesn't understand wildcards. Hope done sprang eternal there for a moment, but oh well. Back to "for" loops...
    Still fails silently, returning exit code 0 (oops), if a nonsensical command-line is used (e.g., using "-c" as the only argument).
    Hey, how about a truly silly command-line error -- a command line including both "-c" and "-u". What happens? It "consumes" the first of the two mutually exclusive switches, ignoring the second -- you get a compressed DNG file. Swap the order of the switches, and you get an uncompressed file. (I'd vote for a syntax-error message in that case, m'self.)
    Interestingly strange little program...If I run it from the command line, it drops back to the command line immediately after I press ENTER. That makes it appear to have failed. But it hasn't -- it's running in the background, and a few seconds later the DNG file is created. But, if I run it from within a batch file, it does NOT return control to me until it has completed writing the output file. Wonder what's up with that.
    Fun stuff. :)

  • Please help: Running a java script form the windows command line.

    Hello forum,
    I'm trying to run a java script from the command line on
    windows but I always get the "Failed to open document" alert.
    I typed the following in the run command line:
    "flash.exe" C:\Documents and Settings\Hasan.Atieh\My
    Documents\science\java scripts\testing jsfl\get_files_mx2004.jsfl
    now I copied and pasted the path of my java script file from
    the windows explorer address bar so I'm sure that the java script
    file exists in the specified path.
    Any thoughts why am I getting the message!!

    :oops: never mind... issue resolved. I didn't quote the java
    script file path but thats because the help documents on flash
    didn't say that.
    this is what flash help say:
    To run a script from the command line on Windows:
    Use the following syntax (add path information as required):
    "flash.exe" myTestFile.jsfl

  • How to create script that run sudo-command, via automator?

    Hi
    I'd want to create script to automate one command I need quite often. I just can't get this to work.
    I'm not using english OS, but I think this is what I do. In automator I choose Utilities -> Run script
    Here's the script I try to run:
    sudo "/Library/Application Support/VMware Fusion/boot.sh --restart"
    I found some tip to do it like this:
    do shell script "sudo /Library/Application Support/VMware Fusion/boot.sh --restart password "pass" with administrator privileges
    Where pass is my admin password.
    This does not work, either.
    Could anybody help me on this?
    Thanks...
    Tomi Toivonen
    Message was edited by: Tomi

    This is not working. What's wrong?
    What's wrong is that the '--restart' is a parameter for boot.sh, and therefore needs to be included within the quotes.
    Additionally, the shell uses spaces to divide parameters, so the spaces in the command will make it appear as multiple commands - '/Library/Application', 'Support/VMware' and 'Fusion/boot.sh'. You need to escape them using a backslash:
    <pre class=command>do shell script "/Library/Application\ Support/VMware\ Fusion/boot.sh --restart" password "pass" with administrator privileges</pre>
    If it's outside of the quotes it would be interpreted as a parameter to 'do shell script' and it won't know what to do with that.

  • Executing Command within Pkg.procedure does not work-but command line does

    [Version 10.2.0.2
    [Scenario] Let's say my Username is Jack. My goal is to grant two roles to a user. From the command line, I have no problem.
    PROMPT-> Grant role1,role2 to TESTUSER
    However, when I create a package and procedure (owned by Jack); I receive an ORA-01919 error saying that role2 does not exist.
    There is no question the role exists and I am able to grant it to the TESTUSER on the command line as Jack.
    Any ideas what is going on?

    I can't post it as the database is on another system. However, I found my the fix. My Jack user had grant any role; therefore, I thought it should work both from command line and package.proc; however I granted role2 to Jack with admin privs and it works now both from the command line and the pkg.proc.
    Thanks for the response.

  • Work from command line but did not work from JSP call

    I have a test class that should perform Triple DES. When I run it from command line work ok, but when runs from JSP it give me an error:
    Exception:
    ======================================
    javax.crypto.IllegalBlockSizeException: Input length not multiple of 8 bytes
    put 3 check points inside the code, and run it from command line and here is the result:
    C:\Documents and Settings\salasadi\Desktop\DigitalMailer>java TDESStringEncrypto
    r 123456781234567812345678 "CID=103&A
    this is pass 3
    this is pass 1
    this is pass 2
    here is the class:
    import javax.crypto.*;
    import javax.crypto.spec.*;
    import java.security.*;
    import java.io.*;
    public class TDESStringEncryptor
    static final int DATA_STRING_LENGTH = 64;
    public static void main(String[] args)
    try
    TDESStringEncryptor enc = new TDESStringEncryptor();
    String value = enc.Encrypt(args[0], args[1]);
    System.err.println(value);
    catch (Exception ex)
    System.err.println(ex);
    public String Encrypt(String inkey, String data)
    throws Exception
    // convert key to byte array and get it into a key object
    byte[] rawkey = inkey.getBytes();
    DESedeKeySpec keyspec = new DESedeKeySpec(rawkey);
    SecretKeyFactory keyfactory = SecretKeyFactory.getInstance("DESede");
    SecretKey key = keyfactory.generateSecret(keyspec);
    Cipher cipher = Cipher.getInstance("DESede/ECB/NoPadding");
    cipher.init(Cipher.ENCRYPT_MODE, key);
    byte[] out = cipher.doFinal( padString(data).getBytes( ) );
    System.out.println("this is pass 1");
    return byteArrayToHexString( out );
    private String byteArrayToHexString(byte in[])
    byte ch = 0x00;
    int i = 0;
    if ( in == null || in.length <= 0 )
    return null;
    String pseudo[] = {"0", "1", "2", "3", "4", "5", "6", "7", "8",
    "9", "A", "B", "C", "D", "E", "F"};
    StringBuffer out = new StringBuffer( in.length * 2 );
    while ( i < in.length )
    ch = (byte) ( in[i] & 0xF0 );
    ch = (byte) ( ch >>> 4 );
    ch = (byte) ( ch & 0x0F );
    out.append( pseudo[ (int) ch] );
    ch = (byte) ( in[i] & 0x0F );
    out.append( pseudo[ (int) ch] );
    i++;
    String rslt = new String( out );
    System.out.println("this is pass 2");
    return rslt;
    private String padString( String s )
    StringBuffer str = new StringBuffer( s );
    int strLength = str.length();
    for ( int i = 0; i <= DATA_STRING_LENGTH ; i ++ )
    if ( i > strLength ) str.append( ' ' );
    System.out.println("this is pass 3");
    return str.toString();
    And here is the JSP call:
    TDESStringEncryptor encryptz = new TDESStringEncryptor();
    String cryptodata1 = encryptz.Encrypt(Keyz,cryptodata);
    Thanks

    Please use [ code ] tags when posting code.
    Please indicate the line that causes the exception.
    Please indicate what Keyz and cryptodata is.

  • Breakpoints not working with Command Line Project

    I have created a “Command Line Utility” “C++ Tool” and I am unable to breakpoint into the code. I’m in the Debug environment and select “Debug Executable” but no luck. I created the sample tutorial which is a Coco Hello World example and was able to get breakpoints to work there. I downloaded and installed XCode yesterday. Been trying to get breakpoints to work every since with no luck. Thanks in advance.
    Sean
    MBP   Mac OS X (10.4.9)  

    OK, the plot thickens a little. I was being too aggressive on my breakpoint. If I breakpoint at the first cout then I can breakpoint. The problem is if I break after the cin. Breakpoints after cin won’t execute and if I pause all context is lost – like the stack got corrupted.
    <pre>
    #include <iostream>
    #define ENDFILE "CTRL-D or CTRL-Q then CTRL-D in XCODE"
    int main (int argc, char * const argv[])
    char next;
    // insert code here...
    std::cout << "Hello, World!\n";
    const char NWLN = '\n';
    int charCount;
    int lineCount;
    lineCount = 0;
    std::cout << "Enter a line or press " << ENDFILE << ": ";
    std::cin.get(next);
    while (!std::cin.eof())
    charCount = 0;
    while (next != NWLN)
    std::cout.put(next);
    charCount++;
    std::cin.get(next);
    std::cout.put(NWLN);
    lineCount++;
    std::cout << "Number of characters in line " << lineCount
    << " is " << charCount << std::endl;
    std::cout << "Enter a line or press " << ENDFILE << "; ";
    std::cin.get(next);
    std::cout << std::endl << std::endl << "Number of lines processed is "
    << lineCount << std::endl;
    return 0;
    </pre>
    MBP   Mac OS X (10.4.9)  

  • Create domain from command line failed in wls91

    Hi,
    I am trying to create a simple domain from command line for wls91. It even didn't ask me the password. How can I do it? Thanks
    C:\testdomain>java weblogic.Server
    <Feb 23, 2006 9:11:50 AM PST> <Info> <WebLogicServer> <BEA-000377> <Starting Web
    Logic Server with BEA JRockit(R) Version R26.0.0-189-53463-1.5.0_04-20051122-204
    1-win-ia32 from BEA Systems, Inc.>
    C:\testdomain\config\config.xml not found
    No config.xml was found.
    Would you like the server to create a default configuration and boot? (y/n): y
    <Feb 23, 2006 9:11:56 AM PST> <Info> <Management> <BEA-140013> <C:\testdomain\.\
    config\config.xml not found>
    <Feb 23, 2006 9:11:56 AM PST> <Info> <Security> <BEA-090065> <Getting boot ident
    ity from user.>
    Enter username to boot WebLogic server:weblogic
    <Feb 23, 2006 9:12:00 AM PST> <Error> <Security> <BEA-090782> <Server is Running
    in Production Mode and Native Library(terminalio) to read the password securely
    from commandline is not found.>
    <Feb 23, 2006 9:12:00 AM PST> <Notice> <WebLogicServer> <BEA-000388> <JVM called
    WLS shutdown hook. The server will force shutdown now>
    <Feb 23, 2006 9:12:00 AM PST> <Notice> <WebLogicServer> <BEA-000365> <Server sta
    te changed to FORCE_SHUTTING_DOWN>
    C:\testdomain>

    Hi,
    If you are still having problems creating a domain from the command line, the official solution would be to use
    {proper_path}/bea/weblogic{proper_version}/common/bin/config.sh -mode=console
    This will guide you to the same steps as the visual version of the wizard, but using the command prompt.
    If you are using windows, the same works but with the command config.cmd, and mutatis mutandis.
    Regards,
    LG

Maybe you are looking for

  • Field value is not coming in my customize ALV report

    Hi All, Good day. I have added two fields in a customized ALV report. But the customized report was not developed by me. Therefore I am unable to understand the whole report. As per my requirement I have added 2 fields more like* quantity* & unit fie

  • My last 17" MacBook Pro?

    Just like in this thread (https://discussions.apple.com/message/18617731#18617731), I cannot believe that Apple has abandoned the 17" market.  As a web designer and photographer, I absolutely need (and LOVE) the extra room and impact the 17" display

  • Ticker on a JPopup?

    Kind of a weird question (stemmed from a weird request). In windows print dialog where you choose the number of copies, is ther anyway to have that control on a context menu popup? I have a popup on a textfield and when the user right clicks, i show

  • First Generation ipod

    Yes, i am buying a first generation ipod. it said that it is connected though firewire "Specificly" for MAC but if my PC has a firewire port.... will it work?

  • Is the software version 1.1.1 for 80GB classic the most current?

    I have just submitted feedback to apple and they asked me what software i was currently using on my ipod classic. However the drop down menu showed that v 1.1.1 (which i have) is for the ipod VIDEO 5th gen and that for ipod CLASSIC 6th gen it is v 1.