UsVARIABLE_NOT_FOUND error while playback the script in Oracle load testing

Hi,
I'm using Oracle® Application Testing Suite Release 12.2.0.1.
I have recorded a simple script doing some login and logout steps.
When i playback the same script. I'm getting the below error.
Summary of the error : Variable "web.jscript.http1018413590734_1170" not found for string: window[@index='0']//frame[@name='{{web.jscript.http1018413590734_1170,rhsContent1}}']
Error Code : VARIABLE_NOT_FOUND
Error Component : Basic
oracle.oats.scripting.modules.basic.api.exceptions.VariableNotFoundException: Variable "web.jscript.http1018413590734_1170" not found for string: window[@index='0']//frame[@name='{{web.jscript.http1018413590734_1170,rhsContent1}}']
     at oracle.oats.scripting.modules.basic.api.exceptions.VariableNotFoundException.createVariableNotFoundInStringException(VariableNotFoundException.java:57)
     at oracle.oats.scripting.modules.basic.api.Transforms.transform(Transforms.java:225)
     at oracle.oats.scripting.modules.basic.api.Transforms.transform(Transforms.java:191)
     at oracle.oats.scripting.modules.basic.api.internal.utilities.TransformsUtil.transform(TransformsUtil.java:30)
     at oracle.oats.scripting.modules.http.api.internal.InternalParamUtil.transform(InternalParamUtil.java:167)
     at oracle.oats.scripting.modules.http.api.internal.AbstractHTTPService.transform(AbstractHTTPService.java:1639)
     at oracle.oats.scripting.modules.http.api.HTTPService.frame(HTTPService.java:2846)
     at script.run(script.java:177)
     at oracle.oats.scripting.modules.basic.api.IteratingVUser.run(IteratingVUser.java:348)
     at oracle.oats.scripting.modules.basic.api.internal.IteratingAgent.run(IteratingAgent.java:779)
     at java.lang.Thread.run(Thread.java:619)
Please help me out in resolving the same.
Regards,
Shashi

Osacar, I recommend that you try to import the application into your workspace on apex.oracle.com and see what happens. Also, refine the problem statement as much as you can, e.g., you get this error importing "the application" or when importing "any" application. How big is the file you're trying to import? Where did it come from? Can you upload images?
Scott

