ORA-15196: invalid ASM block header

asm alert shows:
WARNNING: cache read a corrupted block group=1(CRSDG) dsk=0 blk=2 from disk 0(CRSVOL)
Errors in file /u01/app/11.2.0/grid/log/diag/asm/+asm/+ASM1/trace/+ASM1_rbal_16585.trc:
ORA-15196: invalid ASM block header [kfc.c:25578] [endian_kfbh] [2147483648] [2] [0 != 1]
ORA-15196: invalid ASM block header [kfc.c:25427] [endian_kfbh] [2147483648] [2] [0 != 1]
Here are my challenges to the answer providers and I am going to number my questions. You are welcome to answer any question listed below, just please quota my question number first. Thanks.
1) "cache read a corrupted block group" , what exactly is the "cache" here?
2) "group=1(CRSDG) dsk=0 blk=2 from disk 0(CRSVOL)" we know that ASM is stored in AUs, here only gives dsk=0, blk=2, but without knowing the AU number, how can I use kfed to read the proper block?
3) "kfc.c:25578" what is kfc.c? I can find explanation about kfbh.<>, kfdhdb.<>, but have no clue about what kfc.c is.
4) "[endian_kfbh] [2147483648] [2] [0 != 1]" I know endian_kfbh is about the platform's Endian, but what is 2147483648 referring to here?
5)  "[endian_kfbh] [2147483648] [2] [0 != 1]" I am guessing [2] refers to block number 2, is this correct?
6) overall, is all it is trying to tell me is "the plaform should be in small endian (1), but now it is marked as big endian(2) at some header place"?
7) of course, I would appreciate your solutions very much. you solution is ...?
8) Is there any good article reference about these stuff?
lisingt every single questions of mine is my favorite seeking help style.  Doing this help learn better. I am expecting your contributions.
Thanks in advance!

1) "cache read a corrupted block group" , what exactly is the "cache" here?
I think I need not ask this question. Cache here simply means reading the block from disk to the cache.
However, questions 2 ~ 7 are still valid.

