Oracle + Unix question , Error validation for SQL statements in co process

Hi,
If I use co process in a shell script , what is the best way to do the error validation of the execution of any sql statements . I was trying to change the following code to make use of co process concept. When I tried echo $? after the execution of a "wrong statements"
it is still giving Zero output ( meaning success)
<<<<<<<<<<<<<<<<<<<<<<<<<<<
cat ${CFG_DIR}/srs_indx.lst | egrep -v '^#' | egrep -v '^[    ]*$' | while read x
do
echo " Processing values :: pre $pre tbl $tbl indx $indx tblspc $tblspc cols $cols param $param" >> ${LOGS_DIR}/srs_indx.log
sqlplus ${BIZSTG} << EOT >> ${LOGS_DIR}/srs_indx.log
set verify on timing on term on echo on feedback on serveroutput on
WHENEVER SQLERROR CONTINUE
drop index $indx;
WHENEVER SQLERROR EXIT FAILURE
alter session set query_rewrite_enabled = true;
create $pre index $indx on $tbl ($cols)
tablespace $tblspc
$param;
exit
EOT
RC=$?
if ( test $RC -ne 0 )
then
     ERR_MSG="ERROR in creating index $indx for table $tbl from srs_indx.ksh of $ENVIR : $APP by `whoami`@`hostname` on `date` "
     echo $ERR_MSG >> ${LOGS_DIR}/srs_indx.log
     process_warning ${LOGS_DIR}/srs_indx.log
     exitstat=1
else
     echo "$indx created at `date`" >> ${LOGS_DIR}/srs_indx.log
fi
done
>>>>>>>>>>>>>>>>>>>>
Any help will be appreciated .
with thanks and regards
Ranjeesh K R

Hi,
Thanks for the response, I guess people misunderstood my question .
My question was about "error handling in case of CO PROCESS". For those who don't know about this, in case CO PROCESS you just need to login once to Oracle. In my above code It is logging in & out for each entry in the list. CO process statements may look Similar to SQL statements in pro*C. In PRO*C we use EXEC, but here print -p statements..
a sample is given for those who are new to co process.
sqlplus -s /nolog |& # Open a pipe to SQL*Plus
print -p -- 'connect user/password@instance'
print -p -- 'set feed off pause off pages 0 head off veri off line 500'
print -p -- 'set term off time off'
print -p -- "set sqlprompt ''"
print -p -- "select sysdate from dual;"
read -p SYSDATE
print -p -- "select user from dual;"
read -p USER
print -p -- "select global_name from global_name;"
read -p GLOBAL_NAME
print -p -- exit
echo SYSDATE: $SYSDATE
echo USER: $USER
echo GLOBAL_NAME: $GLOBAL_NAME
But I got stuck during error handling of these SQL statements, especially the $? / $* returns 0 even after an erroneus execution.
Regards