Similar Messages

  • Error while executing the script adgetlnxver.sh

    Error while executing the script adgetlnxver.sh on apps&db tier during upgrade from 11.5.9 to 11.5.10.2
    -bash: [: -lt: unary operator expected
    [aptinst@dba5 TINST_dba5]$ sh adapcctl.sh restart
    adapcctl.sh version 115.55
    /u01/app/tinst/tinstappl/ad/11.5.0/bin/adgetlnxver.sh: line 123: [: -lt: unary operator expected
    Apache Web Server Listener :httpd ( pid 8645 ) is running.
    Restarting the Apache Web Server Dedicated HTTP Listener..
    Apache Web Server Listener (PLSQL) :httpd ( pid 8673 ) is running.
    Restarting the Apache Web Server Dedicated PLSQL Listener..
    adapcctl.sh: exiting with status 0
    In adgetlnxver.sh: line 123 says
    if [ ${setflag}x = "x" -a $os = "RH" ]; then
    redhatver=`grep -oP "Enterprise Linux [a-z A-Z 0-9]* release [0-9]+" /etc/redhat-release | sed 's/Enterprise Linux [a-z A-Z 0-9]* release //g'`
    if [ $redhatver -lt 5 ]; then
    LD_ASSUME_KERNEL="2.4.19"
    export LD_ASSUME_KERNEL
    fi
    fi
    Thanks,
    Vamsi

    Hi Vamsi.
    The exactly erro refers to a problems when you try upgrade from these version to 11.5.10.
    Can you read this note and apply solution? The note refers a patch, but the problem is the same.
    After Patch 4334965, adstrtal.sh & adstpall.sh is failing with errors [ID 360046.1]
    BR Rafael Ceolim

  • Error, while pushing the data from Oracle to MSSQL.

    Hi,
    I am facing the below error, while pushing the data from Oracle to MSSQL.
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Transparent gateway for MSSQL][Microsoft][ODBC SQL Server Driver][SQL Server]Update or insert of view or function 'View_Name' failed because it contains a derived or constant field.[Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared. (SQL State: 00000; SQL Code: 8180)
    Please suggest me, how to overcome from this.
    Thanks.

    [email protected] wrote:
    Hi,
    I am facing the below error, while pushing the data from Oracle to MSSQL.
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Transparent gateway for MSSQL][Microsoft][ODBC SQL Server Driver][SQL Server]Update or insert of view or function 'View_Name' failed because it contains a derived or constant field.[Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared. (SQL State: 00000; SQL Code: 8180)
    Please suggest me, how to overcome from this.
    Thanks.This is an error from SQL Server being passed back to Oracle so you can see the problem.
    What it is saying is that you are trying to insert (or update) data to a database view and that view contains a column that is either a constant (literal) value or is derived (a calculation, formula or string concatenation etc.).
    As such, you can't insert or update data on that column because it has nowhere to go on the database table(s) that underly the view.

  • Error while checking the status of Oracle Cluster ware

    Hi
    I was trying to install the database using dbca after setting up the grid and database software on LINUX x86-64 RHEL 5.7 machine. The database software version is 11.2.0.3. It throwing the error regarding the connectivity of clusterware. So I checked the status of clusterware.
    -bash-3.2$ ./crsctl stat res -t
    CRS-4535: Cannot communicate with Cluster Ready Services
    CRS-4000: Command Status failed, or completed with errors.
    -bash-3.2$
    But when I ran below one:
    -bash-3.2$ ./crsctl stat res -t -init
    NAME TARGET STATE SERVER STATE_DETAILS
    Cluster Resources
    ora.asm
    1 ONLINE ONLINE sfv9699 Started
    ora.cluster_interconnect.haip
    1 ONLINE ONLINE sfv9699
    ora.crf
    1 ONLINE ONLINE sfv9699
    ora.crsd
    1 ONLINE OFFLINE
    ora.cssd
    1 ONLINE ONLINE sfv9699
    ora.cssdmonitor
    1 ONLINE ONLINE sfv9699
    ora.ctssd
    1 ONLINE ONLINE sfv9699 OBSERVER
    ora.diskmon
    1 OFFLINE OFFLINE
    ora.drivers.acfs
    1 ONLINE ONLINE sfv9699
    ora.evmd
    1 ONLINE INTERMEDIATE sfv9699
    ora.gipcd
    1 ONLINE ONLINE sfv9699
    ora.gpnpd
    1 ONLINE ONLINE sfv9699
    ora.mdnsd
    1 ONLINE ONLINE sfv9699
    So i saw that the crsd having some issue. I checked the alert log and crsd log. Below are the output.
    Alert <server_name>.log
    2012-10-20 15:37:51.408
    [ohasd(3694)]CRS-2765:Resource 'ora.crsd' has failed on server 'sfv9699'.
    2012-10-20 15:37:52.968
    [crsd(5188)]CRS-1013:The OCR location in an ASM disk group is inaccessible. Details in /oracle2/app/11.2.0/grid/log/sfv9699/crsd/crsd.log.
    2012-10-20 15:37:52.984
    [crsd(5188)]CRS-0804:Cluster Ready Service aborted due to Oracle Cluster Registry error [PROC-26: Error while accessing the physical storage
    ORA-27140: attach to post/wait facility failed
    ORA-27300: OS system dependent operation:invalid_egid failed with status: 1
    ORA-27301: OS failure message: Operation not permitted
    ORA-27302: failure occurred at: skgpwinit6
    ORA-27303: additional information: startup egid = 1000 (oinstall), current egid = 10002 (dba)
    ]. Details at (:CRSD00111:) in /oracle2/app/11.2.0/grid/log/sfv9699/crsd/crsd.log.
    2012-10-20 15:37:53.471
    [ohasd(3694)]CRS-2765:Resource 'ora.crsd' has failed on server 'sfv9699'.
    2012-10-20 15:37:53.472
    [ohasd(3694)]CRS-2771:Maximum restart attempts reached for resource 'ora.crsd'; will not restart.
    CRSD.log
    2012-10-20 15:37:52.456: [ CRSMAIN][3563381328] Checking the OCR device
    2012-10-20 15:37:52.457: [ CRSMAIN][3563381328] Sync-up with OCR
    2012-10-20 15:37:52.457: [ CRSMAIN][3563381328] Connecting to the CSS Daemon
    2012-10-20 15:37:52.457: [ CRSMAIN][3563381328] Getting local node number
    2012-10-20 15:37:52.459: [ CRSMAIN][3563381328] Initializing OCR
    [   CLWAL][3563381328]clsw_Initialize: OLR initlevel [70000]
    2012-10-20 15:37:52.897: [  OCRASM][3563381328]proprasmo: Error in open/create file in dg [DATA]
    [  OCRASM][3563381328]SLOS : SLOS: cat=7, opn=kgfoAl06, dep=27140, loc=kgfokge
    2012-10-20 15:37:52.898: [  OCRASM][3563381328]ASM Error Stack : ORA-27140: attach to post/wait facility failed
    ORA-27300: OS system dependent operation:invalid_egid failed with status: 1
    ORA-27301: OS failure message: Operation not permitted
    ORA-27302: failure occurred at: skgpwinit6
    ORA-27303: additional information: startup egid = 1000 (oinstall), current egid = 10002 (dba)
    2012-10-20 15:37:52.967: [  OCRASM][3563381328]proprasmo: kgfoCheckMount returned [7]
    2012-10-20 15:37:52.967: [  OCRASM][3563381328]proprasmo: The ASM instance is down
    2012-10-20 15:37:52.968: [  OCRRAW][3563381328]proprioo: Failed to open [+DATA]. Returned proprasmo() with [26]. Marking location as UNAVAILABLE.
    2012-10-20 15:37:52.968: [  OCRRAW][3563381328]proprioo: No OCR/OLR devices are usable
    2012-10-20 15:37:52.968: [  OCRASM][3563381328]proprasmcl: asmhandle is NULL
    2012-10-20 15:37:52.969: [    GIPC][3563381328] gipcCheckInitialization: possible incompatible non-threaded init from [prom.c : 690], original from [clsss.c : 5326]
    2012-10-20 15:37:52.975: [ default][3563381328]clsvactversion:4: Retrieving Active Version from local storage.
    2012-10-20 15:37:52.978: [ CSSCLNT][3563381328]clssgsgrppubdata: group (ocr_SFV9699-cluster) not found
    2012-10-20 15:37:52.978: [  OCRRAW][3563381328]proprio_repairconf: Failed to retrieve the group public data. CSS ret code [20]
    2012-10-20 15:37:52.981: [  OCRRAW][3563381328]proprioo: Failed to auto repair the OCR configuration.
    2012-10-20 15:37:52.981: [  OCRRAW][3563381328]proprinit: Could not open raw device
    2012-10-20 15:37:52.981: [  OCRASM][3563381328]proprasmcl: asmhandle is NULL
    2012-10-20 15:37:52.983: [  OCRAPI][3563381328]a_init:16!: Backend init unsuccessful : [26]
    2012-10-20 15:37:52.984: [  CRSOCR][3563381328] OCR context init failure. Error: PROC-26: Error while accessing the physical storage
    ORA-27140: attach to post/wait facility failed
    ORA-27300: OS system dependent operation:invalid_egid failed with status: 1
    ORA-27301: OS failure message: Operation not permitted
    ORA-27302: failure occurred at: skgpwinit6
    ORA-27303: additional information: startup egid = 1000 (oinstall), current egid = 10002 (dba)
    2012-10-20 15:37:52.984: [ CRSMAIN][3563381328] Created alert : (:CRSD00111:) : Could not init OCR, error: PROC-26: Error while accessing the physical storage
    ORA-27140: attach to post/wait facility failed
    ORA-27300: OS system dependent operation:invalid_egid failed with status: 1
    ORA-27301: OS failure message: Operation not permitted
    ORA-27302: failure occurred at: skgpwinit6
    ORA-27303: additional information: startup egid = 1000 (oinstall), current egid = 10002 (dba)
    2012-10-20 15:37:52.984: [    CRSD][3563381328][PANIC] CRSD exiting: Could not init OCR, code: 26
    2012-10-20 15:37:52.984: [    CRSD][3563381328] Done.
    =======================
    I see in the above log that saying ASM instance is down and failed to open +DATA .
    But the asm instance up and running
    SQL> select instance_name,status from v$instance;
    INSTANCE_NAME STATUS
    +ASM1            STARTED
    And we havent created any disk named DATA before the installation. We have created only below two disks
    SQL> select name,header_status from v$asm_disk;
    NAME HEADER_STATUS
    ASM_DATA MEMBER
    FLASH_RECOVERY MEMBER
    But I am seeing a diskgroup in the v$asm_diskgroup which we havent created.
    SQL> select name,state from v$asm_diskgroup;
    NAME STATE
    DATA MOUNTED
    Ya this is a second time installtion. In the first installtion we created the asmdisk as DATA. But later everything (RAW device ) was formatted and this new disks has been created and installtion again started
    [root@SFV9699 bin]# oracleasm listdisks
    ASM_DATA
    FLASH_RECOVERY
    Seems like its trying to read the old disk DATA.
    we have done asmscanning too with oracleasm scan disks. but no use.
    Where I can remove the old entry of DATA disk.
    It would be a great if a quick response get.
    Thanks
    SHIYAS M

    The permission looks fine. If it was permission issue then y it is trying to read the DATA disk which I havent created this time at all ( But created in the first installation).
    2012-10-20 15:37:52.459: [ CRSMAIN][3563381328] Initializing OCR
    [ CLWAL][3563381328]clsw_Initialize: OLR initlevel [70000]
    2012-10-20 15:37:52.897: [ OCRASM][3563381328]proprasmo: *Error in open/create file in dg [DATA]*[ OCRASM][3563381328]SLOS : SLOS: cat=7, opn=kgfoAl06, dep=27140, loc=kgfokge
    2012-10-20 15:37:52.898: [ OCRASM][3563381328]ASM Error Stack : ORA-27140: attach to post/wait facility failed
    ORA-27300: OS system dependent operation:invalid_egid failed with status: 1
    ORA-27301: OS failure message: Operation not permitted
    ORA-27302: failure occurred at: skgpwinit6
    ORA-27303: additional information: startup egid = 1000 (oinstall), current egid = 10002 (dba)
    2012-10-20 15:37:52.967: [ OCRASM][3563381328]proprasmo: kgfoCheckMount returned [7]
    2012-10-20 15:37:52.967: [ OCRASM][3563381328]proprasmo: The ASM instance is down
    2012-10-20 15:37:52.968: [ OCRRAW][3563381328]proprioo: *Failed to open [+DATA].* Returned proprasmo() with [26]. Marking location as UNAVAILABLE.
    2012-10-20 15:37:52.968: [ OCRRAW][3563381328]proprioo: No OCR/OLR devices are usable
    2012-10-20 15:37:52.968: [ OCRASM][3563381328]proprasmcl: asmhandle is NULL
    The only disks created are
    [root@SFV9699 dev]# oracleasm listdisks
    ASM_DATA
    FLASH_RECOVERY
    And these disks are showing part of that group also.. Not quite sure how this happened..
    what abt dropping this group.. will anything work.

  • Error while resubmit the transaction in Oracle 10g B2B

    Hi All,
    I am facing the below error while resubmitting the transactions
    bash-3.00$ java oracle.tip.adapter.b2b.data.ReSubmit
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/tip/adapter/b2b/data/ReSubmit
    bash-3.00$
    Regards
    sekhar

    Hi Sekhar,
    Make sure that you are setting the environment first by running Midtier_Home\ip\install\setenv.bat OR Midtier_Home\ip\install\setenv.sh (according to your OS). Run the resubmit command after executing this setenv file.
    Regards,
    Anuj

  • Errors while running load test scripts in Oracle Load Test

    I am a QA Analyst and this is my first time using the Oracle Load Test application. Acutally this is the first time I have done anything related to load test scripts. The Oracle Load Test version I am using is 9.10.0219. When I run some of the scripts with a user ramp up of 1 user per step, the load tests complete successfully. When I begin to adjust the number of VUs per step to 2 or more, I begin to get some of the following errors. By the looks of these errors can you provide any feedback as to whether these are issues with OLT or with the application I am running the load test against? Any help would be greatly appreciated.
    Thanks
    John
    - ThinBrowserException occurred. HTTP response code: 500 Internal Server Error
    - VariableNotFoundException occurred. Variable "web.jscript.httplbosinl1cccsmo_2468" not found for string: http://lbosinl1.ccc.smo.com:9595/Tmo/H5/portal/lipo_portal/{{web.jscript.httplbosinl1cccsmo_2468,Scenario}}
    - VariableNotFoundException occurred. Variable "web.jscript.httplbosinl1cccsmo_5617" not found for string:
    {{web.jscript.httplbosinl1cccsmo_1984,Suif_Context_Period_Date}}=
    {{web.jscript.httplbosinl1cccsmo_5617,12/05/2010}}

    Hi,
    It looks like an application issue since you are getting a HTTP 500. The other errors relate to the fact that ti can't resolve some dynamic values in needs to extract from the resonse content since the pages are different (probably due the 500 error).
    Regards,
    Jamie

  • MDS-00521 - error while reading the document  in Oracle ADF at Runtime

    Hi All,
    we are using Jdeveloper Version : Oracle JDeveloper 11g 11.1.1.5.0
    we are getting below error message while opening the page at run time.
    MDS-00521 : error while reading the document app1/screen1.jsff from metadata repository.
    MDS-00569 : unable to read document app1/screen1.jsff from file "D:Oracle/Middleware11115_1/user_projects/domains/j2eeprd1/servers/app1j2eeprd1/.....
    WEB-INF/Lib/ADFViewControllerapp1.jar!/app1/screen1.jsff
    Note : we disable 1) Enable User Customizations and 2) Enable seeded customization in Project properties -> ADF View
    can you please help us to resolve this issue.!
    Thanks,

    This seems issue with MDS schema. You can try two things:
    - Restart everything again (database and admin server as well)
    - If above doesn't solve you problem. then there must problem while creating schema using RCU. Run RCU utility again, drop and recreate schema and reconfigure OIM.
    This is what I suspect. Other experts can jump in with better solution.
    regards,
    GP

  • Initializing error while invoking the SQLPULS in Oracle 11G.

    Hello All,
    I installed Oracle 11G freshly and now I am geting following errors while invoking the sqlplus from the client side.
    C:\Documents and Settings\Administrator.SC14FT1>sqlplus
    Error 57 initializing SQL*Plus
    Error loading message shared library
    Any idea ?
    Thanks
    With Regards
    Hemant Joshi.

    Hello,
    I am getting the same error even after setting the oracle_home.
    C:\Documents and Settings\Administrator.SC14FT1>set ORACLE_HOME=D:\Oracle\Ora11g
    C:\Documents and Settings\Administrator.SC14FT1>echo %ORACLE_HOME%
    D:\Oracle\Ora11g
    C:\Documents and Settings\Administrator.SC14FT1>sqlplus
    Error 57 initializing SQL*Plus
    Error loading message shared library
    Thanks
    With Regards
    Hemant Joshi

  • Error While Running the report in oracle apps

    Hi All,
    I got an error while running the report.The error is
    "FDPSTP failed due to ORA-06510: PL/SQL: unhandled user-defined exception".
    Please anyone give ur idea to resolve this issue as it is urgent.
    Thnaks
    Surya

    Hi;
    I got an error while running the report.The error is
    "FDPSTP failed due to ORA-06510: PL/SQL: unhandled user-defined exception".
    Please anyone give ur idea to resolve this issue as it is urgent.What is EBS version? You get this error on which steps or report? If you make search at metalik as FDPSTP failed due to ORA-06510: PL/SQL: there are 35 similar docs avaliable
    Regard
    Helios

  • Error while importing the database of Oracle 10.2g to MaxDB - DB Migration

    Hi,
    We are testing the data migration from Oracle 10.2g to MaxDB 7.6. First i have exported the oracle database without any errors. But while importing to MaxDB i am getting error as below,
    tail -f ImportMonitor.console.log
    java.class.version = 49.0
    java.home = /opt/java1.5/jre
    java.ext.dirs = /opt/java1.5/jre/lib/ext
    java.class.path = migmon.jar
    java.library.path = /opt/java1.5/jre/lib/PA_RISC2.0W:/opt/java1.5/jre/lib/PA_RISC2.0W/server:/opt/java1.5/jre/../lib/PA_RISC2.0W:/tmp/sapinst_exe.18812.1291025270:/usr/sap/BE1/SYS/exe/run:/sapdb/programs/lib/lib64:/usr/lib
    java.io.tmpdir = /var/tmp/
    Import Monitor jobs: running 1, waiting 1, completed 72, failed 0, total 74.
    Loading of 'SAPAPPL1_11' import package: ERROR
    Import Monitor jobs: running 0, waiting 1, completed 72, failed 1, total 74.
    And tail -f SAPAPPL1_11.log
    (IMP) ERROR: DbSlExeModify/DbSlLobPutPiece failed
      rc = 26, table "VBRK"
    ERROR : Prepare/modify for GetPages failed(dbrc=26).
      (SQL error 0)
      error message returned by DbSl:
    (DB) ERROR: DDL statement failed
    (CREATE TABLE "VBRL" ( "MANDT" VARCHAR2(3) UNICODE DEFAULT '000' NOT NULL , "VBELN" VARCHAR2(10) UNICODE DEFAULT ' ' NOT NULL , "POSNR" VARCHAR2(6) UNICODE DEFAULT '000000' NOT NULL , "VBELN_VF" VARCHAR2(10) UNICODE DEFAULT ' ' NOT NULL , "NETWR" NUMBER(15,2) DEFAULT 0 NOT NULL , "MWSBP" NUMBER(13,2) DEFAULT 0 NOT NULL , "KWERT_RL" NUMBER(13,2) DEFAULT 0 NOT NULL , "MWSBP_RL" NUMBER(13,2) DEFAULT 0 NOT NULL , "KUNAG" VARCHAR2(10) UNICODE DEFAULT ' ' NOT NULL , "UVPRS" VARCHAR2(1) UNICODE DEFAULT ' ' NOT NULL , "LOGSYS" VARCHAR2(10) UNICODE DEFAULT ' ' NOT NULL  ) NO FIXED LENGTH COLUMN )
    DbSlExecute: rc = 102
      (SQL error -955)
      error message returned by DbSl:
    I tried multiple time by modifying the loadArgs=-nolog -c 10000 -merge_bck . But still same error "(SQL error -955)"
    Thanks,
    Narendra

    Hi,
    it is not astonishing that the error occurs every time you try this create table statement.
    A table with this name already exists. And error -955 tells us exactly this.
    What to do?
    As I do not know if there is data in this table and/or if there are views / other database objects
    using this table, I cannot decide, if dropping this table would be a good idea.
    But what I do not understand is, why during one (?) loading in a clean (?) database this
    table is tried to create more than once. Or was the database you are loading into not clean,
    fresh and empty? Then it will happen that not only this table, but some others will result in an error
    because they exist already.
    Elke

  • Data access error while running  the script in fdm workbench script editor

    Hello Experts,
    I have been getting the error when i run the script in script editor of fdqm workbench client.this is the error
                              -2147467259 Data access error and it is navigating the error at line 30 about this script "Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)"
    Please revert me asap where i should load the data from peoplesoft to one of my planning database through fdm.
    Thanks in advance...

    Hi,
    Thanks for your suggestion's here i am going to run the datapump script so while i am running in workbench it is throwing data access error.So as you guy's suggested i created one import format and added this script to that import format which is added to one of my location even it is throwing the same error.I am getting the error at this sentence   "strWorkTableName" I want to know what is this where it reflect's?So my question is Is there any difference while running data pump or integration script.Please let me know a detailed navigation steps to run this script's with out data access error to run these kind of scripts.
    Note:Again my target is to load the data to planning database through fdqm which i am doing through sql statement's.
    Suggest your valuable suggestion's
    Thanks in advance...
    I am getting the error at this sentence   "strWorkTableName" I want to know what is this where it reflect's?

  • Error while running the script

    Hi all,
    when i try to run a script in oracle it is failing throwing the error
    'ORA-00913: too many values
    ORA-06512: at "scema_name.procedure_name", line 229
    ORA-06512: at line 1"
    please help me out....
    Thanks in advance
    Ismail

    I think the procedure can accept only one value & u r trying to fetch more than 1 value , that's y problem occur . u've to use
    1)cursor for resolving this problem
    or
    2)write an exception
    exception
    When TOO_MANY_ROWS Then
    --Code                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Attempted to divide by zero. Error while executing the script

    Hi All,
    I using a script I found long back and I'm trying to use to get disk space info from different servers with separate credentials.
    I'm getting the below error and it has eaten my head but I'm not able to figure out where the problem lies in the code.
    Attempted to divide by zero.
    At D:\psscripts\ww.ps1:92 char:26
    + $freePercent = ($frspace/ <<<< $totSpace)*100
    + CategoryInfo : NotSpecified: (:) [], RuntimeException
    + FullyQualifiedErrorId : RuntimeException
    I'm open to use any other way to find me Disk Space with different credentials..here security isn't a question.
    This script uses computers.csv to reference the computer name and the referenced credentials in the script.
    Thanks in advance
    $freeSpaceFileName = "c:\script\FreeSpace.htm"
    $warning = 50
    $critical = 30
    New-Item -ItemType file $freeSpaceFileName -Force
    $ComputerList = Import-Csv -Path d:\Computers.csv;
    $CredentialList = @{
    Cred1 = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList 'laptop-pc\administrator', (ConvertTo-SecureString -String 'tamboli' -AsPlainText -Force);
    Cred2 = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList 'contoso\administrator', (ConvertTo-SecureString -String 'Atlantic12' -AsPlainText -Force);
    Function writeHtmlHeader
    param($fileName)
    $date = ( get-date ).ToString('dd/MM/yyyy HH:mm:ss')
    Add-Content $fileName "<html>"
    Add-Content $fileName "<head>"
    Add-Content $fileName "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>"
    Add-Content $fileName '<meta http-equiv="refresh" CONTENT="5">'
    Add-Content $fileName '<title>All Servers DiskSpace Report&copy;</title>'
    add-content $fileName '<STYLE TYPE="text/css">'
    add-content $fileName "<!--"
    add-content $fileName "td {"
    add-content $fileName "font-family: Tahoma;"
    add-content $fileName "font-size: 20px;"
    add-content $fileName "border-top: 1px solid #999999;"
    add-content $fileName "border-right: 1px solid #999999;"
    add-content $fileName "border-bottom: 1px solid #999999;"
    add-content $fileName "border-left: 1px solid #999999;"
    add-content $fileName "padding-top: 0px;"
    add-content $fileName "padding-right: 0px;"
    add-content $fileName "padding-bottom: 0px;"
    add-content $fileName "padding-left: 0px;"
    add-content $fileName "}"
    add-content $fileName "body {"
    add-content $fileName "margin-left: 5px;"
    add-content $fileName "margin-top: 5px;"
    add-content $fileName "margin-right: 0px;"
    add-content $fileName "margin-bottom: 10px;"
    add-content $fileName ""
    add-content $fileName "table {"
    add-content $fileName "border: thin solid #000000;"
    add-content $fileName "}"
    add-content $fileName "-->"
    add-content $fileName "</style>"
    Add-Content $fileName "</head>"
    Add-Content $fileName "<body>"
    add-content $fileName "<br></br>"
    add-content $fileName "<table width='100%' align=center>"
    add-content $fileName "<tr bgcolor='#CCCCCC'>"
    add-content $fileName "<td colspan='7' height='25' align='center'>"
    add-content $fileName "<font face='tahoma' color='#003399' size='5'><strong>All Servers DiskSpace Report &copy; - $date</strong></font>"
    add-content $fileName "</td>"
    add-content $fileName "</tr>"
    add-content $fileName "</table>"
    add-content $fileName "<br></br>"
    # Function to write the HTML Header to the file
    Function writeTableHeader
    param($fileName)
    Add-Content $fileName "<tr bgcolor=#CCCCCC>"
    Add-Content $fileName "<td width='10%' align='center'>Drive</td>"
    Add-Content $fileName "<td width='50%' align='center'>Drive Label</td>"
    Add-Content $fileName "<td width='10%' align='center'>Total Capacity(GB)</td>"
    Add-Content $fileName "<td width='10%' align='center'>Used Capacity(GB)</td>"
    Add-Content $fileName "<td width='10%' align='center'>Free Space(GB)</td>"
    Add-Content $fileName "<td width='10%' align='center'>Freespace %</td>"
    Add-Content $fileName "</tr>"
    Function writeHtmlFooter
    param($fileName)
    Add-Content $fileName "</body>"
    Add-Content $fileName "</html>"
    Function writeDiskInfo
    param($fileName,$devId,$volName,$frSpace,$totSpace)
    $totSpace=[math]::Round(($totSpace/1073741824),2)
    $frSpace=[Math]::Round(($frSpace/1073741824),2)
    $usedSpace = $totSpace - $frspace
    $usedSpace=[Math]::Round($usedSpace,2)
    $freePercent = ($frspace/$totSpace)*100
    $freePercent = [Math]::Round($freePercent,0)
    if ($freePercent -gt $warning)
    Add-Content $fileName "<tr>"
    Add-Content $fileName "<td>$devid</td>"
    Add-Content $fileName "<td>$volName</td>"
    Add-Content $fileName "<td>$totSpace</td>"
    Add-Content $fileName "<td>$usedSpace</td>"
    Add-Content $fileName "<td>$frSpace</td>"
    Add-Content $fileName "<td>$freePercent</td>"
    Add-Content $fileName "</tr>"
    elseif ($freePercent -le $critical)
    Add-Content $fileName "<tr>"
    Add-Content $fileName "<td>$devid</td>"
    Add-Content $fileName "<td>$volName</td>"
    Add-Content $fileName "<td>$totSpace</td>"
    Add-Content $fileName "<td>$usedSpace</td>"
    Add-Content $fileName "<td>$frSpace</td>"
    Add-Content $fileName "<td bgcolor='#FF0000' align=center>$freePercent</td>"
    #<td bgcolor='#FF0000' align=center>
    Add-Content $fileName "</tr>"
    else
    Add-Content $fileName "<tr>"
    Add-Content $fileName "<td>$devid</td>"
    Add-Content $fileName "<td>$volName</td>"
    Add-Content $fileName "<td>$totSpace</td>"
    Add-Content $fileName "<td>$usedSpace</td>"
    Add-Content $fileName "<td>$frSpace</td>"
    Add-Content $fileName "<td bgcolor='#FBB917' align=center>$freePercent</td>"
    # #FBB917
    Add-Content $fileName "</tr>"
    foreach ($computer in $ComputerList)
    Get-WmiObject -ComputerName $Computer.Name -Class Win32_LogicalDisk -Credential $CredentialList[$Computer.Credential] | Where-Object {$_.drivetype -eq 3}
    Write-Host $item.DeviceID $item.VolumeName $item.FreeSpace $item.Size
    writeDiskInfo $freeSpaceFileName $item.DeviceID $item.VolumeName $item.FreeSpace $item.Size
    writeHtmlHeader $freeSpaceFileName
    foreach($computer.Name in Get-Content Computers.csv)
    Add-Content $freeSpaceFileName "<table width='100%'><tbody>"
    Add-Content $freeSpaceFileName "<tr bgcolor='#CCCCCC'>"
    Add-Content $freeSpaceFileName "<td width='100%' align='center' colSpan=6><font face='tahoma' color='#003399' size='2'><strong> $server</strong></font></td>"
    Add-Content $freeSpaceFileName "</tr>"
    Add-Content $freeSpaceFileName "<br>"
    writeTableHeader $freeSpaceFileName
    Thanks,

    Hi Taher,
    You got the error "Attempted to divide by zero.", because the input variable $totSpace is null, please note the variable $item when you invoked the function writeDiskInfo:
    >>Get-WmiObject -ComputerName $Computer.Name -Class Win32_LogicalDisk -Credential $CredentialList[$Computer.Credential] |  Where-Object {$_.drivetype -eq 3}
    >>Write-Host  $item.DeviceID  $item.VolumeName $item.FreeSpace $item.Size
    >>writeDiskInfo $freeSpaceFileName $item.DeviceID $item.VolumeName $item.FreeSpace $item.Size
    And you haven't defined the variable $item before you used it, so please refer to the script below:
    foreach ($computer in $ComputerList)
    $items = Get-WmiObject -ComputerName $Computer.Name -Class Win32_LogicalDisk -Credential $CredentialList[$Computer.Credential] | Where-Object {$_.drivetype -eq 3}
    foreach($item in $items){
    Write-Host $item.DeviceID $item.VolumeName $item.FreeSpace $item.Size
    writeDiskInfo $freeSpaceFileName $item.DeviceID $item.VolumeName $item.FreeSpace $item.Size}
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Error while creating the rollback segment (Oracle 8i & OS Win NT)

    hi
    I am using Oracle 8i and when i am creating the new rollback segment for my database i have got following error message
    ORA-01593 Rollback segment optimal size (30 blks) is smaller than the computed initial size (2560 blks)
    CREATE ROLLBACK SEGMENT "RBS11" TABLESPACE "RBS1"
    STORAGE ( INITIAL 120K NEXT
    120K OPTIMAL
    240K MINEXTENTS 2
    MAXEXTENTS 100)
    Note:- db_block size is 8k
    Tablespace RBS1 is the Locally managed Tablespace having datafile of 50m and uniform size of 10m
    But Given statement processed while i am using Tablespace RBS (winch is data dictionary managed)
    Plz, suggest me to cause of that error and solution

    You said 120K optimal and initial is 120K with minextents of 2. The optimal size then will be smaller than the initial allocation for the rbs.
    ORA-01593: rollback segment optimal size (string blks) is smaller than the computed initial size (string blks)
    Cause: Specified OPTIMAL size is smaller than the cumulative size of the initial extents during create rollback segment.
    Action: Specify a larger OPTIMAL size.

  • Getting error while importing the application in Oracle Apex

    Hi,
    I am facing an issue while importing an application into my new Oracle Apex installation. Installation was successful with out any issue. I exported an application from my old Apex (version 3.0.0.00.20) and importing the same into new apex (version 3.0.1.00.08). I am getting the following error.
    ============================================================
    The requested URL /pls/apex/wwv_flow.accept was not found on this server.
    ============================================================
    When I click on import in Application Builder page and then browse the required file it gives the progress saying "Importing File" and after some time it displays the above error.
    I tried bouncing the application also and there is not error in alert log.
    Could any one please suggest, if there is some problem here. Or my approach is not correct.
    Thanks in advance.
    Regards,
    Advait Deo

    Osacar, I recommend that you try to import the application into your workspace on apex.oracle.com and see what happens. Also, refine the problem statement as much as you can, e.g., you get this error importing "the application" or when importing "any" application. How big is the file you're trying to import? Where did it come from? Can you upload images?
    Scott

Maybe you are looking for

  • Dll issues after deploying application Equitrac Express Client 4.2.1

    We have deployed .msi application using command following cmd /c xcopy "Equitrac Express Client.msi" "c:\" /E /C /R /H /K /Y&msiexec.exe /i "c:\Equitrac Express Client.msi" EQCASNAME="EQUITRAC-CAS" EQLANGUAGE="en" ADDLOCAL="Common,DRC,DesktopPrinting

  • Cannot find embedded third-party .class in my own signed .cab

    Hello, This is complicated. I'm building an applet that operates a piece of hardware on a PC (think Win32-only.) A third-party provider (henceforth referred to as TPP) provides software drivers that will be installed on client machines. ORIGINALLY th

  • HT1551 sound and picture do not match

    Certain movies on Netflix, when played, the sound and picture do not match.  It looks like a voice over.  You see lips move to the wrong voice. 

  • Gmail - receiving sent posts

    Has anyone experience with GMAIL, emails that is sent out from the iPhone goes to the receiver and also will post the same email back into the Gmail Inbox? Yahoo email does not have this issue.

  • Plotting F32 file in Labview

    Hello, I'm having issues reading and plotting my F32 file in Labview. I followed the example labview offers, and followed the method of another forum post, but both ways give me nonsense answers. Can someone help me? Thanks in advance!