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.

Similar Messages

  • 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;

  • OLE Program works in debug mode fails when run from F8

    Hello,
    I have implemented a code from this forum for sending documents to printer, as below, but although it works well in debug mode, it fails when I execute directly from SE38? Any idea?
    Best Regards,
    Didem GUNDOGDU
      CREATE OBJECT gs_word 'WORD.APPLICATION'.
      SET PROPERTY OF gs_word 'Visible' = '0'.
      CALL METHOD OF gs_word 'Documents' = gs_documents .
      CALL METHOD OF gs_documents 'Open' = gs_newdoc
        EXPORTING
          #1 = p_filep .
      CALL METHOD OF gs_word 'ActiveDocument' = gs_actdoc.
      CALL METHOD OF gs_actdoc 'PrintOut'  .
      CALL METHOD OF gs_word 'Quit' .

    Hi Didem,
    Just a suggestion: could you print syst-subrc after each method call? Perhaps that can give you a clue.
    Regards,
    John.

  • Cube refresh Failed when Running through Cube Refresh Utility

    Hi all,
    We are testing CubeRefresh utility in Planning. When we run that through command line it runs so quick and gives us the message" This job has run successfully".
    How ever we don't see our outline updated with the changes we made in planning.
    Any Idea?
    aslo, Is there any way to track changes during the execution of this command. Logs doesn't give me any information on this. We enabled "DEBUG" option in script as well.
    Env:
    Planning 9.3.1
    Solaris
    Thanks

    Hi all,
    We are testing CubeRefresh utility in Planning. When we run that through command line it runs so quick and gives us the message" This job has run successfully".
    How ever we don't see our outline updated with the changes we made in planning.
    Any Idea?
    aslo, Is there any way to track changes during the execution of this command. Logs doesn't give me any information on this. We enabled "DEBUG" option in script as well.
    Env:
    Planning 9.3.1
    Solaris
    Thanks

  • LSMW Fails when run in B/G but works fine in Front end..why?

    Hi All,
    i am trying to run a batch process by LSMW, my files are accurate, no problem with them, everything works fine but it fails when run in BG..works absolutely fine in front end. whats the diff with running in B/G?
    same thing happens when i am trying to execute an RFC thru SAP JCO, it works when debugger is on (i guess switching on debugger is similar to running in B/G) but it doesnt work when debugger is off. but when i execute that RFC directly in se37 from SAP gui it works fine..fails when connected to JCO..
    i am not having this issue with r/3 4.6c or mySAP ECC.6.0  i have this issue only in r/3 4.7.
    has anyone faced the similar situtaion? pls help.
    thanks.
    p.s if this may help. the RFC and LSMW error both are pertaining to change in address of US employees.( infotype 0006)

    Applying  SAP note 928273 Solved this issue.

  • LSMW fails when run in B/G works fine in Frontend..why?

    Hi All,
    i am trying to runa batch process by LSMW, my files are accurate, no problem with them, everything works fine but it fails when run in BG..works absolutely fine in front end. whats the diff with running in B/G?
    same thing happens when i am trying to execute an RFC thru SAP JCO, it works when debugger is on 9i guess switching on debugger is similar to running in B/G) but it doesnt work when debugger is off. but when i execute that RFC directly in se37 from SAP gui it works fine..fails when connected to JCO..
    i am not having this issue with r/3 4.6c or mySAP ECC.6.0  i have this issue only in r/3 4.7.
    has anyone faced the similar situtaion? pls help.
    thanks.
    p.s if this may help. the RFC and LSMW error both are pertaining to change in address of US employees.( infotype 0006)

    for LSMW its the recording of transaction PA40 (employee hire fails when filling  address details) and PA30 (change address) and same is the case with RFC..well its a BAPI_ADDRESSEMPUS_CHANGE. 
    To eloborate more..the error is..Fill in all the mandatory fields.
    which i am very much doing..there are no hidden fields or anything..i have seen the screens etc..I AM filling all mandatory fields. infact i am not leaving anything unfilled., same scrren is going fine when in front end..i am just clicking ok..ok..ok and boom transaction complete..no complaints. but running B/G is killing me.
    i have to run batch for 100,000 employees
    What fails my logic is..its working fine in 4.6c and mySAP ECC.6.0 but not in 4.7
            Hruser
    Message was edited by:
            Hruser

  • LSMW fails when run in B/G but works in Frontend..why?

    Hi All,
    i am trying to runa batch process by LSMW, my files are accurate, no problem with them, everything works fine but it fails when run in BG..works absolutely fine in front end. whats the diff with running in B/G?
    same thing happens when i am trying to execute an RFC thru SAP JCO, it works when debugger is on 9i guess switching on debugger is similar to running in B/G) but it doesnt work when debugger is off. but when i execute that RFC directly in se37 from SAP gui it works fine..fails when connected to JCO..
    i am not having this issue with r/3 4.6c or mySAP ECC.6.0  i have this issue only in r/3 4.7.
    has anyone faced the similar situtaion? pls help.
    thanks.
    p.s if this may help. the RFC and LSMW error both are pertaining to change in address of US employees.( infotype 0006)

    Applying SAP note 928273 Solved this issue.
    thank you.

  • I have a production mobile Flex app that uses RemoteObject calls for all data access, and it's working well, except for a new remote call I just added that only fails when running with a release build.  The same call works fine when running on the device

    I have a production mobile Flex app that uses RemoteObject calls for all data access, and it's working well, except for a new remote call I just added that only fails when running with a release build. The same call works fine when running on the device (iPhone) using debug build. When running with a release build, the result handler is never called (nor is the fault handler called). Viewing the BlazeDS logs in debug mode, the call is received and send back with data. I've narrowed it down to what seems to be a data size issue.
    I have targeted one specific data call that returns in the String value a string length of 44kb, which fails in the release build (result or fault handler never called), but the result handler is called as expected in debug build. When I do not populate the String value (in server side Java code) on the object (just set it empty string), the result handler is then called, and the object is returned (release build).
    The custom object being returned in the call is a very a simple object, with getters/setters for simple types boolean, int, String, and one org.23c.dom.Document type. This same object type is used on other other RemoteObject calls (different data) and works fine (release and debug builds). I originally was returning as a Document, but, just to make sure this wasn't the problem, changed the value to be returned to a String, just to rule out XML/Dom issues in serialization.
    I don't understand 1) why the release build vs. debug build behavior is different for a RemoteObject call, 2) why the calls work in debug build when sending over a somewhat large (but, not unreasonable) amount of data in a String object, but not in release build.
    I have't tried to find out exactly where the failure point in size is, but, not sure that's even relevant, since 44kb isn't an unreasonable size to expect.
    By turning on the Debug mode in BlazeDS, I can see the object and it's attributes being serialized and everything looks good there. The calls are received and processed appropriately in BlazeDS for both debug and release build testing.
    Anyone have an idea on other things to try to debug/resolve this?
    Platform testing is BlazeDS 4, Flashbuilder 4.7, Websphere 8 server, iPhone (iOS 7.1.2). Tried using multiple Flex SDK's 4.12 to the latest 4.13, with no change in behavior.
    Thanks!

    After a week's worth of debugging, I found the issue.
    The Java type returned from the call was defined as ArrayList.  Changing it to List resolved the problem.
    I'm not sure why ArrayList isn't a valid return type, I've been looking at the Adobe docs, and still can't see why this isn't valid.  And, why it works in Debug mode and not in Release build is even stranger.  Maybe someone can shed some light on the logic here to me.

  • 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?

  • 11gR2 RAC install fail when running root.sh script on second node

    I get the errors:
    ORA-15018: diskgroup cannot be created
    ORA-15072: command requires at least 2 regular failure groups, discovered only 0
    ORA-15080: synchronous I/O operation to a disk failed
    [main] [ 2012-04-10 16:44:12.564 EDT ] [UsmcaLogger.logException:175] oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException: ORA-15018: diskgroup cannot be created
    ORA-15072: command requires at least 2 regular failure groups, discovered only 0
    ORA-15080: synchronous I/O operation to a disk failed
    I have tried the fix solutions from metalink note, but did not fix issue
    11GR2 GRID INFRASTRUCTURE INSTALLATION FAILS WHEN RUNNING ROOT.SH ON NODE 2 OF RAC USING ASMLIB [ID 1059847.1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi,
    it looks like, that your "shared device" you are using is not really shared.
    The second node does "create an ASM diskgroup" and create OCR and Voting disks. If this indeed would be a shared device, he should have recognized, that your disk is shared.
    So as a result your VMware configuration must be wrong, and the disk you presented as shared disk is not really shared.
    Which VMWare version did you use? It will not work correctly with the workstation or player edition, since shared disks are only really working with the server version.
    If you indeed using the server, could you paste your vm configurations?
    Furthermore I recommend using Virtual Box. There is a nice how-to:
    http://www.oracle-base.com/articles/11g/OracleDB11gR2RACInstallationOnOEL5UsingVirtualBox.php
    Sebastian

  • UIImpersonator tests work in FlashBuilder, but not when run from Ant

    I'm in the process of converting a Flex 3 project to use FlexUnit4 tests.
    Everything compiles in Flashbuilder 4.5 and runs nicely. I've converted all the tests
    to use flexunit 4, which highlighted a few issues, but nothing too major, and all the
    tests now pass when run in Flashbuilder.
    So... now, I'm trying to convert the CI build to use the 4.5 SDK and flexunit4. So far,
    so good. Everything runs and I get a nicely formatted JUnit report. Unfortunately, though,
    any test that uses the UIImpersonator fails with an async method timeout, suggesting that
    the CreationComplete event hasn't fired.
    Here's a typical example of one of my UI test cases:
              [Test(async, ui)]
              public function testAvailableProductsSetupAdminForSell() : void {
                   var view:OrderBasketView = new OrderBasketView();
                   var user:CfxUser = new CfxUser();
                   user.admin = true;
                   ModelLocator.instance.userDetails = user;
                   view.buyOrSell = OrderType.SELL;
                   helper.createComponentAndAddListener(view, this, availableProductSetupAdminForSellCreationComplete);
              private function availableProductSetupAdminForSellCreationComplete(event:Event, view:OrderBasketView) : void {
                   Assert.assertTrue(view.availableProductTypes.contains(ProductType.PRODUCT_1));
                   Assert.assertTrue(view.availableProductTypes.contains(ProductType.PRODUCT_2));
                   Assert.assertTrue(view.availableProductTypes.contains(ProductType.PRODUCT_3));
    and helper.createComponentAndAddListener looks like this:
            public function createComponentAndAddListener(view:UIComponent, testCase:Object, creationComplete:Function) : void {
                   _view = view;
                   _view.addEventListener(FlexEvent.CREATION_COMPLETE, Async.asyncHandler(testCase, creationComplete, 4000, _view));
                   UIImpersonator.addChild(_view);
    If I use FlexGlobals.topLevelApplication.parent.addChild(_view) in place of UIImpersonator.addChild(_view), all the tests pass.
    I was wondering if it's a function of the fact that my helper class has no metadata that indicates it's a ui test, but that wouldn't explain why it works in FlashBuilder and not when run with ant.
    I also wondered if it was a function of running with headless server set to true, but when I changed it to false the same thing happened.
    My environment is:
    ubuntu 11.04
    ant 1.7.1
    Sun jdk 1.6.0_26
    Flex SDK 4.5.1.21328
    FlexUnit 4.1.0-8-4.1.0.16076
    I'm using the auto-generated TestRunner.mxml
    Any thoughts, anyone? Now that I can get it to work by adding the UI components to the topLevelApplication, at least I can make progress, but I'd like to get to the bottom of the problem, because that shouldn't be necessary.
    Thanks in advance,
    -Chrisl

    Changing to the topLevelApplication did not work. What's funny is that it then failed on a completely unrelated test by hanging and never returning... I'm thinking there must be something else that is going on here, but it's not clear what... :-/ Here is an example of my setup/teardown and a test that work great in the UI but not in CI...
    [Before(async, ui)]
    public function setUp():void
        _fromToList = new FromToList();
        _fromToList.setStyle('skinClass', FromToListSkin);
        Async.proceedOnEvent(this, _fromToList, FlexEvent.CREATION_COMPLETE, 1000);
        FlexGlobals.topLevelApplication.parent.addChild(_fromToList);
        // UIImpersonator.addChild(_fromToList);
    [After(ui)]
    public function tearDown():void
        FlexGlobals.topLevelApplication.parent.removeChild(_fromToList);
        // UIImpersonator.removeChild(_fromToList);
        _fromToList = null;
    [Test(async)]
    public function should_remove_selected_item_in_to_list_to_from_list():void
        _fromToList.fromArrayList = _dpArray;
        _fromToList.toArrayList = _toDpArray;
        var sequence:SequenceRunner = new SequenceRunner(this);
        sequence.addStep(new SequenceSetter(_fromToList.toList, { selectedItem: _toDpArray[1]}));
        sequence.addStep(new SequenceWaiter(_fromToList.toList, FlexEvent.VALUE_COMMIT, 100));
        sequence.addStep(new SequenceCaller(_fromToList, _fromToList.remove));
        sequence.addStep(new SequenceWaiter(_fromToList, FromToListChangeEvent.FROM_TO_LIST_CHANGE_EVENT, 100));
        sequence.addAssertHandler(handleListHasChangedThenRemoveEvent, {});
        sequence.run();
    private function handleListHasChangedThenRemoveEvent(event:FromToListChangeEvent, passThruData:Object):void
        assertThat(_fromToList.toArrayList.length, equalTo(_toDpArray.length - 1));
        assertThat(_fromToList.fromArrayList.length, equalTo(_dpArray.length - _toDpArray.length + 1));
        assertTrue(_fromToList.fromArrayList.contains(_toDpArray[1]));
    So you can see that I'm using Sequences to manage waiting for stuff to get updated in the background, and basically testing when I select an item in a list and act on it that it updates the model like I expect. Again, works GREAT in the UI Runner.
    I'm open to suggestions...

  • IIf I create a partition for Bootcamp that is at least 30 GB in size, is that all the storage I get when running Windows?

    If I create a partition for Bootcamp that is at least 30 GB in size, is that all the storage I get when running Windows?

    There are differences between each Mac and what the original configuration of the Mac is/was. If your Mac originally came with an Optical drive, burning the ISO to a DVD and using it will work. Hardware modifications like Optibay will cause problems. Modifying Bootcamp info.plist will cause problems. Disk Utility partitioning will cause problems. A custom Hybrid MBR will cause problems. External Optical drives are unlikely to work. There is long litany of grief.

  • SQR variable to repoint where sqrw when running through Proces Scheduler

    I recently zipped a PSHOME and unzipped in a new location. When running SQR the path to pssqr.exe is still the old PSHOME path. Does anyone know where this parameter is being picked up?
    SQR Command = d:\pt8.51\bin\sqr\ORA\binw\sqrw paramters

    When running locally this is defined in the configuration manager.
    When running through the process scheduler, this is de fined in the process scheduler configuration.

  • 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

Maybe you are looking for

  • How to add more than one button control on import of skin?

    I am importing a skin from photoshop that I customized and exported.  For my particular project I need more than one button type with different sizes, dimensions, colors, etc.  In example the buttons for the navigation are going to be different than

  • How to get row number of selected entry from OVS search result

    Hi, Anyone having any idea on how to get row number of the  selected entry/ how to differentiate rows in OVS search result in ON_OVS method? Regards, Jatin

  • I want F4Help Functionality by using BAPI(Like EVS Concept)

    Hi Friends, I have one doubt on F4Help Functionality. ABAPer gave one BAPI. that BAPI Having Output Table Structure. My Req. By using that i can display F4Help Functionality in Each and every input filed Attribute. For Example. By using EVS concept w

  • AT100s Wi-Fi freezes few minutes after booting

    The Wi-Fi tick option freezes on "turning off" by its own. Basically its turning off and freezing while Im using the tablet in any way. Also the hardware buttons like volume +&- arent working and the power button wont work unless I force close the ta

  • Remove filename of graphic in PDF

    When hovering the mouse over a graphic in PDF file the file name of the graphic appears - is there a way to remove this filename? Thanks.