Similar Messages

  • Buffer size for SQL statement using JDBC calls

    I need to find out the buffer size for SQL statements in jave/JDBC because I need to insert or update a field that could be up to 4KB in size.

    I'm not sure that I follow the question; I'm not sure which buffer size you're referring to.
    If you have a field that can store up to 4k worth of data, you would create a VARCHAR2(4000) column in the Oracle database (assuming it is character data) or a BLOB column (if the data is binary). Either of those two fields can be populated from JDBC.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • MDM Database command execution error. A SQL statement failed to execute

    Hi,
    When we tried to execute an MDM Java query modify/create, we get the following dump.
    Is this anything to do with the parameters that we pass or is it something to do with the database ?
    We have checked the code and we do not find anything wrong with the code at all.
    We are using Java API 5.5.63.73 and calling MDM API's using WebDynpro for Java.
    I have noticed this issue has been raised here as well :
    Database command execution error. (While mounting a repository)
    com.sap.mdm.commands.CommandException:
    com.sap.mdm.internal.protocol.manual.ServerException: Database command execution error. A SQL
    statement failed to execute. The actual error may have been written to a log file. at
    com.sap.mdm.data.commands.ModifyRecordCommand.execute(ModifyRecordCommand.java:163) at
    Regards,
    Subramanian V.
    Edited by: Subramanian Venkateswaran on Dec 10, 2008 8:11 PM

    Hi Subramanian  ,
    The error looks more like a problem with the data base or MDM system rather than the java code.
    Which is the underlying database you are using with MDM? As some users have faced some difficulties when working with the DB2 Data base,If this is the data base you too are working upon then may be the issue could be similar,if possible try using the Oracle or SQL data base as these databse show more compatibility than a DB2 when working with MDM .
    Also check the MDM users autorization and authentication to modifyor create recordrs in MDM.try given the user the ADMIN rights,and tehn try and see if teh user is able to modify/Create the mdm records.
    Lastly you can check the database instance and listener configuration correctly.try restarting the Database service form the system if possible.
    Hope It Helped
    Thanks & Regards
    Simona Pinto

  • Date formats for SQL statements used by recordset object

    Hi,
    Date formatting appears to be quite problematic for Business One.  I did a forum search for date issues and I don't think I saw any of them with an "answered" status.  I have an issue with formatting a date for the creation of an SQL statement that the DI sends to SQL Server 2005.  I need to format a date so that the localization parameters don't matter for either the client machine or SQL Server's machine.  We don't have a problem as long as our machines are localized as USA.
    I have PL 22 and I have a form - ours - where I use the Today() function to fill a date field.  So this is a date that is not entered by the user.  The result of this function is consistent with the localization parameters on my machine.  We have two other date fields on the form where the user must type in the date. 
    As a test, I changed my machine to the UK parameters.  I then set up the language parameters of Business One for English(United Kingdom).  I changed the date format specifications in Business One so that its format is dd/mm/yy.  I then brought up the form and the field that is formatted by the above function arrived in the form's field as dd/mm/yy.  I then typed in the two other dates in the same format and added the record to the database.  The form's table is user-defined. 
    I dismissed the form then brought it back up loaded with the new record.  The date that was entered by the function appeared in USA format (mm/dd/yy).  The dates that were typed in appeared in the Business One format (dd/mm/yy).  This of course is not consistent.
    When I looked at what got into the database, the formats were the opposite.  Weird!  To make matters really confusing, I run an SQL statement within SQL Server Mgt Studio, and use the WHERE clause to filter on the date that was based on the function.  It didn’t matter what format I used for the WHERE clause, the record came up.  Does anyone have any idea about how I can ensure that I always use the correct date format for SQL statements passed by Business One to SQL Server regardless of where in the world the application is being run?
    Thanks,
    Mike

    Ian,
    Here's what I'm concerned about:  I’m using the date in a “WHERE” clause.
    Assume the date is Aug 3, 2007.
    "SELECT * FROM Table WHERE StartDate > ‘8/3/2007’"
    OR
    "SELECT * FROM Table WHERE StartDate > ‘3/8/2007’"
    If the client machine is set up as USA, the today function will provide the date as formatted in the first query.  If the database server is setup as let’s say the UK, I believe that SQL Server query parser will interpret the date as Mar 8, 2007.
    If the client machine is set up as UK, the today function will provide the date as formatted in the second query.  If the database server is setup as let’s say USA, I believe that SQL Server query parser will also interpret the date as Mar 8, 2007.
    In both cases it would be wrong.
    I know I could use the DATEPART function to get the three parts and this will make the code indifferent to the localization specs of the client machine.  I need to then be able to concatenate those date parts for the “WHERE” clause so that the localization specifications of the database server don’t matter.
    Thanks,
    Mike

  • What can be the cause of Web ADI error : Cannot execute SQL statement?

    I created a custom integrator in r12.2.3 and while loading I encountered an error, Cannot execute SQL statement.
    I checked my setup in Interface attribute , the RUN_ID column has a default type SQL QUERY with a default value SELECT  XXCONV_EAM_ASSET_NUM_S.NEXTVAL FROM DUAL.
    If I have a right setup here, what can be the cause of this error?

    Hi,
    The possibilities can be of various reasons, with the sql statements,
    xml descriptors, data sources, improper drivers anything. To crack down
    the solution, kindly let me know the error messages and what exactly are
    you trying to accomplish.
    Thanks & Regards
    Raj
    manimaran t wrote:
    what may be the cause of this error java.sql.SQLException: invalid sql
    type passed to callable statement in iplanet ussing JNDI
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Subsequent SQL statements cannot be processed. SQLSTATE=58005 row=1

    Hi,
    I am getting below error, in db13 online backup error.
    09.06.2014
    00:00:58
    Job started
    09.06.2014
    00:00:58
    Step 001 started (program RSDBAJOB, variant &0000000002712, user ID BASISADMIN)
    09.06.2014
    00:00:58
    Backup_Dev:Database Backup to Device
    09.06.2014
    00:00:58
    Backup_Dev:started by CL_DB6_JOB_BACKUP_DEVICE       on server bgprd
    09.06.2014
    00:00:58
    Backup_Dev:Parameter TESTMODE has not been set
    09.06.2014
    00:00:58
    Backup_Dev:Parameter RUNTIME has not been set
    09.06.2014
    00:00:58
    Backup_Dev:Parameter BACKUP_MODE has been set to "ONLINE"
    09.06.2014
    00:00:58
    Backup_Dev:Parameter PARTITION has not been set
    09.06.2014
    00:00:58
    Backup_Dev:Parameter BACKUP_TYPE has been set to ""
    09.06.2014
    00:00:58
    Backup_Dev:Parameter COMPRESS has been set to ""
    09.06.2014
    00:00:58
    Backup_Dev:Parameter INCLUDE LOGS has been set to "INCLUDE LOGS"
    09.06.2014
    00:00:58
    Backup_Dev:Parameter NUMBER_BUFFERS has been set to " 0"
    09.06.2014
    00:00:58
    Backup_Dev:Parameter BUFFER_SIZE has been set to " 0"
    09.06.2014
    00:00:58
    Backup_Dev:Parameter PARALLELISM has been set to " 0"
    09.06.2014
    00:00:58
    Backup_Dev:Parameter UTIL_IMPACT_PRIORITY has not been set
    09.06.2014
    00:00:58
    Backup_Dev:Parameter FILE_PATH has been set to "/dev/rmt/0mn"
    09.06.2014
    00:01:04
    Backup_Dev:Command '   'failed
    09.06.2014
    00:01:04
    Exception CX_DB6_CON in program CL_DB6_JOB_BACKUP=============CP / CL_DB6_JOB_BACKUP=============CM002 at line ADBC error with r
    09.06.2014
    00:01:04
    Backup_Dev:Exception CX_DBA_JOB in class CL_DB6_JOB_BACKUP
    09.06.2014
    00:01:04
    Backup_Dev:  Kernel Error ID:
    09.06.2014
    00:01:04
    Backup_Dev:SYSID:
    09.06.2014
    00:01:04
    Backup_Dev:  SY-SUBRC: 1208
    09.06.2014
    00:01:04
    Backup_Dev:  SY-TABIX: 0
    09.06.2014
    00:01:04
    Backup_Dev:  Message: ADBC error
    09.06.2014
    00:01:04
    Backup_Dev:  Database:
    09.06.2014
    00:01:04
    Backup_Dev:caused by
    09.06.2014
    00:01:04
    Backup_Dev:Exception CX_DB6_ADMINCMD in class CL_DB6_ADMIN_CMD method EXECUTE_CM
    09.06.2014
    00:01:04
    Backup_Dev:  D line 43
    09.06.2014
    00:01:04
    Backup_Dev:  Kernel Error ID:
    09.06.2014
    00:01:04
    Backup_Dev:  SYSID: PRD
    09.06.2014
    00:01:04
    Backup_Dev:  SY-SUBRC: 1208
    09.06.2014
    00:01:04
    Backup_Dev:  Message: ADBC error
    09.06.2014
    00:01:04
    Backup_Dev:  Command: BACKUP DATABASE PRD ON DBPARTITIONNUM ( 0 ) ONLINE TO"/dev/
    09.06.2014
    00:01:04
    Backup_Dev:  rmt/0mn" INCLUDE LOGS
    09.06.2014
    00:01:04
    Backup_Dev:  Database:
    09.06.2014
    00:01:04
    Backup_Dev:caused by
    09.06.2014
    00:01:04
    Backup_Dev:Exception CX_SQL_EXCEPTION in class CL_SQL_STATEMENT
    09.06.2014
    00:01:04
    Backup_Dev:  Kernel Error ID:
    09.06.2014
    00:01:04
    Backup_Dev:  DB Error: Yes
    09.06.2014
    00:01:04
    Backup_Dev:  SQL Code: 902-
    09.06.2014
    00:01:04
    Backup_Dev:  SQL Message: SQL0902C A system error (reason code = "
    09.06.2014
    00:01:04
    Backup_Dev:  ") occurred.
    09.06.2014
    00:01:04
    Backup_Dev:  Subsequent SQL statements cannot be processed. SQLSTATE=58005 row=1
    09.06.2014
    00:01:04
    Backup_Dev:  DB Object Exists: No
    09.06.2014
    00:01:04
    Backup_Dev:  Duplicated Key: No
    09.06.2014
    00:01:04
    Backup_Dev:  Internal Error: 1
    09.06.2014
    00:01:04
    Backup_Dev:  Invalid Cursor: No
    09.06.2014
    00:01:04
    Backup_Dev:  Unknown Connection: No
    09.06.2014
    00:01:04
    Backup_Dev:  Connection Closed: No
    09.06.2014
    00:01:04
    Exception CX_DBA_JOB in class CL_DB6_JOB_BACKUP method  line 40
    09.06.2014
    00:01:04
    Backup_Dev:terminated with error
    09.06.2014
    00:01:04
    REASON=ADBC error
    09.06.2014
    00:01:04
    Job finished

    Hi,
    Please Check the note no 610408.
    https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=610408.
    And check for detail error in diag.log file.
    Thanks & Regards,
    Balaji.S

  • Fatal Error During Solution Center Install - "Key Not Valid for Specified State"

    I have encountered an error while trying to install HP Solution Center for my J6480 All-In-One.  The software I'm installing is "OJJ6400_Full_10.exe"
    I can get past the installation option selections (i.e., the screens that allow selection of which components you want installed) as well the online check for updates to the software.  However, shortly after that I get a fatal error the full text of which are:
    Error Situation Code: 23551631
    The following lines were retrieved from the installation error logs.
    Now Launching=X:\hpzmsi01.exe -m dot4wrp "-*"
    ".\autorun_network.inf" "-networkonly" -| XXX -f X:\DIVins??.DAT
    Error message received: Key not valid for use in specified state.
    X:\cioum32.msi failed with return code 1603
    MSIInstall() failed with 1603
    Exit code=1603
    Your help is appreciated.  Thanks.

    Hey @redleader74,
    At this time I am going to have you unlock the hidden System Administrator Account and attempt an install under there. Ideally, if everything installs fine you should be able to log back into your normal User Account and the complete software and driver package for your HP Officejet J6480 All-in-One Printer will be installed and functional. Can I please have you follow the steps below.
    Step 1: Uninstall Drivers:
    Click on your Start menu
    Select All Programs
    Select the HP folder
    Select your HP Officejet
    Select Uninstall
    Please follow any onscreen prompts to complete the uninstall. Once the uninstall is complete please proceed to the next step.
    Step 2: Clear Temp Files:
    Click on your Start menu
    In the 'search programs and files' box located right above Start after you click on it, type %temp% and hit enter on your keyboard
    When the Temp folder opens, select Ctrl + A at the same time on your keyboard. Everything in this folder will now highlight.
    Select the 'delete' button on your keyboard. The Temp folder contains temporary internet files. No actual files or folders on your computer will be affected by deleting the Temp files. Should a Temp file still be used than you will automatically get the pop up to 'skip' that item.
    Close the Temp folder once it is emptied
    Right click the Recycling Bin on your desktop and select Empty Recycling Bin
    Step 3: Unlock System Administrator Account:
    Click on your Start menu and under the 'search programs and files' box type CMD
    CMD will populate as a search option above, just right click on it and 'run as administrator'
    Once CMD (Command Prompt) opens, type net user administrator /active:yes and hit enter
    Next, close CMD and restart your computer
    When your computer comes on log into the new Account that should show. It will be called Administrator and will not have a password on it.
    If your computer automatically logs into your account after restart than go to your start menu click the arrow beside 'shutdown' and choose 'switch user'. Now log into the Administrator Account we just unlocked
    Step 4: Install Device:
    Under the Administrator Account please click here to download the latest drivers for your printer.
    Once the website opens select the Download button on the top left
    Once the download is complete please follow the onscreen instructions to install your printer
    Once the installation is complete, please test the functions of your HP Officejet to ensure that everything is functioning properly now. If everything installs fine, log out of the Administrator Account and back into your normal User Account. All the Software and Drivers for your product should show installed now on your Account. Once you're logged into your User Account please test your HP Officejet again to verify that your print and scan functions are still working.
    If everything works fine, you will want to Hide the Administrator Account.
    Go to your Start menu and under the 'search programs and files' box type CMD
    CMD will populate as a search option above, just right click on it and 'run as administrator'
    Once CMD (Command Prompt) opens, type net user administrator /active:no and hit enter
    Next, close CMD and restart your computer
    Please let me know if these steps resolve your issue. Good luck!
    X-23
    I work on behalf of HP
    Please click "Accept as Solution" if you feel my post solved your issue, it will help others find the solution.
    Click the "Kudos, Thumbs Up" on the right to say "Thanks" for helping!

  • Error in the sql statement for SQL Server

    Hy:)
    i am using this sql statement to get all fields, which have been changed since yesterday
    SELECT ITEMCODE FROM SBODemo_UK.DBO.OITM  WHERE CREATEDATE IS >= DATEADD(day, -1, GetDate())
    But its not working.. you have any suggestions?
    cheers,
    Maggie

    Hello Margarete,
    I think ur query works if u simply remove 'IS' from it
    SELECT ITEMCODE FROM SBODemo_India.DBO.OITM
    WHERE CREATEDATE >= DATEADD(day, -1, GetDate())
    Manu

  • CDS-11025 Error: Oracle Designer generation error with PL/SQL package

    Hi friends,
    We tried to generate a database package from Oracle Designer (10.1.2.6) and getting "syntax errors" but the package has no syntax errors when we copy and paste the code and compile in TOAD (10.6)
    Error from Designer:
    Server Generator 10.1.2.6 (Build 10.1.2.11.12) , Wed Oct 17 10:58:43 2012
    Copyright (c) Oracle Corporation 1995, 2010. All rights reserved.
    CDS-11025 Error: The PL/SQL within PACKAGE BODY AVP_WATER_ANALYSIS_V has syntax errors - At token 'END', around:
    ...te_dist.VLV_INTL_ID;
    END LOOP;
    Processing Complete: 1 error(s), 0 warning(s)
    code snippet from the Error message:
    FOR rec_update_dist IN cur_update_dist (i_anlyd_intl_id,
    i_iterd_intl_id,
    i_phsed_intl_id,
    i_wtrc_intl_id)
    LOOP
    UPDATE AVP_VALVE AvpValve
    SET AvpValve.DIST_FROM_EDGE = rec_update_dist.DIST_FROM_EDGE
    WHERE AvpValve.ANLYD_INTL_ID = rec_update_dist.ANLYD_INTL_ID
    AND AvpValve.ITERD_INTL_ID = rec_update_dist.ITERD_INTL_ID
    AND AvpValve.PHSED_INTL_ID = rec_update_dist.PHSED_INTL_ID
    AND AvpValve.WTRC_INTL_ID = rec_update_dist.WTRC_INTL_ID
    AND AvpValve.VLV_INTL_ID = rec_update_dist.VLV_INTL_ID;
    END LOOP;
    Thanks for any feedback,
    Jim

    Found the problem.
    It was an issue with the CURSOR with the SELECT ... FROM (SELECT CASE WHEN THEN ELSE END). After swithing to the DECODE statement, Designer is able to generate the package.
    CASE
    WHEN ISOLATION_IND = 'Y' THEN
    'A'
    WHEN OPERATED_IND = 'Y' THEN
    'B'
    ELSE
    'C'
    END
    decode(ISOLATION_IND,'Y','A',decode(OPERATED_IND,'Y','B','C'))
    However, still strange to me that Designer doesn't like the CASE as part of SELECT.
    Edited by: user476620 on Oct 18, 2012 8:13 PM

  • SQL 4.7 Installation Error CJS-00084  SQL Statement or Script failed

    Dear SAP Gurus,
    pl do let me know hoe to resolve this error.......
    """CJS-00084  SQL Statement or Script failed"""
    my ora_sql_results file is like that..
    ===========================================
    2008-10-25, 16:14:44 SAPINST ORACLE start logging for
    connect  / as sysdba ;
    @@"C:\SAPinstORACLEKERNEL/oradbusr.sql"
    exit;
    Output of SQL executing program:
    SQL*Plus: Release 9.2.0.2.0 - Production on Sat Oct 25 16:14:44 2008
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Connected.
    Connected.
    old   3:    if substr(upper('&&1'),1,5) = 'SAPR3' then
    new   3:    if substr(upper('SAPERP'),1,5) = 'SAPR3' then
    old   6:           if upper('&&2') = 'NT' then
    new   6:           if upper('NT') = 'NT' then
    old  13:                :sDomain := upper('&&3');
    new  13:                :sDomain := upper('ERP');
    old  17:           :sSchema := upper('&&1');
    new  17:           :sSchema := upper('SAPERP');
    old  18:           if upper('&&2') = 'NT' then
    new  18:           if upper('NT') = 'NT' then
    old  25:                :sDomain := upper('&&3');
    new  25:                :sDomain := upper('ERP');
    using following Parameters:
    .  Oracle SID:                      ERP
    .  Oracle Version:                 9.2.0.2.1
    .  Parametervalue os_authent_prefix:   OPS$
    .  Database User (Schema):            SAPERP
    .  SAP R/3 Administrator:            OPS$ERP\ERPADM
    .  SAP R/3 Serviceuser:             OPS$ERP\SAPSERVICEERP
    O/S Message: No such file or directory
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.2.1 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.2.0 - Production
    SAPINST: End of output of SQL executing program F:\oracle\ora92/bin/sqlplus.exe.
    SAPINST found errors.
    SAPINST The current process environment may be found in sapinst_ora_environment.log.
    2008-10-25, 16:14:44 SAPINST ORACLE stop logging
    =======================================
    My SAPINST_ORA_ENVIRONMENT FIle is like that
    ==========================================
    2008-10-25, 16:10:43 SAPINST Current process environment:
    =::=::\
    =C:=C:\SAPinstORACLEKERNEL
    ALLUSERSPROFILE=C:\Documents and Settings\All Users
    APPDATA=C:\Documents and Settings\tanya\Application Data
    CLIENTNAME=Console
    CommonProgramFiles=C:\Program Files\Common Files
    COMPUTERNAME=ERP
    ComSpec=C:\WINDOWS\system32\cmd.exe
    DBMS_TYPE=ORA
    DBS_ORA_SCHEMA=SAPERP
    dbs_ora_tnsname=ERP
    FP_NO_HOST_CHECK=NO
    HOMEDRIVE=C:
    HOMEPATH=\Documents and Settings\tanya
    JAVA_HOME=C:\j2sdk1.4.2_09
    JSERV=F:\oracle\ora92/Apache/Jserv/conf
    LOGONSERVER=
    ERP
    NLS_LANG=AMERICAN_AMERICA.WE8DEC
    NUMBER_OF_PROCESSORS=2
    ORACLE_HOME=F:\oracle\ora92
    ORACLE_SID=ERP
    OS=Windows_NT
    Path=F:\oracle\ora92\bin;$PATH$
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    PROCESSOR_ARCHITECTURE=x86
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 23 Stepping 6, GenuineIntel
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=1706
    ProgramFiles=C:\Program Files
    SAPDATA_HOME=F:\oracle\ERP
    SAPEXE=F:\usr\sap\ERP\SYS\exe\run
    SAPLOCALHOST=ERP
    SAPSYSTEMNAME=ERP
    SESSIONNAME=Console
    SystemDrive=C:
    SystemRoot=C:\WINDOWS
    TEMP=C:\WINDOWS\TEMP
    TMP=C:\WINDOWS\TEMP
    USERDOMAIN=ERP
    USERNAME=tanya
    USERPROFILE=C:\Documents and Settings\tanya
    windir=C:\WINDOWS
    WV_GATEWAY_CFG=F:\oracle\ora92\Apache\modplsql\cfg\wdbsvr.app
    SAPINST: End of current process environment.
    =====================================
    REgards,
    Abhishek

    Thanks, but most of the people in the industry are still using the same, and it is working on their Machine
    As far as I remember 9.2.0.2 was never released, one needed to install at least 9.2.0.4 (or .5). That´s why the official installation guides tell you to install the latest patches PLUS the latest interim patches for the database.
    On top of that, Oracle 9.2 is out of extended support already, I would get a new installation CD set with Oracle 10g and use that for a new installation.
    why it is not working on my machine?
    Because those old database versions have many bugs that are fixed with patches - so why do you want to run such an old version if one KNOWS that it´s buggy and there are patches to fix those errors?
    secondly from where i will get the latest patches, as told by you. pl do let me know any website from where i can down load them
    Check
    Note 938986 - Oracle Database 9.2: Patches for 9.2.0
    Markus

  • Getting error CJS-00084 SQL Statement or script failed while creating a DB

    Hi All,
    I ma trying to install IDES CRM 4.0 with Oracle DB and process went fine till the point of central instance installation. I am at the final step of installing the database instance and got an error while it is performing different steps of it.
    At the step CREATE ORACLE DATABASE, i got the below error message:
    CJS-00084  SQL statement or script failed. DIAGNOSIS: Error message: ORA-01092: ORACLE instance terminated. Disconnection forced
    Can someone help me to resolve this?
    Thanks
    Vijay

    -> did you follow all steps correctly? for example did you say NO when runinstaller asks for database creation?
    -> which operating system are you on?
    GreetZ, AH

  • Need to take monthly report for SQL statements...Is there any possiblity?

    Hi,
    We have a requirement to find out the list of expensive sql statements in our ECC 6.0 system.
    I am aware that we can see expensive sql statements which are being executed online in the TCode ST04 or DB02old.
    But I want the list of statements on a monthly wise.
    Is there any possibility to find out the list of expensive sql statements for the previous 3 to 4 months?If so, how do we do that?
    Any report or Tcode with navigations.
    Please help.
    Regards,
    Sudheer.

    Hi,
    > We have a requirement to find out the list of expensive sql statements in our ECC 6.0 system.
    nice.
    > I am aware that we can see expensive sql statements which are being executed online in the TCode ST04 or DB02old.
    expensive SQL in DB02, really?
    > But I want the list of statements on a monthly wise.
    > Is there any possibility to find out the list of expensive sql statements for the previous 3 to 4 months?
    > If so, how do we do that?
    Up to now there is no transaction available with such information. The databases partially offer solutions.
    These are switched on by default of have to be setup before they could be used. So it depends on the
    database and the database version which are you using.
    On ORACLE 10g for example we have the AWR (Automatic Workload Repository) which should be switched on by default (depends again on the license). On ORACLE 9i statspack is available but has to be activated first.
    On DB6 (latest database and SAP release) we have the so called performance warehouse.
    On other databases there might be solutions too.
    Besides that you can always built your own solution and grab the top 10 SQL statements from the SQL cache and
    persist them in regular intervals. I have seen such solutions as well.
    Kind regards,
    Hermann

  • Syntax error in For Loop statement

    Hello
    Normally my FOR staements have not been a problem as only access one table. I the example below I am accessing three table and therefore I get a Syntax error.
    I only wish to select the "Product" recored but need the other table to enable the select the right results.
    FOR product_rec IN (SELECT * from PRODUCT, PRODUCT_GROUP,PROD_PROD_GROUP
    where PRODUCT_GROUP.PRODUCT_GROUP_KEY = PROD_PROD_GROUP.PRODUCT_GROUP_KEY
    and PROD_PROD_GROUP.PRODUCT_KEY = PRODUCT.PRODUCT_KEY
    and product.supplier_key = company_no
    and PROD_PROD_GROUP.MULTI_WEB_DIS = 1
    order by PROD_PROD_GROUP.MULTI_WEB_SEQ)
    Can anyone let the correct syntx for this statement.
    Thanks
    Pete

    Like Dom said:
    FOR product_rec IN (SELECT PRODUCT.* from PRODUCT, PRODUCT_GROUP,PROD_PROD_GROUP
    where PRODUCT_GROUP.PRODUCT_GROUP_KEY = PROD_PROD_GROUP.PRODUCT_GROUP_KEY
    and PROD_PROD_GROUP.PRODUCT_KEY = PRODUCT.PRODUCT_KEY
    and product.supplier_key = company_no
    and PROD_PROD_GROUP.MULTI_WEB_DIS = 1
    order by PROD_PROD_GROUP.MULTI_WEB_SEQ) Or what he meant by "nice to have", use aliases:
    select p.*
    from
      product p,
      product_group pg,
      prod_prod_group ppg
    where
      pg.product_group_key = ppg.product_group_key
      and ppg.product_key = p.product_key
      and p.supplier_key = company_no
      and ppg.multi_web_dis = 1
    order by
      ppg.multi_web_seqAlso, note that company_no is not aliased in the above query. If this is a column, it should be aliased as well (either with the full table name or the alias if you switch to using them). If it is a PL/SQL variable, it is fine as is.
    Edited by: cmartin2 on Feb 2, 2011 1:56 PM

  • DML Error logging for Update statement

    Hello,
    I am facing a problem with regard to DML Error logging with Update statement .
    oracle : 10.2
    I am executing following DML update:
    BEGIN
    UPDATE
    table_1  a
    SET a.Exp_DATE =a.EFF_DATE
    WHERE  a.col_a1 != (SELECT b.colb1
                         FROM table_2  b
                         WHERE  a.msisdn =b.msisdn )
    LOG ERRORS INTO table_1_ERR REJECT LIMIT UNLIMITED;                        
    END ;    I was expecting that "ORA-01427: single-row subquery returns more than one row" would be captured in LOG error table "table_1_err"
    but instead I got run time error and whole dml was rolled back.
    Please let me know whether this exception is not captured by DML error logging.
    Thanks,
    Abhishek

    *Oracle logs the following errors during DML operations:** Column values that are too large.
    * Constraint violations (NOT NULL, unique, referential, and check constraints).
    * Errors raised during trigger execution.
    * Errors resulting from type conversion between a column in a subquery and the corresponding column of the table.
    * Partition mapping errors.
    >
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14223/transform.htm#sthref777

  • Need help for sql statement

    Hi,
    Need help to write sql statement.
    create table t_dt ( dt_start date, dt_end date, amount number);
    insert into t_dt values('1-Jan-10','10-Feb-10',12);
    insert into t_dt values('11-Feb-10','10-Mar-10',10);
    insert into t_dt values('11-Mar-10','20-Apr-10',8);
    insert into t_dt values('21-Apr-10','28-Jun-10',10);
    insert into t_dt values('29-Jun-10','20-Sep-10',10);
    insert into t_dt values('21-Sep-10','10-Oct-10',10);
    insert into t_dt values('11-Oct-10','31-Dec-10',8);
    insert into t_dt values('1-Jan-11','10-Feb-11',8);
    insert into t_dt values('11-Feb-11','10-Mar-11',7);
    insert into t_dt values('11-Mar-11','20-Apr-11',6);
    insert into t_dt values('21-Apr-11','28-Jun-11',6);
    insert into t_dt values('29-Jun-11','20-Sep-11',6);
    insert into t_dt values('21-Sep-11','10-Oct-11',4);
    insert into t_dt values('11-Oct-11','31-Dec-11',8);
    Result should be like below..
    dt_start     dt_end     Amount
    1-Jan-10     10-Feb-10     12
    11-Feb-10     10-Mar-10     10
    11-Mar-10     20-Apr-10     8
    21-Apr-10     10-Oct-10     10
    11-Oct-10     10-Feb-11     8
    11-Feb-11     10-Mar-11     7
    11-Mar-11     20-Sep-11     6
    21-Sep-11     10-Oct-11     4
    11-Oct-11     31-Dec-11     8
    Just to explain the example, take a row with start date as 21-Apr-10 in the above insert statements, since it has the same amount for next two rows (i.e. with start date '29-Jun-10' and '21-Sep-10') these 3 rows should be converted to represent only 1 row in the result and the start date and end date should be changed per the result shown above.
    Thanks.

    Hello
    I think this gives yuo what you need....
    SELECT
        MIN(dt_start),
        MAX(dt_end),
        amount
    FROM
        (   SELECT
                dt_start,
                dt_end,
                MAX(marker) OVER(ORDER BY dt_start) marker,
                amount
            FROM
                    Select
                        dt_start,
                        dt_end,
                        amount,
                        CASE
                            WHEN LAG(amount) OVER(ORDER BY dt_start) <> amount THEN
                                ROW_NUMBER() OVER(ORDER BY dt_start)
                        END marker
                    from t_dt
    GROUP BY
         amount,
         marker
    order by     
         MIN(dt_start)
    MIN(DT_START)        MAX(DT_END)              AMOUNT
    01-JAN-2010 00:00:00 10-FEB-2010 00:00:00         12
    11-FEB-2010 00:00:00 10-MAR-2010 00:00:00         10
    11-MAR-2010 00:00:00 20-APR-2010 00:00:00          8
    21-APR-2010 00:00:00 10-OCT-2010 00:00:00         10
    11-OCT-2010 00:00:00 10-FEB-2011 00:00:00          8
    11-FEB-2011 00:00:00 10-MAR-2011 00:00:00          7
    11-MAR-2011 00:00:00 20-SEP-2011 00:00:00          6
    21-SEP-2011 00:00:00 10-OCT-2011 00:00:00          4
    11-OCT-2011 00:00:00 31-DEC-2011 00:00:00          8
    9 rows selected.HTH
    David
    Edited by: Bravid on Feb 23, 2012 12:08 PM
    Beaten to it by Frank! :-)

Maybe you are looking for

  • Access to serial port ttyS0

    Hello, I'm trying to use a self-built mgetty+sendfax package (the one in AUR doesn't compile here) to access my modem on /dev/ttyS0 (to send faxes to DSL / VoIP). The mgetty+sendfax program "fax-helper" normally runs as user "fax" and tries to access

  • How do I create this generic enumeration method?

    I am storing enumeration values as classname/name. When I come to read them back in I have the following code:     public Enum<?> asEnum (String className, String value) throws ClassNotFoundException, ClassCastException {           return Enum.valueO

  • After a restore, iphone 4 won't move past set up screen in itunes, how do i fix this?

    After a system restore, my iphone 4 won't move past the set up screen when syncing with itunes, what happened? How can I fix this?

  • Does anyone have experience with CS2 installation on a new computer?

    We have just been informed by Adobe that Adobe has "disabled the activation server for CS2 applications "..."because of a technical issue".  I don't believe Adobe.  Further explanation indicates that I can get a version that installs without activati

  • Re-creating a jpg logo in illustrator

    Hi, I am using jpg logos in an after effects project. Most logo images have a white background which I erase with photoshop. However when I use the image in the after effects project, small white lines appear on the side of the letters in the 3d logo