Similar Messages

  • ORA-00354: corrupt redo log block header

    Hi Guys,
    Need your support to resolve one of the oracle issues,
    Below are errors visible in alert.log in oracle,
    ORA-16038: log 24 sequence# 660467 cannot be archived
    ORA-00354: corrupt redo log block header
    ORA-00312: online log 24 thread 1: '/oracle/PRD/origlogB/log_g24_m1.dbf'...
    2010-10-03 07:26:12.835 20195 kcrr.c
    ORA-16014: log 24 sequence# 660467 not archived, no available
    destinations
    Below is o/p of archive log list seems to be bit strange,
    SQL> archive log list
    Database log mode              Archive Mode
    Automatic archival             Enabled
    Archive destination            /oracle/PRD/saparch/PRDarch
    Oldest online log sequence     660467
    Next log sequence to archive   660467
    Current log sequence           660576
    And some more info,
    SQL> SELECT GROUP#, STATUS, MEMBER FROM V$LOGFILE;
        GROUP# STATUS  MEMBER
            28         /oracle/PRD/origlogB/log_g28_m1.dbf
            28         /oracle/PRD/mirrlogB/log_g28_m2.dbf
            27         /oracle/PRD/origlogA/log_g27_m1.dbf
            27         /oracle/PRD/mirrlogA/log_g27_m2.dbf
            26         /oracle/PRD/origlogB/log_g26_m1.dbf
            26         /oracle/PRD/mirrlogB/log_g26_m2.dbf
            25         /oracle/PRD/origlogA/log_g25_m1.dbf
            25         /oracle/PRD/mirrlogA/log_g25_m2.dbf
            24         /oracle/PRD/origlogB/log_g24_m1.dbf
            24         /oracle/PRD/mirrlogB/log_g24_m2.dbf
            23         /oracle/PRD/origlogA/log_g23_m1.dbf
            23         /oracle/PRD/mirrlogA/log_g23_m2.dbf
            22         /oracle/PRD/origlogB/log_g22_m1.dbf
            22         /oracle/PRD/mirrlogB/log_g22_m2.dbf
            21         /oracle/PRD/origlogA/log_g21_m1.dbf
            21         /oracle/PRD/mirrlogA/log_g21_m2.dbf
    16 rows selected.
    SQL> SELECT GROUP#, SEQUENCE#, MEMBERS, ARCHIVED, STATUS, FIRST_CHANGE# FROM V$LOG;
        GROUP#  SEQUENCE#    MEMBERS ARC STATUS           FIRST_CHANGE#
            21     660571          2 NO  INACTIVE            2.9116E+10
            22     660572          2 NO  INACTIVE            2.9116E+10
            23     660570          2 NO  INACTIVE            2.9116E+10
            24     660467          2 NO  INACTIVE            2.9114E+10
            25     660573          2 NO  ACTIVE              2.9116E+10
            26     660574          2 NO  CURRENT             2.9116E+10
            27     660568          2 NO  INACTIVE            2.9116E+10
            28     660569          2 NO  INACTIVE            2.9116E+10
    8 rows selected.
    All file exists but still facing issue, no backup is running
    Regards,
    Yash

    Hi,
    Instead of the logfile name, try the command with the logfile integer as mentioned below.
    alter database clear unarchived logfile group <integer>;
    You can get the logfile integer using the view, v$log.
    select GROUP#,MEMBERS,STATUS from v$log;
    The value for the parameter GROUP# is the logfile integer.
    Hope this helps.
    Regards,
    Varadharajan M

  • ORA-00354: corrupt redo log block header..urgent

    Hi All,
    i am running into an issue when trying to recover a datafile.
    1). Logs are being applied to the datafile to recover but RMAN is throwing this error:
    ORA-00283: recovery session canceled due to errors
    RMAN-11003: failure during parse/execution of SQL statement: alter database reco
    ver logfile 'H:\ORACLE_ARCHIVE_LOGS\RBS\ARCHIVELOG\2012_04_23\O1_MF_1_13174_7SC4
    P56W_.ARC'
    ORA-00283: recovery session canceled due to errors
    ORA-00354: corrupt redo log block header
    ORA-00353: log corruption near block 32768 change 6715041179 time 04/23/2012 13:
    33:51
    ORA-00334: archived log: 'H:\ORACLE_ARCHIVE_LOGS\RBS\ARCHIVELOG\2012_04_23\O1_MF
    _1_13174_7SC4P56W_.ARC'
    thanks in advance

    bcm@bcm-laptop:~$ oerr ora 353
    00353, 00000, "log corruption near block %s change %s time %s"
    // *Cause:  Some type of redo log corruption has been discovered. This error
    //          describes the location of the corruption. Accompanying errors
    //          describe the type of corruption.
    // *Action: Do recovery with a good version of the log or do incomplete
    //          recovery up to the indicated change or time.
    bcm@bcm-laptop:~$ oerr ora 354
    00354, 00000, "corrupt redo log block header"
    // *Cause:  The block header on the redo block indicated by the accompanying
    //          error, is not reasonable.
    // *Action: Do recovery with a good version of the log or do time based
    //          recovery up to the indicated time. If this happens when archiving,
    //          archiving of the problem log can be skipped by clearing the log
    //          with the UNARCHIVED option. This must be followed by a backup of
    //          every datafile to insure recoverability of the database.

  • ORA-15100: invalid or missing diskgroup name in 11g ASM

    We have 11g R2 DB and 11g ASM installed on linux server, it was working till morning,due to some maintenance we rebooted server, then i am trying to bring up asm instance, its falling with below error.
    [oracle@adg dbs]$ sqlplus / as sysasm
    SQL*Plus: Release 11.2.0.1.0 Production on Tue Aug 16 16:15:57 2011
    Copyright (c) 1982, 2009, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Automatic Storage Management option
    SQL> startup force pfile='/u01/app/11.2.0/grid/dbs/init+ASM.ora';
    ASM instance started
    Total System Global Area 284565504 bytes
    Fixed Size 1336036 bytes
    Variable Size 258063644 bytes
    ASM Cache 25165824 bytes
    ORA-15110: no diskgroups mounted
    SQL> show parameter string
    NAME TYPE VALUE
    asm_diskstring string DATA, DATA1
    SQL> shut immediate
    ORA-15100: invalid or missing diskgroup name
    ASM instance shutdown
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Automatic Storage Management option
    [oracle@adg dbs]$ vi init+ASM.ora
    [oracle@adg dbs]$ /etc/init.d/oracleasm listdisks
    DISK1
    DISK2
    [[root@adg ~]# /etc/init.d/oracleasm scandisks
    Scanning the system for Oracle ASMLib disks: [  OK  ]
    ERROR: diskgroup RECOVERY_AREA was not mounted
    NOTE: cache deleting context for group RECOVERY_AREA 2/625504078
    ORA-15032: not all alterations performed
    ORA-15017: diskgroup "RECOVERY_AREA" cannot be mounted
    ORA-15063: ASM discovered an insufficient number of disks for diskgroup "RECOVERY_AREA"
    ERROR: ALTER DISKGROUP RECOVERY_AREA MOUNT /* asm agent */
    Errors in file /u01/app/oracle/diag/asm/+asm/+ASM/trace/+ASM_rbal_6520.trc ; (incident=8105):
    ORA-00600: internal error code, arguments: [kfrcGetNRB05], [1], [340], [], [], [], [], [], [], [], [], []
    Incident details in: /u01/app/oracle/diag/asm/+asm/+ASM/incident/incdir_8105/+ASM_rbal_6520_i8105.trc
    ERROR: ORA-600 in COD recovery for diskgroup 1/0xfe086f4c (DATA)
    ERROR: ORA-600 thrown in RBAL for group number 1
    Errors in file /u01/app/oracle/diag/asm/+asm/+ASM/trace/+ASM_rbal_6520.trc:
    ORA-00600: internal error code, arguments: [kfrcGetNRB05], [1], [340], [], [], [], [], [], [], [], [], []
    Errors in file /u01/app/oracle/diag/asm/+asm/+ASM/trace/+ASM_rbal_6520.trc:
    ORA-00600: internal error code, arguments: [kfrcGetNRB05], [1], [340], [], [], [], [], [], [], [], [], []
    RBAL (ospid: 6520): terminating the instance due to error 488
    Tue Aug 16 15:47:03 2011
    ORA-1092 : opitsk aborting process
    Tue Aug 16 15:47:04 2011
    Instance terminated by RBAL, pid = 6520
    Tue Aug 16 15:51:08 2011
    Starting ORACLE instance (normal)

    I tried already.
    SQL> select disk_number, name, label, path, mount_status,HEADER_STATUS, state from v$asm_disk
    2 ;
    DISK_NUMBER NAME LABEL
    PATH
    MOUNT_S HEADER_STATU STATE
    1 DISK2
    ORCL:DISK2
    CLOSED MEMBER NORMAL
    0 DISK1
    ORCL:DISK1
    CLOSED MEMBER NORMAL
    DISK_NUMBER NAME LABEL
    PATH
    MOUNT_S HEADER_STATU STATE
    SQL> alter diskgroup recovery_area mount;
    alter diskgroup recovery_area mount
    ERROR at line 1:
    ORA-15032: not all alterations performed
    ORA-15017: diskgroup "RECOVERY_AREA" cannot be mounted
    ORA-15063: ASM discovered an insufficient number of disks for diskgroup
    "RECOVERY_AREA"
    SQL>
    here is alert log information
    ==================
    Starting ORACLE instance (normal)
    LICENSE_MAX_SESSION = 0
    LICENSE_SESSIONS_WARNING = 0
    Picked latch-free SCN scheme 2
    Using LOG_ARCHIVE_DEST_1 parameter default value as /u01/app/11.2.0/grid/dbs/arch
    Autotune of undo retention is turned on.
    IMODE=BR
    ILAT =0
    LICENSE_MAX_USERS = 0
    SYS auditing is disabled
    Starting up:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Automatic Storage Management option.
    Using parameter settings in client-side pfile /u01/app/11.2.0/grid/dbs/init+ASM.ora on machine adg.xxxx.com
    System parameters with non-default values:
    large_pool_size = 12M
    instance_type = "asm"
    remote_login_passwordfile= "EXCLUSIVE"
    asm_diskstring = ""
    asm_power_limit = 1
    diagnostic_dest = "/u01/app/oracle"
    Tue Aug 16 16:32:26 2011
    PMON started with pid=2, OS id=11558
    Tue Aug 16 16:32:26 2011
    VKTM started with pid=3, OS id=11560 at elevated priority
    VKTM running at (10)millisec precision with DBRM quantum (100)ms
    Tue Aug 16 16:32:26 2011
    GEN0 started with pid=4, OS id=11564
    Tue Aug 16 16:32:26 2011
    DIAG started with pid=5, OS id=11566
    Tue Aug 16 16:32:26 2011
    PSP0 started with pid=6, OS id=11568
    Tue Aug 16 16:32:26 2011
    DIA0 started with pid=7, OS id=11570
    Tue Aug 16 16:32:27 2011
    MMAN started with pid=8, OS id=11572
    Tue Aug 16 16:32:27 2011
    DBW0 started with pid=9, OS id=11574
    Tue Aug 16 16:32:27 2011
    LGWR started with pid=10, OS id=11576
    Tue Aug 16 16:32:27 2011
    CKPT started with pid=11, OS id=11578
    Tue Aug 16 16:32:27 2011
    SMON started with pid=12, OS id=11580
    Tue Aug 16 16:32:27 2011
    RBAL started with pid=13, OS id=11582
    Tue Aug 16 16:32:27 2011
    GMON started with pid=14, OS id=11584
    Tue Aug 16 16:32:27 2011
    MMON started with pid=15, OS id=11586
    Tue Aug 16 16:32:27 2011
    MMNL started with pid=16, OS id=11588
    ORACLE_BASE from environment = /u01/app/oracle
    Tue Aug 16 16:32:27 2011
    SQL> ALTER DISKGROUP ALL MOUNT
    Tue Aug 16 16:34:23 2011
    SQL> alter diskgroup recovery_area mount
    NOTE: cache registered group RECOVERY_AREA number=1 incarn=0x100b432b
    NOTE: cache began mount (first) of group RECOVERY_AREA number=1 incarn=0x100b432b
    Tue Aug 16 16:34:24 2011
    NOTE: Loaded library: /opt/oracle/extapi/32/asm/orcl/1/libasm.so
    Tue Aug 16 16:34:24 2011
    ERROR: no PST quorum in group: required 2, found 0
    NOTE: cache dismounting (clean) group 1/0x100B432B (RECOVERY_AREA)
    NOTE: dbwr not being msg'd to dismount
    NOTE: lgwr not being msg'd to dismount
    NOTE: cache dismounted group 1/0x100B432B (RECOVERY_AREA)
    NOTE: cache ending mount (fail) of group RECOVERY_AREA number=1 incarn=0x100b432b
    kfdp_dismount(): 2
    kfdp_dismountBg(): 2
    ERROR: diskgroup RECOVERY_AREA was not mounted
    NOTE: cache deleting context for group RECOVERY_AREA 1/269173547
    ORA-15032: not all alterations performed
    ORA-15017: diskgroup "RECOVERY_AREA" cannot be mounted
    ORA-15063: ASM discovered an insufficient number of disks for diskgroup "RECOVERY_AREA"
    ERROR: alter diskgroup recovery_area mount
    Tue Aug 16 16:34:53 2011
    SQL> alter diskgroup recovery_area mount
    NOTE: cache registered group RECOVERY_AREA number=1 incarn=0xc86b4331
    NOTE: cache began mount (first) of group RECOVERY_AREA number=1 incarn=0xc86b4331
    Tue Aug 16 16:34:53 2011
    ERROR: no PST quorum in group: required 2, found 0
    NOTE: cache dismounting (clean) group 1/0xC86B4331 (RECOVERY_AREA)
    NOTE: dbwr not being msg'd to dismount
    NOTE: lgwr not being msg'd to dismount
    NOTE: cache dismounted group 1/0xC86B4331 (RECOVERY_AREA)
    NOTE: cache ending mount (fail) of group RECOVERY_AREA number=1 incarn=0xc86b4331
    kfdp_dismount(): 4
    kfdp_dismountBg(): 4
    ERROR: diskgroup RECOVERY_AREA was not mounted
    NOTE: cache deleting context for group RECOVERY_AREA 1/-932494543
    ORA-15032: not all alterations performed
    ORA-15017: diskgroup "RECOVERY_AREA" cannot be mounted
    ORA-15063: ASM discovered an insufficient number of disks for diskgroup "RECOVERY_AREA"
    ERROR: alter diskgroup recovery_area mount

  • Error Message - ORA-01722 Invalid Number

    Hello:
    I have the following situation. When I create an organization, a record is inserted into the following table, AGREEMENTS, and populates four fields.
    I have an update form which selects the organization from the AGREEMENTS table so the user can populate the rest of the table. In addition, on this form, there is a drop-down box which allows the user to select the name of a legal document along with the version of the document in which the user needs to select. This select list is created via an LOV joining three tables. The item name for this select list is :P6_DOCUMENT.
    The code for the LOV is:
    SELECT S.DOC_NAME||' - '|| O.VERSION_NO AS DOC, O.ORG_DOC_CURR_KEY
    FROM SUPPORTING_DOCS S,
         ORG_DOC_CURR_VER O,
         AGREEMENTS H
    WHERE
        S.DOC_TYPE = 'HISA'
    AND S.SUPPORTING_DOC_KEY = O.SUPPORTING_DOC_KEY
    AND H.ORG_KEY_LE = O.ORG_KEY
    AND O.ORG_KEY=:P6_ORG_KEY_LEWhen the user completes the form, the SUBMIT process is a PL/SQL block consisting of an UPDATE statement to update the AGREEMENTS table based on the selected organization and an INSERT statement to insert a record into the AGREEMENTS_DOC table to store the value stored in :P7_DOCUMENT.
    Ok, now here is where my problem starts.
    When I first bring up the form and I select the organization I want to update, I click the Search button to find the organization and I receive the following error message: ORA-01722 Invalid Number.
    At this point all I'm doing is a basic search. There is no insert/update or anything going on. I'm not understanding why I would be receiving this error message.
    The search is based on the database column ORG_KEY_LE whose datatype is NUMBER.
    In my application, the item assigned to ORG_KEY_LE is P6_ORG_KEY_LE.
    I have a PL/SQL block process created (On Load-Before Header) in the Page Rendering area of my page definition. The PL/SQL code that is written is:
    BEGIN
    IF :P6_SEARCH_ORG != '0' THEN
    :P6_ORG_KEY_LE := :P6_SEARCH_ORG;
    END IF;
    END;I then have an Item created, :P6_SEARCH_ORG, which is a Select List. In the LOV portion of the page for this item, I have the following:
    select ORG_KEY_LE display_value, ORG_KEY_LE return_value
    from AGREEMENTS
    order by 1The reason for using this table is because this table contains the newly created organization which needs to be updated with the remaining columns of data.
    I then have a Search button in the Button area which has the following settings:
    Button Position: Region Template Position #CHANGE#.
    Condition Type: Value of Item in Express 1 is NULL.
    Expression 1: :P6_ORG_KEY_LE.
    To troubleshoot this problem, I created two pages, one page to do the UPDATE and the second page to do the INSERT.
    The SEARCH functionality in both pages are identical.
    When I run my UPDATE page, which only involves updating the missing fields, the process works. I have my search box, I'm able to search for the organization, make my updates, and I'm good.
    When I run my INSERT page, which involves inserting the record with the assigned document, I receive the error message after I click the SEARCH button. In order to INSERT the record into this table, I first need to SELECT the organization that was UPDATED in the AGREEMENTS table (using the UPDATE page described in above paragraph). When I select the organization, the user can then assign the appropriate legal document to the organization and insert the record into the AGREEMENTS_DOC table.
    Can someone help me with this error message? I'm not sure why I am able to perform my SEARCH on a page with the UPDATE statement, not able to perform the SEARCH on the page with my INSERT statement, and not be able to perform the SEARCH on the page that combines the UPDATE and INSERT statements.
    I did some more troubleshooting and I do believe my SUBMIT process which contains the INSERT statement is the issue. I created a fourth page which doesn't have a SUBMIT process. I brought up the form, searched for my organization and the information for that organization appeared. The problem is definately with my UPDATE/INSERT process.
    The PL/SQL block for the Submit process is the following:
    BEGIN
    update
        MDD.HISA_AGREEMENTS
         set
           LAST_UPDATED_BY=V('APP_USER'),
           APPROVER_SALUTATION=:P6_APPROVER_SALUTATION,
           APPROVER_FIRST_NAME=:P6_APPROVER_FIRST_NAME,
           APPROVER_MIDDLE_INITIAL=:P6_APPROVER_MIDDLE_INITIAL,
           APPROVER_LAST_NAME=:P6_APPROVER_LAST_NAME,
           APPROVER_NAME_SUFFIX=:P6_APPROVER_NAME_SUFFIX,
           APPROVER_EMAIL_ADDR=:P6_APPROVER_EMAIL_ADDR,
           SPONSOR_EMAIL_ADDR=:P6_SPONSOR_EMAIL_ADDR,
           APPROVER_TITLE=:P6_APPROVER_TITLE
    where
          ORG_KEY_LE=:P6_ORG_KEY_LE
    INSERT INTO
        HISA_AGREEMENT_DOCS
          (HISA_AGREEMENT_DOC_KEY,
           ORG_KEY_LE,
           APPLICATION_KEY,
           STATUS,
           STATUS_DATE,
           CREATED_BY,
           ORG_DOC_CURR_KEY)
    VALUES
          (HISA_AGREEMENT_DOC_KEY_SEQ.NEXTVAL,
           :P6_ORG_KEY_LE,
           :P6_APPLICATION_KEY,
           'C',
           SYSDATE,
           V('APP_USER'),
           :P6_DOCUMENT)
    END;There is something wrong with the above statement and I do not understand what it could be. Can someone help?
    Thanks for the help.

    Hi,
    I believe you are on to something.
    The select list for item :P6_DOCUMENT appears when I first bring up the form. When I select my organization and receive the error message, I clicked on the Session in the Developer's bar. The value in item/field :P6_DOCUMENT shows %null%.
    This is the path in which my user would like to accomplish her task:
    1. Select an organization
    2. Display the information for that organization from the AGREEMENTS table
    3. Enter the data for the remaining fields in the AGREEMENTS table
    4. Select the document (:P6_DOCUMENT) from the drop-down.
    5. Click Submit
    6. Update the AGREEMENTS table with data entered in #3.
    7. Insert a record into the AGREEMENTS_DOC table with the selection from #4.
    Somehow I need the :P6_DOCUMENT field not to show the %null% during the SEARCH functionality. I think that is causing the problem.
    How do I fix this?

  • OSD-04001: invalid logical block size (OS 2800189884)

    My Windows 2003 crashed which was running Oracle XE.
    I installed Oracle XE on Windows XP on another machine.
    I coped my D:\oracle\XE10g\oradata folder of Win2003 to the same location in WinXP machine.
    When I start the database in WinXP using SQLPLUS i get the following message
    SQL> startup
    ORACLE instance started.
    Total System Global Area 146800640 bytes
    Fixed Size 1286220 bytes
    Variable Size 62918580 bytes
    Database Buffers 79691776 bytes
    Redo Buffers 2904064 bytes
    ORA-00205: error in identifying control file, check alert log for more info
    I my D:\oracle\XE10g\app\oracle\admin\XE\bdump\alert_xe I found following errors
    starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
    starting up 4 shared server(s) ...
    Oracle Data Guard is not available in this edition of Oracle.
    Wed Apr 25 18:38:36 2007
    ALTER DATABASE MOUNT
    Wed Apr 25 18:38:36 2007
    ORA-00202: control file: 'D:\ORACLE\XE10G\ORADATA\XE\CONTROL.DBF'
    ORA-27047: unable to read the header block of file
    OSD-04001: invalid logical block size (OS 2800189884)
    Wed Apr 25 18:38:36 2007
    ORA-205 signalled during: ALTER DATABASE MOUNT...
    ORA-00202: control file: 'D:\ORACLE\XE10G\ORADATA\XE\CONTROL.DBF'
    ORA-27047: unable to read the header block of file
    OSD-04001: invalid logical block size (OS 2800189884)
    Please help.
    Regards,
    Zulqarnain

    Hi Zulqarnain,
    Error OSD-04001 is Windows NT specific Oracle message. It means that the logical block size is not a multiple of 512 bytes, or it is too large.
    So what you can do? Well you should try to change the value of DB_BLOCK_SIZE in the initialization parameter file.
    Regards

  • ORA-00911: invalid character using multiple select statements

    I am getting an ORA-00911: invalid character error when trying to execute 2 select statements using ODP.NET.
    cmd.CommandText = "select sysdate from dual;select sysdate from dual;";
    cmd.Connection = conn;
    cmd.CommandType = System.Data.CommandType.Text;
    conn.Open();
    OracleDataReader dr = cmd.ExecuteReader();
    This works in SQL server but for some reason it appears this does not work in Oracle?
    If this is the case what is a vaiable workaround? Wrapping the 2 statements in a transaction?
    Seems strange that you can't return multiple result sets using in-line sql statements.

    Oracle doesn't support passing multiple statements like that, and this is unrelated to ODP.NET.
    SQL> select * from emp;select * from dept;
    select * from emp;select * from dept
    ERROR at line 1:
    ORA-00911: invalid character
    You could do it via an anonymous block and ref cursors though if you dont want to do it via a stored procedure..
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    public class test
    public static void Main()
        using (OracleConnection con = new OracleConnection("data source=orcl;user id=scott;password=tiger;"))
            con.Open();
            string strSql = "begin open :refcur1 for select * from emp;" +
                "open :refcur2 for select * from dept;" +
                "open :refcur3 for select * from salgrade;end;";
            using (OracleCommand cmd = new OracleCommand(strSql, con))
                cmd.Parameters.Add("refcur1", OracleDbType.RefCursor, ParameterDirection.Output);
                cmd.Parameters.Add("refcur2", OracleDbType.RefCursor, ParameterDirection.Output);
                cmd.Parameters.Add("refcur3", OracleDbType.RefCursor, ParameterDirection.Output);
                OracleDataAdapter da = new OracleDataAdapter(cmd);
                DataSet ds = new DataSet();
                da.Fill(ds);
                cmd.Parameters["refcur1"].Dispose();
                cmd.Parameters["refcur2"].Dispose();
                cmd.Parameters["refcur3"].Dispose();
                foreach (DataTable dt in ds.Tables)
                    Console.WriteLine("\nProcessing {0} resultset...", dt.ToString());
                    foreach (DataRow row in dt.Rows)
                        Console.WriteLine("column 1: {0}", row[0]);
    }Hope it helps,
    Greg

  • ORA-00900: invalid SQL statement error while running jobs in APEX 4.2

    Hi,
    the following procedure compiled successfully in Apex 4.2:
    create or replace procedure "DEVLOE" AS
    L_TEMPLATE VARCHAR2(32000);
    L_base_TEMPLATE VARCHAR2(32000);
    begin
    l_base_template := '<html>
    <head>
    <title>HTML Editor Sample Page</title>
    </head>
    <body>
    <p>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;"><span class="plsql-literal" style="line-height: 14.65625px; white-space: nowrap;">Hi #Contact#,</span></span></span></p>
    <p>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;"><span class="plsql-literal" style="line-height: 14.65625px; white-space: nowrap;">This is a notification message to inform you that <strong>Development </strong>effort </span><span class="plsql-literal" style="line-height: 14.65625px; white-space: nowrap;">and milestones are yet to be updated for ECR: </span><span class="plsql-operator" style="line-height: 14.65625px; white-space: nowrap;"></span><span class="plsql-word" style="line-height: 14.65625px; white-space: nowrap;">#ECR_NAME#. This ECR has priority #p#. </span></span></span></p>
    <table align="center" border="1" cellpadding="1" cellspacing="1" style="width: 500px;">
    <tbody>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="color: rgb(255, 0, 0);"><span style="font-family: verdana, geneva, sans-serif;"><u><strong>Department</strong></u></span></span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;"><span style="color: rgb(255, 0, 0);"><u><strong><span style="background-color: rgb(255, 255, 255);">Contact Name</span></strong></u></span></span></span></td>
    </tr>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">Product Management Contact</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#pdm#</span></span></td>
    </tr>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">PMO Contact</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#PMO#</span></span></td>
    </tr>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">Dev Contact</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#Dev#</span></span></td>
    </tr>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">QA Contact</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#QA#</span></span></td>
    </tr>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">Infodev Contact</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#Info#</span></span></td>
    </tr>
    </tbody>
    </table>
    <p>
     </p>
    <span fckbookmark="1" style="display: none;"> </span><span fckbookmark="1" style="display: none;"> </span>
    <table align="center" border="1" cellpadding="1" cellspacing="1" style="width: 500px;">
    <tbody>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;"><span style="color: rgb(0, 0, 255);">Team</span></span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;"><span style="color: rgb(0, 0, 255);">Start Date</span></span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;"><span style="color: rgb(0, 0, 255);">End Date</span></span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;"><span style="color: rgb(0, 0, 255);">Effort(in person days)</span></span></span></td>
    </tr>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">Development</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#d1#</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#e1#</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#L1#</span></span></td>
    </tr>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">Quality Assurance</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#d2#</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#e2#</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#L2#</span></span></td>
    </tr>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">Information Development</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#d3#</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#e3#</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#L3#</span></span></td>
    </tr>
    </tbody>
    </table>
    <p>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">The ECR application is located</span> at </span>: https://apex.oraclecorp.com/pls/apex/f?p=1472:1<span fckbookmark="1" style="display: none;"> </span></p>
    <span fckbookmark="1" style="display: none;"> </span>
    <p>
    <span style="font-family: verdana, geneva, sans-serif; font-size: 14px;">Regards,</span></p>
    <p>
     </p>
    <p>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">ECR Team</span></span></p>
    </body>
    </html>
    FOR c1 IN (select ECR_NAME,PMO_CONTACT, QE_LOE,INFODEV_LOE, DEV_START_DATE, DEV_END_DATE, QE_CONTACT,QE_START_DATE,INFODEV_START_DATE,INFODEV_END_DATE, QE_END_DATE, INFODEV_CONTACT, PDM_CONTACT, DEV_LOE,ECR_PRIORITY, DEV_CONTACT from ECR_NAME WHERE DEV_LOE IS NULL AND ECR_STATUS = 'Effort Estimation is in Progress' AND ECR_PRIORITY <=5)
    LOOP
    l_template := l_base_template;
    l_template:= replace(l_template, '#Contact#', c1.DEV_CONTACT);
    l_template:= replace(l_template, '#ECR_NAME#', c1.ECR_NAME);
    l_template:= replace(l_template, '#p#', c1.ECR_PRIORITY);
    l_template:= replace(l_template, '#PMO#', c1.PMO_CONTACT);
    l_template:= replace(l_template, '#pdm#', c1.PDM_CONTACT);
    l_template:= replace(l_template, '#Dev#', c1.DEV_CONTACT);
    l_template:= replace(l_template, '#QA#', c1.QE_CONTACT);
    l_template:= replace(l_template, '#Info#', c1.INFODEV_CONTACT);
    l_template:= replace(l_template, '#d1#', c1.DEV_START_DATE);
    l_template:= replace(l_template, '#L1#', c1.DEV_LOE);
    l_template:= replace(l_template, '#e1#', c1.DEV_END_DATE);
    l_template:= replace(l_template, '#d2#', c1.QE_START_DATE);
    l_template:= replace(l_template, '#L2#', c1.QE_LOE);
    l_template:= replace(l_template, '#e2#', c1.QE_END_DATE);
    l_template:= replace(l_template, '#d3#', c1.INFODEV_START_DATE);
    l_template:= replace(l_template, '#L3#', c1.INFODEV_LOE);
    l_template:= replace(l_template, '#e3#', c1.INFODEV_END_DATE);
    htmldb_mail.Send(p_to => '[email protected]',
    p_cc => '[email protected]',
    p_from => '[email protected]',
    p_body => l_template,
    p_body_html => l_template,
    p_subj => 'cxxxx:' ||c1.ECR_NAME );
    END LOOP;
    end;
    the when I ran:
    begin
    devloe();
    end;
    I received the mail as well.
    However, when I try to schedule this in the job:
    declare
    JobNo user_jobs.job%TYPE;
    begin
    dbms_job.submit(JobNo, 'BEGIN
    DEVLOE();
    END;', sysdate, 'sysdate + 1/24/60'); commit; end;
    The job status shows failures every minute.
    dbms_job.run(job_no);
    It gave : ORA-00900: invalid SQL statement

    First of all I don't see a procedure header.
    Secondly I see you commit inside your procedure. This is a bug.
    Thirdly I see you also commit inside a loop. This is also a bug, and needs to be removed asap.
    The error indicates a statement doesn't parse. As you don't post the error stack, nor a table definition no one can reproduce the problem.
    You need to isolate the statements, one by one, and run them through sql*plus to see what happens.
    Sybrand Bakker
    Senior Oracle DBA

  • ORA-20091: Invalid Application ID when importing APEX 4.0 Application

    Hi Folks
    Anyone got a suggestion on this one?
    Scenario:
    1. Perform an APEX 4.0 Export of application ID 10132 from one workspace
    2. Import the application into another APEX 4.0 workspace and change the application ID whilst doing so.
    3a. During the import process, override the application ID to one that exists in the workspace being imported into.
    In APEX 3.2 you got a warning that you were overwriting an existing app
    In APEX 3.2 this would then complete the exercise with your new app replacing the previous one with the same ID
    In APEX 4.0 I received ORA-20091: Invalid Application ID
    3b. Delete the pre-existing application (e.g. app_id 999) completely in the workspace we intend to import into
    Following successful deletion of the application (app_id 999) attempt to import the application export file from the other workspace
    During the import, use the UI to change the application id from 10132 to 999.
    Still receive the ORA-20091: Invalid Application ID error despite APP ID 999 having been deleted
    4. I got this to work by allowing APEX to simply assign a new application ID
    My problem is that, whilst this was not a problem when importing to our UAT environment, our DEV and Production environments share the same APP ID (10132) this is so that when upgrading the production application, users saved Interactive reports are preserved. This was fine in APEX 3.2 but is, as yet, untested by us in 4.0.
    As things stand at the moment, we have APEX 4.0 in DEV and UAT but this would appear to be a block for us in terms of upgrading production to 4.0.
    Any thoughts, comments and suggestions welcome.
    Many thanks
    Kind regards
    Simon Gadd

    We ran into a similar problem. My initial tests showed the following to be a work around.
    Assumption: You want to end up with the same ID as the original so you don't have to give a new link to everyone.
    1. Before copying the app (lets say it's 333) from 3.2 (3.1 in our case) export it and then import it back, still in 3.x with a different app ID, i.e. 99333.
    2. In ApEx 4: Import the app 99333 and install it with app ID 333 (the original app ID). After this process, I was able to make necessary changes to the app on ApEx 4, export it, and then import it again, still as ID 333.
    I know this sounds very round-about, and I can't explain why it worked, but it worked.
    Disclaimer: I certainly may have missed something that would still make it break. This was the result of a few different test scenarios done in a limited time.
    So, it's probably best to wait for 4.0.1 if you can.
    By the way, I tried creating a brand new app. in ApEx 4, export it and then import it as itself, and I still got the same error. Like I said, I don't know why it worked, but when I imported an older app with one ID into ApEx 4 with a new ID, I was able to export it and then import it again with that same new ID.
    Have a great weekend,
    Gregory

  • ORA-00900: invalid SQL statement Error while Executing Procedure

    Hi:
    I am trying to execute following procedure through java code, but i am getting ORA-00900: invalid SQL statement error.
    Procedure is :
    <code>
    (vResult out int)
    as
    vCardId varchar2(16);
    vForacid varchar2(16);
    vApp_Entry_No varchar2(10);
    vSrNo number(6);
    vCardStatus char(1);
    vCardStat char(2);
    vExpiryDate date;
    Cursor cardCur1 is
    select u.card_number,trim(u.ACCOUNT_NUMBER),u.CARD_STATUS,to_char(u.EXPIRY_DATE,'dd-MM-yyyy')
    FROM DailyCardData u
    where default_indicator='1'
    and isprocessed = 'N'
    order by expiry_date;
    begin
    vSrNo := 0;
    vResult := 0;
    open cardCur1;
    Loop
    fetch cardCur1 into vCardId,vForacid,vCardStat,vExpiryDate;
    if cardCur1%NOTFOUND then
    exit;
    end if;
    if (vCardStat != null) then
    vCardStatus := 'H';
    elsif (vExpiryDate <= sysdate) then
    vCardStatus := 'E';
    else
    vCardStatus := null;
    end if;
    select a.app_entry_no into vApp_Entry_No from Application a,ApplicationLinkedAccounts l
    where l.foracid = vForacid and l.AcSrNo = '1'
    and a.app_entry_no = l.app_entry_no
    and a.cardid is null
    and a.DOWNLOADFILECREATIONFLAG = 'Y';
    update Application set CardId = vCardId,
    Card_Status = vCardStatus,APPLICATIONPROCESSEDFLAG = 'Y',
    APPLICATIONPROCESSEDdate = DOWNLOADFILECREATIONdate
    where App_Entry_No = vApp_Entry_No;
    commit;
    update DailyCardData set isprocessed = 'Y',app_entry_no = vApp_Entry_No
    where card_number = vCardId;
    commit;
    end Loop;
    close cardCur1;
    vResult := 1;
    end;
    </code>
    Can any body help me in that?
    Thank You,
    Anup

    First of all I don't see a procedure header.
    Secondly I see you commit inside your procedure. This is a bug.
    Thirdly I see you also commit inside a loop. This is also a bug, and needs to be removed asap.
    The error indicates a statement doesn't parse. As you don't post the error stack, nor a table definition no one can reproduce the problem.
    You need to isolate the statements, one by one, and run them through sql*plus to see what happens.
    Sybrand Bakker
    Senior Oracle DBA

  • ORA-00349: failure obtaining block size for '+Z'  in Oracle XE

    Hello,
    I am attempting to move the online redo log files to a new flash recovery area location created on network drive "Z" ( Oracle Database 10g Express Edition Release 10.2.0.1.0).
    When I run @?/sqlplus/admin/movelogs; in SQL*Plus as a local sysdba, I get the following errors:
    ERROR at line 1:
    ORA-00349: failure obtaining block size for '+Z'
    ORA-06512: at line 14
    Please let me know how to go about resolving this issue.
    Thank you.
    See below for detail:
    Connected.
    SQL> @?/sqlplus/admin/movelogs;
    SQL> Rem
    SQL> Rem $Header: movelogs.sql 19-jan-2006.00:23:11 banand Exp $
    SQL> Rem
    SQL> Rem movelogs.sql
    SQL> Rem
    SQL> Rem Copyright (c) 2006, Oracle. All rights reserved.
    SQL> Rem
    SQL> Rem NAME
    SQL> Rem movelogs.sql - move online logs to new Flash Recovery Area
    SQL> Rem
    SQL> Rem DESCRIPTION
    SQL> Rem This script can be used to move online logs from old online
    log
    SQL> Rem location to Flash Recovery Area. It assumes that the database
    SQL> Rem instance is started with new Flash Recovery Area location.
    SQL> Rem
    SQL> Rem NOTES
    SQL> Rem For use to rename online logs after moving Flash Recovery
    Area.
    SQL> Rem The script can be executed using following command
    SQL> Rem sqlplus '/ as sysdba' @movelogs.sql
    SQL> Rem
    SQL> Rem MODIFIED (MM/DD/YY)
    SQL> Rem banand 01/19/06 - Created
    SQL> Rem
    SQL>
    SQL> SET ECHO ON
    SQL> SET FEEDBACK 1
    SQL> SET NUMWIDTH 10
    SQL> SET LINESIZE 80
    SQL> SET TRIMSPOOL ON
    SQL> SET TAB OFF
    SQL> SET PAGESIZE 100
    SQL> declare
    2 cursor rlc is
    3 select group# grp, thread# thr, bytes/1024 bytes_k
    4 from v$log
    5 order by 1;
    6 stmt varchar2(2048);
    7 swtstmt varchar2(1024) := 'alter system switch logfile';
    8 ckpstmt varchar2(1024) := 'alter system checkpoint global';
    9 begin
    10 for rlcRec in rlc loop
    11 stmt := 'alter database add logfile thread ' ||
    12 rlcRec.thr || ' size ' ||
    13 rlcRec.bytes_k || 'K';
    14 execute immediate stmt;
    15 begin
    16 stmt := 'alter database drop logfile group ' || rlcRec.grp;
    17 execute immediate stmt;
    18 exception
    19 when others then
    20 execute immediate swtstmt;
    21 execute immediate ckpstmt;
    22 execute immediate stmt;
    23 end;
    24 execute immediate swtstmt;
    25 end loop;
    26 end;
    27 /
    declare
    ERROR at line 1:
    ORA-00349: failure obtaining block size for '+Z'
    ORA-06512: at line 14
    Can someone point me in the right direction as to what I may be doing wrong here - Thank you!

    888442 wrote:
    I am trying to drop and recreate ONLINE redo logs on my STANDB DATABASE (11.1.0.7)., but i am getting the below error.
    On primary, we have done the changes., ie we added new logfile with bigger size and 3 members. When trying to do the same on Standby we are getting this error.
    Our database is in Active DG Read only mode and the oracle version is 11.1.0.7.
    I have deffered the log apply and cancelled the managed recovery, and dg is in manual mode.
    SQL> alter database Add LOGFILE GROUP 4 ('+DT_DG1','+DT_DG2','+DT_DG3') SIZE 1024M;
    alter database Add LOGFILE GROUP 4 ('+DT_DG1','+DT_DG2','+DT_DG3') SIZE 1024M
    ERROR at line 1:
    ORA-00349: failure obtaining block size for '+DT_DG1'First why you are dropping & recreating online redo log files on standby.
    On standby only standby redo log files will be used. Not sure what you are trying to do.
    here is example how to create online redo log files, Check that diskgroup is mounted and have sufficient space to create.
    sys@ORCL> select member from v$logfile;
    MEMBER
    C:\ORACLE\ORADATA\ORCL\REDO03.LOG
    C:\ORACLE\ORADATA\ORCL\REDO02.LOG
    C:\ORACLE\ORADATA\ORCL\REDO01.LOG
    sys@ORCL> alter database add logfile group 4 (
      2     'C:\ORACLE\ORADATA\ORCL\redo_g01a.log',
      3     'C:\ORACLE\ORADATA\ORCL\redo_g01b.log',
      4     'C:\ORACLE\ORADATA\ORCL\redo_g01c.log') size 10m;
    Database altered.
    sys@ORCL> select member from v$logfile;
    MEMBER
    C:\ORACLE\ORADATA\ORCL\REDO03.LOG
    C:\ORACLE\ORADATA\ORCL\REDO02.LOG
    C:\ORACLE\ORADATA\ORCL\REDO01.LOG
    C:\ORACLE\ORADATA\ORCL\REDO_G01A.LOG
    C:\ORACLE\ORADATA\ORCL\REDO_G01B.LOG
    C:\ORACLE\ORADATA\ORCL\REDO_G01C.LOG
    6 rows selected.
    sys@ORCL>
    Your profile:-
    888442      
         Newbie
    Handle:      888442
    Status Level:      Newbie
    Registered:      Sep 29, 2011
    Total Posts:      12
    Total Questions:      8 (7 unresolved)
    Close the threads if answered, Keep the forum clean.

  • ORA-22275: invalid LOB locator specified

    Hello,
    I use Oracle 11.2.0.3. APEX 4.2.2... Listener 2.0.3 .... Glassfish server 4.0.
    When I run this procedure ( that is used in this tutorial )
    I get ORA-22275: invalid LOB locator specified.
    The error persists over Glass fish 3.0.2, Listener 2.0.1 and 2.0.2.
    Also, I installed this patch 16803775, but to not avail.
    declare
            v_mime  VARCHAR2(48);
            v_length  NUMBER;
            v_file_name VARCHAR2(2000);
            Lob_loc  BLOB;
    BEGIN
            SELECT MIMETYPE, CONTENT, filename,DBMS_LOB.GETLENGTH(content)
                    INTO v_mime,lob_loc,v_file_name,v_length
                    FROM image
                    WHERE id = 70;
                     htp.init;
                  -- set up HTTP header
                        -- use an NVL around the mime type and
                        -- if it is a null set it to application/octect
                        -- application/octect may launch a download window from windows
                        owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
                    -- set the size so the browser knows how much to download
                    htp.p('Content-length: ' || v_length);
                    -- the filename will be used by the browser if the users does a save as
                    htp.p('Content-Disposition:  attachment; filename="'||replace(replace(substr(v_file_name,instr(v_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
                    -- close the headers  
                    owa_util.http_header_close;        
                    owa_util.http_header_close;
                    -- download the BLOB
                    wpg_docload.download_file( Lob_loc );
    end  ;
    Any help pls, in getting that procedure works ?
    Regards,
    Fateh

    replace this statement
    select empty_clob() into c_xml from dual for update;
    with
    dbms_lob.createtemporary(c_xml, TRUE);

  • ORA-29283 invalid file operation

    NLSRTL      10.2.0.5.0     Production
    Oracle Database 10g Enterprise Edition      10.2.0.5.0     64bi
    PL/SQL      10.2.0.5.0     Production
    TNS for IBM/AIX RISC System/6000:      10.2.0.5.0     Productio
    I am trying to get the content of a trace file generated for me.
    Because I don't have privileges to log on the server and copy the trace file for me directly with some os user, I am doing the following:
    1. I alter my session trace identifier to easier identify the trace file
    ALTER SESSION SET TRACEFILE_IDENTIFIER = 'Func01';2. I invoke DBMS_MONITOR
    3. I run the procedure I want to monitor.
    4. I disable the monitoring by calling DBMS_MONITOR
    5. At this point I run the following query to identify my trace file:
    select u_dump.value || '/' || instance.value || '_ora_' || v$process.spid || nvl2(v$process.traceid, '_' || v$process.traceid, null ) || '.trc'"Trace File"
    from V$PARAMETER u_dump
    cross join V$PARAMETER instance
    cross join V$PROCESS
    join V$SESSION on v$process.addr = V$SESSION.paddr
    where 1=1
       and u_dump.name = 'user_dump_dest'
       and instance.name = 'instance_name'
       and V$SESSION.audsid=sys_context('userenv','sessionid');It gives me: /ORACLE/MYDB/trace/MYDB_ora_3616822_Func01.trc
    I have created directory in advanced on the path where the traces are stored:
    CREATE OR REPLACE DIRECTORY trace_dir AS '/ORACLE/MYDB/trace/';
    SELECT * FROM dba_directories WHERE directory_name = 'TRACE_DIR';
    Output:
    OWNER DIRECTORY_NAME DIRECTORY_PATH
    SYS     TRACE_DIR      /ORACLE/MYDB/trace/I don't have rights to grant read, write on TRACE_DIR to my user, as I am not logged with SYS.
    I created a table to store in it the lines from the trace file:
    CREATE TABLE tmp_traces_tab
      callnum NUMBER,
      line NUMBER,
      fileline CLOB
    );Then I run the following PL/SQL block to retrieve the content of the trace and store it in the table T:
    DECLARE
      l_file            UTL_FILE.file_type;
      l_location     VARCHAR2 (100) := 'TRACE_DIR';
      l_filename    VARCHAR2 (255) := 'MYDB_ora_3616822_Func01.trc';
      l_text           VARCHAR2 (32767);
      l_line           NUMBER := 1;
      l_call           NUMBER := 1;
    BEGIN
      -- Open file.
      l_file := UTL_FILE.fopen (l_location, l_filename, 'r', 32767);
      -- Read and output first line.
      UTL_FILE.get_line (l_file, l_text, 32767);
      INSERT INTO tmp_traces_tab (callnum, line, fileline) VALUES (l_call, l_line, l_text);
      l_line := l_line + 1;
      BEGIN
        LOOP
          UTL_FILE.get_line (l_file, l_text, 32767);
           INSERT INTO tmp_traces_tab (callnum, line, fileline) VALUES (l_call, l_line, l_text);
           l_line := l_line + 1;
        END LOOP;
      EXCEPTION
        WHEN NO_DATA_FOUND THEN
          NULL;
      END;
      INSERT INTO tmp_traces_tab (callnum, line, fileline) VALUES (l_call, l_line, l_text);
      l_line := l_line + 1;
      UTL_FILE.fclose (l_file);
    END;
    /And when I run the code I get the error: ORA-29283 invalid file operation.
    Is it possible to a role my user to be able to get the content of the trace files in the directory TRACE_DIR without having explicit READ , WRITE privileges on it?
    My user currently has these roles:
    select * from dba_role_privs where grantee = USER;
    Output:
    U1     OPR_ROLE_LOSS_SNAPSHOT_READER     YES     YES
    U1     RESOURCE     NO     YES
    U1     CONNECT     NO     YES
    U1     DBA     NO     YES
    U1     OPR_ROLE_SUPPORT_USER     YES     YESI know that on another db with different user I hit no errors when doing completely the same (of course the program unit I monitor is different).
    That other user with which I have NO issues has these roles:
    select * from dba_role_privs where grantee = USER;
    Output:
    U2    DBA    NO    YES
    U2    EXEC_SYS_PACKAGES_ROLE    NO    YES
    U2    EXECUTE_CATALOG_ROLE    NO    YES
    U2    CONNECT    NO    YES

    Verdi wrote:
    NLSRTL      10.2.0.5.0     Production
    Oracle Database 10g Enterprise Edition      10.2.0.5.0     64bi
    PL/SQL      10.2.0.5.0     Production
    TNS for IBM/AIX RISC System/6000:      10.2.0.5.0     Productio
    And when I run the code I get the error: ORA-29283 invalid file operation.
    Is it possible to a role my user to be able to get the content of the trace files in the directory TRACE_DIR without having explicit READ , WRITE privileges on it?
    My user currently has these roles:
    select * from dba_role_privs where grantee = USER;
    Output:
    U1     OPR_ROLE_LOSS_SNAPSHOT_READER     YES     YES
    U1     RESOURCE     NO     YES
    U1     CONNECT     NO     YES
    U1     DBA     NO     YES
    U1     OPR_ROLE_SUPPORT_USER     YES     YESI know that on another db with different user I hit no errors when doing completely the same (of course the program unit I monitor is different).
    Thanks for posting version alongwith other details.
    TO my knowledge, No you cannot.
    Privileges acquired via a Role are not valid in PL/SQL. You need to have explicit privileges.

  • Executing Stored Procedure from TOAD: ORA-00900: invalid SQL statement

    Ok…I have ALL the stored procedures converted into Oracle…now, when I go to test them I am getting the vague error of:
    ORA-00900: invalid SQL statement
    I am attempting to execute:
    --EXEC IEXGetAgentSysPerf(to_date('2008/09/01', 'yyyy/mm/dd/'), to_date('2008/09/11', 'yyyy/mm/dd'), 'US HelpDesk');
    EXEC IEXGetAgentSysPerf('9/1/2008', '9/11/2008', 'US HelpDesk');
    (Neither work). These are calling a Stored Procedure with the following header:
         PROCEDURE IEXGetAgentSysPerf (
              v_curparm_IEXGetAgentSysPerf     IN OUT      pkg_IEX.cur_IEXGetAgentSysPerf
              ,v_BDateTime     DATE
              ,v_EDateTime     DATE
              ,v_WorkGroup     VARCHAR2
    The IDE is “TOAD” for Oracle. Thanks in advance.

    Hi,
    This is your procedure
    PROCEDURE IEXGetAgentSysPerf (
    v_curparm_IEXGetAgentSysPerf IN OUT pkg_IEX.cur_IEXGetAgentSysPerf
    ,v_BDateTime DATE
    ,v_EDateTime DATE
    ,v_WorkGroup VARCHAR2
    you are providing the ,v_BDateTime DATE,v_EDateTime DATE and v_WorkGroup
    and how about "v_curparm_IEXGetAgentSysPerf ". So that procedures is returning the error.
    Adding the the earlier post, If you want to test the Stored Procedures... then I say you work on the PL/SQL
    Developer which good for debugging (easy to use...) When compare to TOAD.. :-)
    Test ..it there...
    - Pavan Kumar N

  • Oracle V11.2.0.3 ORA-01578: ORACLE data block corrupted - OBJECT = IDL_UB1$

    Hi,
    I am running into a data corruption issue.
    My database is:
    SQL> select banner from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE 11.2.0.3.0 Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    The following information is written to the alert.log File
    alert.log File
    Mon Nov 07 17:24:12 2011
    Starting ORACLE instance (normal)
    LICENSE_MAX_SESSION = 0
    LICENSE_SESSIONS_WARNING = 0
    Picked latch-free SCN scheme 2
    Using LOG_ARCHIVE_DEST_1 parameter default value as USE_DB_RECOVERY_FILE_DEST
    Autotune of undo retention is turned on.
    IMODE=BR
    ILAT =27
    LICENSE_MAX_USERS = 0
    SYS auditing is disabled
    Starting up:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production.
    ORACLE_HOME = /home/oracle/dbhome
    System name: Linux
    Node name: dbl-ora
    Release: 2.6.18-274.3.1.el5 (This is rhel5.7 or CentOs5.7)
    Version: #1 SMP Tue Sep 6 20:14:03 EDT 2011
    Machine: i686 / vm
    Mon Nov 07 19:42:14 2011
    Corrupt Block Found
    TSN = 0, TSNAME = SYSTEM
    RFN = 1, BLK = 52346, RDBA = 4246650
    OBJN = 225, OBJD = 225, OBJECT = IDL_UB1$, SUBOBJECT =
    SEGMENT OWNER = SYS, SEGMENT TYPE = Table Segment
    Errors in file /home/oracle/diag/rdbms/ora11/K/trace/K_ora_5425.trc (incident=11053):
    ORA-01578: ORACLE data block corrupted (file # 1, block # 52346)
    ORA-01110: data file 1: '/home/oracle/oradata/ora11/system01.dbf'
    Incident details in: /home/oracle/diag/rdbms/ora11/K/incident/incdir_11053/K_ora_5425_i11053.trc
    I was even able to detect the row that is generating the issue.
    In my case the obj# 33573 until 33577 are causing the issue,
    though I have no idea what sort of objects are affected.
    SQL> select * from idl_ub1$ where obj#=33572;
    OBJ# PART VERSION PIECE# LENGTH P
    33572 1 0 0 9032 F
    SQL> select * from idl_ub1$ where obj#=33573;
    ERROR:
    ORA-01578: ORACLE data block corrupted (file # 1, block # 52346)
    ORA-01110: data file 1: '/home/oracle/oradata/ora11/system01.dbf'
    no rows selected
    SQL> select * from idl_ub1$ where obj#=33577;
    ERROR:
    ORA-01578: ORACLE data block corrupted (file # 1, block # 52358)
    ORA-01110: data file 1: '/home/oracle/oradata/ora11/system01.dbf'
    no rows selected
    SQL> select * from idl_ub1$ where obj#=33578;
    OBJ# PART VERSION PIECE# LENGTH P
    33578 1 0 0 9032 F
    Any idea, how to fix this problem without recreating the whole database?
    Thanks in advance.
    wmager
    Edited by: magerxr on Nov 7, 2011 8:27 AM

    magerxr wrote:
    Thanks again for your quick advise.
    Here comes the result of dbv against my system tablespace.
    [oracle@dbl-ora ~]$ dbv FILE=/home/oracle/oradata/ora11/system01.dbf
    DBVERIFY: Release 11.2.0.3.0 - Production on Mon Nov 7 22:39:11 2011
    Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
    DBVERIFY - Verification starting : FILE = /home/oracle/oradata/ora11/system01.dbf
    Page 52346 is influx - most likely media corrupt
    Corrupt block relative dba: 0x0040cc7a (file 1, block 52346)
    Fractured block found during dbv:
    Data in bad block:
    type: 6 format: 2 rdba: 0x0040cc7a
    last change scn: 0x0000.0010acfa seq: 0x1 flg: 0x04
    spare1: 0x0 spare2: 0x0 spare3: 0x0
    consistency value in tail: 0x00000000
    check value in block header: 0x8fda
    computed block checksum: 0xaafbselect owner, segment_type, segment_name from dba_extents
    where file_id = 1 and 52346 between block_id and block_id+blocks-1;
    >
    Page 52347 is marked corrupt
    Corrupt block relative dba: 0x0040cc7b (file 1, block 52347)
    Bad header found during dbv:
    Data in bad block:
    type: 1 format: 6 rdba: 0x0000a206
    last change scn: 0xacfa.0040cc7b seq: 0x10 flg: 0x00
    spare1: 0xfa spare2: 0xac spare3: 0x401
    consistency value in tail: 0x00000000
    check value in block header: 0x0
    block checksum disabled
    select owner, segment_type, segment_name from dba_extents
    where file_id = 1 and 52347 between block_id and block_id+blocks-1;
    Page 52361 is marked corrupt
    Corrupt block relative dba: 0x0040cc89 (file 1, block 52361)
    Bad header found during dbv:
    Data in bad block:
    type: 1 format: 6 rdba: 0x0000a206
    last change scn: 0xacfb.0040cc89 seq: 0x10 flg: 0x00
    spare1: 0xfb spare2: 0xac spare3: 0x401
    consistency value in tail: 0x32298500
    check value in block header: 0x0
    block checksum disabled
    select owner, segment_type, segment_name from dba_extents
    where file_id = 1 and 52361 between block_id and block_id+blocks-1;
    >
    >
    DBVERIFY - Verification complete
    Total Pages Examined : 122880
    Total Pages Processed (Data) : 81298
    Total Pages Failing (Data) : 0
    Total Pages Processed (Index): 22307
    Total Pages Failing (Index): 0
    Total Pages Processed (Other): 3349
    Total Pages Processed (Seg) : 1
    Total Pages Failing (Seg) : 0
    Total Pages Empty : 15910
    Total Pages Marked Corrupt : 16
    Total Pages Influx : 1
    Total Pages Encrypted : 0
    Highest block SCN : 4064615 (0.4064615)post results from 3 SQL above

Maybe you are looking for

  • Greyed out rent and buy buttons on itunes  - using iPad2

    Dear All, Seeking the collective wisdom. I am unable to rent or buy videos from itunes on my iPad2. The "buy it" and rent it" buttons are greyed out. The only feasible explantion so far would have been if there were restrictions on but I have checked

  • Error building schema

    Hi Gurus, I am trying to create a simple synchronous BPEL process from which I am invoking a external webservice deployed on a local oc4j container in my laptop.My external webservice operation takes a complex type as input and returns a complex type

  • ORACLE 6i-Errors REP-0736 / REP-1247-Report works with a different name

    Hi everybody, I have a problem with a Report developed in 6i after I compiled it with Linux. When I run report I had errors REP-0736 and REP-1247. But I didn't had any problem during compilation. The fact is.............if I changed report name (just

  • When I edit image it looks fine but when I save it, it goes all glitchy and some of it is transparent.

    If you do not understand my title, here is a image of it. http://tinypic.com/view.php?pic=2wlr4eo&s=8#.U-Iac9wXdlI So I'm using Photoshop CC, as I said, everything is fine until I save it.

  • Document opening to page 2 rather than 1

    have a pdf manual, where the first page use to be the table of contents, so i bookmarked it. added in a title page later before the table of contents. the document now opens to page 2 (table of contents bookmark) instead of page 1. tried bookmarking