Ora-00385

hi
my physical ram is 8gb
oacle 10g Rel2 -32bit
windows 2003 EE
I have cofigured PAE .even then when i give the vlaue of
db_cache_size as 1gb ,i get an error
'ora-00385 cannot enable very large memory with new buffer cache parameters'
help me solve this problem
regards

Description for this error says:
Error:     ORA-00385 (ORA-385)
Text:     cannot enable Very Large Memory with new buffer cache parameters
Cause:     User specified one or more of { db_cache_size ,
     db_recycle_cache_size, db_keep_cache_size, db_nk_cache_size (where
     n is one of 2,4,8,16,32) } AND use_indirect_data_buffers is set to
     TRUE. This is illegal.
Action:     Very Large Memory can only be enabled with the old
     (pre-Oracle_8.2) parameters.
In my opinion that means, parameters like DB_CACHE_SIZE are not allowed in combination with VLM, you have to use old parameter DB_BLOCK_BUFFERS. You may ask Oracle support for clarification.
Werner

Similar Messages

  • ORA-00385: cannot enable Very Large Memory with new buffer cache 11.2.0.2

    [oracle@bnl11237dat01][DWH11]$ sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.2.0 Production on Mon Jun 20 09:19:49 2011
    Copyright (c) 1982, 2010, Oracle. All rights reserved.
    Connected to an idle instance.
    SQL> startup mount pfile=/u01/app/oracle/product/11.2.0/dbhome_1/dbs//initDWH11.ora
    ORA-00385: cannot enable Very Large Memory with new buffer cache parameters
    DWH12.__large_pool_size=16777216
    DWH11.__large_pool_size=16777216
    DWH11.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
    DWH12.__pga_aggregate_target=2902458368
    DWH11.__pga_aggregate_target=2902458368
    DWH12.__sga_target=4328521728
    DWH11.__sga_target=4328521728
    DWH12.__shared_io_pool_size=0
    DWH11.__shared_io_pool_size=0
    DWH12.__shared_pool_size=956301312
    DWH11.__shared_pool_size=956301312
    DWH12.__streams_pool_size=0
    DWH11.__streams_pool_size=134217728
    #*._realfree_heap_pagesize_hint=262144
    #*._use_realfree_heap=TRUE
    *.audit_file_dest='/u01/app/oracle/admin/DWH/adump'
    *.audit_trail='db'
    *.cluster_database=true
    *.compatible='11.2.0.0.0'
    *.control_files='/dborafiles/mdm_bn/dwh/oradata01/DWH/control01.ctl','/dborafiles/mdm_bn/dwh/orareco/DWH/control02.ctl'
    *.db_block_size=8192
    *.db_domain=''
    *.db_name='DWH'
    *.db_recovery_file_dest='/dborafiles/mdm_bn/dwh/orareco'
    *.db_recovery_file_dest_size=7373586432
    *.diagnostic_dest='/u01/app/oracle'
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=DWH1XDB)'
    DWH12.instance_number=2
    DWH11.instance_number=1
    DWH11.local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=bnl11237dat01-vip)(PORT=1521))))'
    DWH12.local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=bnl11237dat02-vip)(PORT=1521))))'
    *.log_archive_dest_1='LOCATION=/dborafiles/mdm_bn/dwh/oraarch'
    *.log_archive_format='DWH_%t_%s_%r.arc'
    #*.memory_max_target=7226785792
    *.memory_target=7226785792
    *.open_cursors=1000
    *.processes=500
    *.remote_listener='LISTENERS_SCAN'
    *.remote_login_passwordfile='exclusive'
    *.sessions=555
    DWH12.thread=2
    DWH11.thread=1
    DWH12.undo_tablespace='UNDOTBS2'
    DWH11.undo_tablespace='UNDOTBS1'
    SPFILE='/dborafiles/mdm_bn/dwh/oradata01/DWH/spfileDWH1.ora' # line added by Agent
    [oracle@bnl11237dat01][DWH11]$ cat /etc/sysctl.conf
    # Kernel sysctl configuration file for Red Hat Linux
    # For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
    # sysctl.conf(5) for more details.
    # Controls IP packet forwarding
    net.ipv4.ip_forward = 0
    # Controls source route verification
    net.ipv4.conf.default.rp_filter = 1
    # Do not accept source routing
    net.ipv4.conf.default.accept_source_route = 0
    # Controls the System Request debugging functionality of the kernel
    kernel.sysrq = 0
    # Controls whether core dumps will append the PID to the core filename
    # Useful for debugging multi-threaded applications
    kernel.core_uses_pid = 1
    # Controls the use of TCP syncookies
    net.ipv4.tcp_syncookies = 1
    # Controls the maximum size of a message, in bytes
    kernel.msgmnb = 65536
    # Controls the default maxmimum size of a mesage queue
    kernel.msgmax = 65536
    # Controls the maximum shared segment size, in bytes
    kernel.shmmax = 68719476736
    # Controls the maximum number of shared memory segments, in pages
    #kernel.shmall = 4294967296
    kernel.shmall = 8250344
    # Oracle kernel parameters
    fs.aio-max-nr = 1048576
    fs.file-max = 6815744
    kernel.shmmni = 4096
    kernel.sem = 250 32000 100 128
    kernel.shmmax = 536870912
    net.ipv4.ip_local_port_range = 9000 65500
    net.core.rmem_default = 262144
    net.core.rmem_max = 4194304
    net.core.wmem_default = 262144
    net.core.wmem_max = 1048586
    net.ipv4.tcp_wmem = 262144 262144 262144
    net.ipv4.tcp_rmem = 4194304 4194304 4194304
    Please can I know how to resolve this error.

    CAUSE: User specified one or more of { db_cache_size , db_recycle_cache_size, db_keep_cache_size, db_nk_cache_size (where n is one of 2,4,8,16,32) } AND use_indirect_data_buffers is set to TRUE. This is illegal.
    ACTION: Very Large Memory can only be enabled with the old (pre-Oracle_8.2) parameters

  • Windows 32bit OS 에서 Oracle Memory Sizing

    제품 : Database
    작성날짜 : 2007-12-21
    PURPOSE
    Windows 32bit OS 메모리 제약과 Oracle 에서 추가메모리 사용하도록 설정하는 방법을 설명한다.
    CONTENTS
    1. Windows 32bit 메모리 확장 관련 용어들
    2. Windows 32bit 메모리 확장 설정 방법
    3. AWE_WINDOW_MEMORY 파라미터 산정
    4. Windows 에서 Oracle 메모리 사용량 모니터링
    5. Windows 에서 Oracle 메모리 사용량 줄이는 방법
    EXPLANATIONS
    1. Windows 32bit 메모리 확장 관련 용어
    - /3GB
    Windows 32bit OS 에서 메모리 어드레싱은 4GB 까지 가능하고, 이 중 2GB 는 커널이 사용하고
    나머지 2GB 가 사용자 프로세스에게 할당되는 최대 메모리 크기이다. Windows 2000 이상에서는
    /3GB 옵션을 사용하여 커널에 1GB 만 할당하고 나머지 3GB 를 사용자 프로세스에게 할당하여
    2GB 한계를 넘어 메모리를 확장하여 사용할 수 있다. OS 에서는 boot.ini에 /3GB 옵션 추가하고,
    어플리케이션 실행파일 헤더에 IMAGE_FILE_LARGE_ADDRESS_AWARE bit 이 설정되어 있으면 된다.
    Oracle 8.1.7 이상에서는 기본적으로 IMAGE_FILE_LARGE_ADDRESS_AWARE bit 설정되었으므로 3GB
    사용가능하다. 참고로 Windows 64bit OS 는 한 프로세스당 어드레싱 가능한 메모리가 8TB 이므로
    32bit 에서 사용하는 추가적인 옵션들이 필요없다.
    - /PAE (Physical Address Extentions)
    /3GB 옵션과 더불어 32bit 메모리 제약을 넘기위한 방법으로, 가상 메모리내에 포인터 테이블로
    "별도 메모리 영역"을 매개함으로 프로세스가 사용할 수 있는 실제 메모리 크기를 확장한다.
    예를들어 Oracle 은 가상 메모리 2GB 영역 (/3GB 사용하면 3GB) 내에 포인터 테이블(window)만
    저장하고 실제 DB BUFFER CACHE 는 "별도 메모리 영역" 에 할당한 후, BUFFER CACHE 사용시
    포인터 테이블을 매개하여 실제 BUFFER CACHE 영역 사용한다. 여기서 "별도 메모리 영역" 도
    메모리를 사용하는 것이다.
    - AWE (Address Windowing Extensions) & Oracle 구현방식
    AWE 는 PAE 기능을 사용하도록 어플리케이션에 제공된 API 이다.
    AWE API 를 사용한 오라클 버젼들은 아래와 같다.
    * Oracle 8.1.6.x
    * Oracle 8.1.7.x
    * Oracle 9.2.x
    * Oracle 10.1.x
    * Oracle 10.2.x
    주의! 9.1.0.x 는 AWE 지원안됨.
    AWE 구현된 Oracle 버젼들은 3GB 이상의 SGA 사용할 수 있는데, 정확히 말하면 SGA 중 BUFFER CACHE
    영역만 3GB 이상의 "별도 메모리 영역"에 지정할 수 있다. 오라클에서 AWE 를 사용하면 BUFFER CACHE
    사용시 포인터 테이블과 실제 BUFFER CACHE 가 있는 별도 메모리 영역과의 mapping & unmapping
    과정이 추가되므로 기본적인 처리보다 느릴 수 있지만, 적어도 IO 을 줄일 수 있기 때문에
    IO 느린 시스템에서는 성능 향상을 기대할 수 있다.
    2. Windows 32bit 메모리 확장 설정 방법
    - boot.ini 에 /3GB /PAE option 을 추가
    multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000 Advanced Server" /3GB /PAE
    - 오라클 서비스 실행하는 OS USER 에 "Lock memory pages"의 권한 부여
    . Start -> Programs -> Administrative Tools -> Local Security Policy
    (on a Domain Controller, click on 'Domain Security Policy' instead of 'Local Security Policy')
    . Double-click on the 'Lock Pages in memory' policy.
    . Add the appropriate user and click 'Ok'.
    . Restart the OracleService<SID>
    - 포인터 테이블 (window) 크기 지정하는 AWE_WINDOW_MEMORY 를 레지스트리 추가
    . HKEY_LOCAL_MACHINE => Software => Oracle => HomeX 에 AWE_WINDOW_MEMORY=1024000000 추가
    주의! 여러 인스턴스라면 각 Home 에 추가
    - init.ora 에 USE_INDIRECT_DATA_BUFFERS=TRUE 추가하고 DB_BLOCK_BUFFERS 로 BUFFER CACHE 크기 설정
    주의! DB_CACHE_SIZE 로 BUFFER CACHE 지정하면 에러 발생한다.
    ORA-00385: cannot enable Very Large Memory with new buffer cache parameters
    - Oracle10g 에서는 SGA_TARGET=0 설정하여 Automatic Memory Management 를 disable 해야한다.
    3. AWE_WINDOW_MEMORY 크기 계산 방법
    (1) 기본값 : AWE_WINDOW_MEMORY = 1GB
    /PAE /3GB 를 지정해도 아래 메모리들의 총합은 3GB 내에 들어와야한다.
    - AWE_WINDOW_MEMORY
    - BUFFER CACHE 제외한 SGA (shared_pool, large_pool, java_pool, log_buffers ...)
    - Overhead for Oracle.exe DLLs (100MB 정도)
    - Stack space per thread (1MB/thread)
    - PGA and UGA
    결국 BUFFER CACHE 최대 크기는 OS 메모리 - 4GB + AWE_WINDOW_MEMORY 로 산정된다.
    (여기서 4GB는 Oracle이 사용하는 3GB와 OS에서 사용하는 1GB의 합. 결국 이 영역을 제외한 나머지 영역에 buffer cache를 지정하여 사용할 수 있다.)
    예를들어 12GB RAM 시스템에서 최대 BUFFER CACHE 크기= (Total RAM - 4GB + AWE_WINDOW_MEMORY) = 12GB - 4GB + 1GB = 9GB 이다.
    (2) 8.1.7 이하에서는 AWE_WINDOW_MEMORY 최소값 제한이 없었으나,
    Oracle9i R2 부터 최소값보다 작게 설정하면 DB 기동시 에러들이 발생한다.
    ORA-27102 out of memory
    OSD-00034 Message 34 not found; Product=RDBMS;facility =SOSD
    O/S Error: (OS 8) Not enough storage is available to process this command
    AWE_WINDOW_MEMORY 최소값 계산 공식
    a. MIN(AWE_WINDOW_MEMORY)= (4096 * DB_BLOCK_SIZE * DBBLOCK_LRU_LATCHES)/8
    b. DBBLOCK_LRU_LATCHES = (Max buffer pools * SETS_PER_POOL)
    c. Max Buffer Pools = 8 (상수)
    d. SETS_PER_POOL /* USE_INDIRECT_DATA_BUFFERS=TRUE 로 VLM ENABLED */
    SETS_PER_POOL = 2*CPU_COUNT (if VLM is enabled)
    SETS_PER_POOL = CPU Count/2 (if VLM is NOT enabled)
    시나리오 #1:
    # of CPU's = 8
    DB_BLOCK_SIZE = 8192
    Total RAM = 8GB
    SETS_PER_POOL = 2 * CPU_COUNT = 16
    DBBLOCK_LRU_LATCHES = (max buffer Pools * sets_per_pool) = 8*16 = 128
    MIN(AWE_WINDOW_MEMORY) = (4096*DB_BLOCK_SIZE * DBBLOCK_LRU_LATCHES) / 8
    = (4096 * 8192 * 128) / 8 = 536870912 bytes = 512 MB
    시나리오 #2:
    # of CPU's = 16
    DB_BLOCK_SIZE = 8192
    Total RAM = 16 GB
    SETS_PER_POOL = 2 * CPU_COUNT = 32
    DBBLOCK_LRU_LATCHES = (max buffer Pools * sets_per_pool) = 8*32 = 256
    MIN(AWE_WINDOW_MEMORY) = (4096*DB_BLOCK_SIZE * DBBLOCK_LRU_LATCHES) / 8
    = ( 4096 * 8192 * 256) / 8 = 1073741824 bytes = 1024 MB
    주의 !!!
    1. ORA-27102 는 AWE_WINDOW_MEMORY 최소값 이하일때도 발생하지만, BUFFER CACHE 가
    실제 메모리보다 크게 지정된 경우에도 발생한다.
    2. ORA-27102 는 DB_BLOCK_BUFFER < AWE_WINDOW_MEMORY 일때도 발생한다.
    3. AWE_WINDOW_MEMORY 설정값은 "계산된 최소값 + 10 MB (overhead)" 으로 설정해야한다.
    4. Hyperthreading enabled 시스템의 경우 # of CPU's 를 두배로 계산해야한다.
    4. Windows 에서 Oracle 메모리 사용량 모니터링
    TASK MANAGER 에서 VM 값은 정확하지 않으므로 관리도구에서 별도 모니터링해야한다.
    관리도구 => Perfomance 선택 => "추가" => 성능개체:Process, Count:Virtual Bytes, Instance:oracle.exe 선택
    5. Windows 에서 Oracle 메모리 사용량 줄이는 방법
    (1) Oracle 실행파일 스택 크기 조정
    Thread 들이 미리 1MB 스택을 PGA 로 선점하고 필요하게 되면 더 확장해서 사용하는데
    대부분들의 Thread 들은 초기 스택도 사용하지 않는 경우가 많다.
    아래처럼 default=1 MB 를 500 KB로 줄일 수 있다.
    . DB 내린 후 ORACLE_HOME/bin 에서 수행
    C:\OH\bin> orastack oracle.exe 500000
    C:\OH\bin> orastack tnslsnr.exe 500000
    C:\OH\bin> orastack svrmgrl.exe 500000
    (2) Shared Server (pre-Oracle9i 는 MTS 설정) 사용: 세션들이 메모리를 공유하므로 Oracle 프로세스 전체적인 메모리를 줄일 수 있다.
    References
    Note 225349.1 - Implementing Address Windowing Extensions (AWE) or VLM on Windows Platforms
    Note.205089.1 - Oracle and Hyperthreading

    Basically ORA-12154 means, service name can't be found in tnsnames.ora or this file can't be located at all. Are there multiple ORACLE_HOMEs on the machine ? Is the application based on OLEDB running in a different home , NOT in the client's ORACLE_HOME? You may set TNS_ADMIN, pointing to your tnsnames.ora, as global environment variable. So each application on the machine will know this location.
    I'm sure this is not a problem 64bit versus 32bit.
    Werner

  • Failed To Start A Dedicated Server Process

    Hi
    Oracle 9.2
    Windows Advanced OS
    6G Ram
    We switched our server from Shared Server to Dedicated. All was going well, but suddenly no one could log in. Currently logged in users were okay.
    Alert Log showed several of the following errors:
    skgpspawn failed:category = 27143, depinfo = 9261, op = spdcr, loc = skgpspawn
    No errors in the listener.log
    Attempted login with sqlplus reported ORA-12500: TNS:listener failed to start a dedicated server process
    At the time less than 2G of the 6G was being utilized.
    Also, during the time of this event, the event log showed several of the following:
    Event Type:     Error
    Event Source:     Oracle.ACP
    Event Category:     None
    Event ID:     31
    Date:          5/16/2008
    Time:          9:48:59 AM
    User:          N/A
    Computer:     ACP
    Description:
    Unable to begin another thread.
    Any help would be appreciated.
    kd

    Hi Don
    Thanks for the info. I now have the 3GB switch set. I have been leery of setting the indirect buffers due to some posts I have read like these:
    ORA-00385: cannot enable Very Large Memory with new buffer cache parameters
    Cause: User specified one or more of { db_cache_size , db_recycle_cache_size, db_keep_cache_size, db_nk_cache_size (where n is one of 2,4,8,16,32) } AND use_indirect_data_buffers is set to TRUE. This is illegal.
    Action: Very Large Memory can only be enabled with the old (pre-Oracle_8.2) parameters.
    ORA-07305: ksmcsg: illegal database buffer size.
    Cause: The database buffer size must be a multiple of the extended cache mapping size for indirect data buffers to be used.
    Action: Verify that the db_block_size parameter is correct in INIT.ORA, or disable the use_indirect_data_buffers parameter.
    I'm assuming these are 10G and above errors, but I just don't know.
    Our db cache is already at a fairly large size.(see non standard configs below).
    Also, is this an either/or thing. In other words, /3GT OR /PAE and indirect buffers, but not both?
    Thanks again.
    Starting up ORACLE RDBMS Version: 9.2.0.7.0.
    System parameters with non-default values:
    processes = 1350
    sessions = 1490
    resource_limit = FALSE
    license_max_sessions = 0
    shared_pool_size = 268435456
    shared_pool_reserved_size= 26214400
    large_pool_size = 369098752
    pre_page_sga = TRUE
    enqueue_resources = 124
    dbwr_io_slaves = 2
    control_files = E:\orant\admin\OR8i\control1\Contrl1.ctl, E:\orant\admin\OR8i\control1\Contrl3.ctl, E:\orant\admin\OR8i\control2\Contrl2.ctl, E:\orant\admin\OR8i\control2\Contrl4.ctl
    db_block_size = 8192
    db_keep_cache_size = 16777216
    db_cache_size = 503316480
    compatible = 9.2.0
    log_archive_start = TRUE
    log_archive_dest = E:\orant\admin\OR8i\arch
    log_archive_format = ARC%S.%T
    log_buffer = 65536
    log_checkpoint_interval = 0
    log_checkpoint_timeout = 1800
    db_files = 254
    db_file_multiblock_read_count= 8
    dml_locks = 2000
    transactions_per_rollback_segment= 3
    max_rollback_segments = 700
    rollback_segments = roll_1, roll_2, roll_3, roll_4, roll_5, roll_6, roll_7, roll_8, roll_9,
    remote_login_passwordfile= EXCLUSIVE
    license_max_users = 0
    global_names = TRUE
    shared_servers = 0
    max_shared_servers = 0
    session_cached_cursors = 25
    utl_file_dir = *
    job_queue_processes = 2
    background_dump_dest = E:\orant\admin\OR8i\bdump
    user_dump_dest = E:\orant\admin\OR8i\udump
    max_dump_file_size = 50240
    sort_area_size = 1048576
    sort_area_retained_size = 65536
    db_name = EMR
    open_cursors = 450
    optimizer_mode = CHOOSE

  • PL/SQL report errors: ORA-01422

    Hi all,
    (before i you read i would like to say i have searched the net for this error code but nothing shows up like this problem..)
    I am getting an error problem when i select certain Schemas from a list on an apex app. page, it only works for some schemas not all..
    When i select one schema, it is supposed to display one row.. when i select [ALL] it is supposed to show them all.
    It does work if i select '[ALL]' from the select list (p3_schema_name), just not for every single individual one.
    the error code:
    ORA-01422: exact fetch returns more than requested number of rows
    declare
      vSchema  varchar2(20);
      vStmt  varchar2(1000);
      vVersion number(5);
      vDBName  varchar2(20);
      vHostName varchar2(80);
      vStmt2  varchar2(1000);
      vVersion2 number(5);
      vDBName2  varchar2(20);
      vServer2 varchar2(80);
      vSchema2 varchar2(80);
      CURSOR c_schemas IS
        select owner from dba_tables@P3_DB_NAME.db_link where table_name = 'DDL_LOG' and num_rows > 0 order by owner;
    begin
      IF :P3_SCHEMA_NAME != '[ALL]' AND :P3_DB_NAME IS NOT NULL AND :P3_SERVER_NAME IS NOT NULL THEN
        vServer2 := :P3_SERVER_NAME;
        vSchema2 := :P3_SCHEMA_NAME;
          vStmt2 := 'select distinct DDH_DB_NM, max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from &P3_SCHEMA_NAME..ddl_log@&P3_DB_NAME.db_link GROUP BY DDH_DB_NM';
          Execute Immediate vStmt2 into vDBName2, vVersion2;
            htp.p('<br>');
            htp.p('<table border="1">');
            htp.p('<tr>');
            htp.p('<th bgcolor="#FFCC99">SERVER NAME</th>');
            htp.p('<th bgcolor="#FFCC99">DB NAME</th>');
            htp.p('<th bgcolor="#FFCC99">SCHEMA NAME</th>');
            htp.p('<th bgcolor="#FFCC99">PATCH</th>');
            htp.p('</tr>');
            htp.p('<tr>');
            htp.p('<td>');
            htp.p(vServer2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p(vDBName2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p(vSchema2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p(vVersion2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p('<BR>');
            htp.p('</td>');
            htp.p('</tr>');
            htp.p('</tr>');
            htp.p('</table>');
       ELSE IF :P3_SCHEMA_NAME = '[ALL]' AND :P3_DB_NAME IS NOT NULL AND :P3_SERVER_NAME IS NOT NULL THEN
       vHostName := :P3_SERVER_NAME;
       vDBName := :P3_DB_NAME;
         open c_schemas;
          htp.p('<br>');
          htp.p('<table border="1">');
          htp.p('<tr>');
          htp.p('<th bgcolor="#FFCC99">SERVER NAME</th>');
          htp.p('<th bgcolor="#FFCC99">DB NAME</th>');
          htp.p('<th bgcolor="#FFCC99">SCHEMA NAME</th>');
          htp.p('<th bgcolor="#FFCC99">PATCH</th>');
          htp.p('</tr>');
        LOOP
          FETCH c_schemas INTO vSchema;
          EXIT WHEN c_schemas%NOTFOUND;
          vStmt  := 'select max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from '||vSchema||'.ddl_log@&P3_DB_NAME.db_link where DDH_SCHEMA_NR = (select max(DDH_SCHEMA_NR) from '||vSchema||'.ddl_log@&P3_DB_NAME.db_link) and rownum < 2' ;
          Execute Immediate vStmt into vVersion  ;
          htp.p('<tr>');
          htp.p('<td>');
          htp.p(vHostName);
          htp.p('</td>');
          htp.p('<td>');
          htp.p(vDBName);
          htp.p('</td>');
          htp.p('<td>');
          htp.p(vSchema);
          htp.p('</td>');
          htp.p('<td>');
          htp.p(vVersion);
          htp.p('</td>');
          htp.p('<td>');
          htp.p('<BR>');
          htp.p('</td>');
          htp.p('</tr>');
        END LOOP;
          htp.p('</tr>');
          htp.p('</table>');  
      CLOSE c_schemas;
    END IF;
    END IF;
    END;I have checked the DDH_SCHEMA_NR for repeating entries of the highest number.. some of the ones that dont work do have repeating entries some don't.
    Sorry if this is confusing, i have tried to explain it as best as i can.
    Thanks in advance for any help.
    Ashleigh

    Hello Ashleigh,
    Based on your code, I'd start by running this piece of SQL via command-line (thru SQL Workshop, SQL*Plus, Toad, etc.), replacing &P3_SCHEMA_NAME. and &P3_DB_NAME. with values that are currently causing the routine to fail and see if it returns more than one row. I don't know your data, but DISTINCT and GROUP BY are typically used to return multiple (though grouped/summarized) rows. It appears to be the only statement that would cause the error your seeing (more than one row being returned into single variables).
    select distinct DDH_DB_NM, max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from &P3_SCHEMA_NAME..ddl_log@&P3_DB_NAME.db_link GROUP BY DDH_DB_NM;I'm actually surprised that the code runs at all. I didn't think 'execute immediate' would know what to do with substitutions indicated as "&something." (I've typically seen that when substituting in dynamic HTML/Javascript code but maybe I'm learning something new). But since you already have vServer2 and vSchema2, I'd be more apt to code it as:
    vStmt2 := 'select distinct DDH_DB_NM, max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from ' ||
    vSchema2 || '.ddl_log@' || vServer2 || '.db_link GROUP BY DDH_DB_NM';Hope this helps,
    John

  • Ora-00604 error and ora 01000 error while report generation.

    hi all,
    I am trying to generate the multiple reports of same template through a program.
    While this job is running, i get the following error at the BIP console and the reports don't get generated.
    [101711_044115578][][EXCEPTION] java.sql.SQLException: ORA-00604: error occurred
    at recursive SQL level 1
    ORA-01000: maximum open cursors exceeded
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01000: maximum open cursors exceeded
    ORA-01000: maximum open cursors exceeded
    Kindly help.
    Thanks.

    Lots of resources with a simple search to see what this is about, for example:
    http://www.orafaq.com/wiki/ORA-01000
    ORA-01000:     maximum open cursors exceeded
    Cause:     A host language program attempted to open too many cursors. The initialization parameter OPEN_CURSORS determines the maximum number of cursors per user.
    Action:     Modify the program to use fewer cursors. If this error occurs often, shut down Oracle, increase the value of OPEN_CURSORS, and then restart Oracle.
    open_cursors parameter
    http://download.oracle.com/docs/cd/E11882_01/server.112/e25513/initparams160.htm#REFRN10137
    Oracle support note:
    OERR: ORA-1000 maximum open cursors exceeded (Doc ID 18591.1)

  • EA2: ORA-01427 clicking on a view in the navigator

    SQLDev: 1.5.0.52.03
    Java: 1.6.0_04
    Oracle: 9.2.0.7.0
    I'm getting the following error when I click on a view in the navigator pane:
    An error was encountered performing the requested operation:
    ORA-01427: single-row subquery returns more than one row 01427. 00000 - "single-row subquery returns more than one row"I'm not seeing any errors in the shell window.
    After clicking on <OK> in the error dialog, the normal tabs (Columns, Data, Grants, Dependencies, Details, SQL) are displayed, but there is no content in the Columns tab.
    All the other tabs seem to function normally.
    Here is the DDL from the SQL tab
    CREATE OR REPLACE VIEW "SUBSCRIPTIONS"
        "ORDER_ID", "SUNBURST_ORDER_ID", "SIEBEL_ORDER_ID", "ACCOUNT_ID",
        "COMP_ID", "SUBACCOUNT_ID", "START_DATE", "END_DATE", "PULL_DATE",
        "SUBSCRIPTION_TYPE", "PRICE_CLASS", "DESCRIPTION", "SEAT_COUNT",
        "ORDER_DURATION", "CALLBACK_INTERVAL", "UPDATE_DATE", "UPDATE_USERNAME",
        "AFFILIATE"
    AS
        SELECT order_id,
            sunburst_order_id,
            siebel_order_id,
            account_id,
            comp_id,
            subaccount_id,
            start_date,
            end_date,
            pull_date,
            product_id,
            price_class,
            product_name,
            add_users,
            order_duration,
            callback_interval,
            last_mdfy_date,
            last_mdfy_emp,
            affiliate
        FROM csbcrossworlds.subscriptions;We have 15 views in this schema, 3 of them fail this way but the other 12 display the columns just fine. So far I am unable to detect any commonality.
    Any ideas?

    Ok, I think I found the problem. The view in question (SUBSCRIPTIONS) is owned by 'PHILC' and it references a table named 'SUBSCRIPTIONS' owned by 'CSBCROSSWORLDS'. There are two other development schemas that also own tables named 'SUBSCRIPTIONS'.
    I believe the 'Columns' tab is executing the query below. The subquery in this SQL tries to identify the primary key columns for the 'SUBSCRIPTIONS' view in my schema (PHILC):
    SELECT
        c.column_name,
        DECODE(
            data_type,
                'CHAR',      data_type||'('||c.data_length||')',
                'VARCHAR',   data_type||'('||c.data_length||')',
                'VARCHAR2',  data_type||'('||c.data_length||')',
                'NCHAR'   ,  data_type||'('||c.data_length||')',
                'NUMBER'  ,  DECODE(c.data_precision,null,'NUMBER', data_type||'('||c.data_precision||','||c.data_SCALE||')'),
                'NVARCHAR',  data_type||'('||c.data_length||')',
                'NVARCHAR2', data_type||'('||c.data_length||')',
                data_type) data_type,
        DECODE(nullable, 'Y', 'Yes', 'No') nullable,
        c.DATA_DEFAULT,
        column_id,
        com.comments,
        (SELECT 1 FROM all_constraints, all_cons_columns
          WHERE all_constraints.constraint_type = 'P' AND
                all_constraints.constraint_name = all_cons_columns.constraint_name AND
                all_constraints.owner = all_cons_columns.owner AND
                all_cons_columns.table_name = c.table_name AND
                c.column_name = all_cons_columns.column_name) Primary_Key,
        c_update.insertable,
        c_update.updatable,
        c_update.deletable
    FROM
        sys.all_tab_Columns c, sys.all_col_comments com, sys.user_updatable_columns c_update
    WHERE
        c.owner = :OBJECT_OWNER AND
        c.table_name = :OBJECT_NAME AND
        c.table_name = com.table_name AND
        c.owner = com.owner AND
        c.column_name = com.column_name AND
        c_update.column_name = com.column_name AND
        c_update.table_name = com.table_name
    ;Extracting the subquery into this:
    SELECT
        all_constraints.owner,
        all_constraints.table_name,
        all_constraints.constraint_name
    FROM all_constraints, all_cons_columns
    WHERE
        all_constraints.constraint_type = 'P' AND
        all_constraints.constraint_name = all_cons_columns.constraint_name AND
        all_constraints.owner = all_cons_columns.owner and
        all_cons_columns.table_name = 'SUBSCRIPTIONS' and
        'ORDER_ID' = all_cons_columns.column_name;I got this output:
       owner          table_name      constraint_name
    CUTOVER          SUBSCRIPTIONS    SUBSCRIPTIONS_PK
    CROSSWORLDS      SUBSCRIPTIONS    SUBSCRIPTIONS_PK
    CSBCROSSWORLDS   SUBSCRIPTIONS    SUBSCRIPTIONS_PKLooking at the DDL for the view, the row we really want is for owner 'CSBCROSSWORLDS'. Unfortunately, that means having to somehow parse the SQL text to extract the owner name...
    Phil

  • Using database-link in view to get around ORA-01031 error

    I have been granted select rights on a users table. I am therefore able to select from his table. If however I try create a view against his table I run into the ORA-01031 problem. I have worked around this problem by creating a database-link to myself and then adding that to the view creation and it works. What are the downsides of using the database-link in this way?

    The only down side I have been able to identify is that a extra session is created and that the CPU has a little extra work due to the LOOP BACK that takes place. I need to ensure the network is not unnessesarly used and therefore will need to ensure that 127.0.0.1 (local host) is used in the database connection discription. e.g.
    create database link my_db_link connect to scott identified by tiger using '(description=(address=(protocol=tcp)(host=127.0.0.1) (Port = 1521) ) (connect_data= (sid=ora10g)))';

  • Getting ora:00904 invalid indentifier error while running i query

    Hi,
    I have a remote database and local database both are oracle 10gR2.Now i have written the below mentioned query in my local database and is working fine,but in case remote database it is throughing error ora:00904 invalid indentifier.
    I had export the dump from remote db and import it on my local db and i tried the same and it is working fine on local after that also.
    As i believe that this error usually come for column name not exist or column name or it's length or for any special character in column name of the table.But as i said it is working fine on local db but not in remote db though i am using the same dump for local and remote.
    Though when i am querying the table i can able to fetch data for the any record but when i am using the below mentioned query for the same i am getting the error.As i am doing this to fecth the data for child parent related relationship.
    Can any one suggest is there anything related to configaration or something else.
    Please do let me know if you do want some more information on the query what i am doing inside of it.
    Rgds,
    Anit
    Edited by: Anit A. on Sep 1, 2008 2:32 AM
    Edited by: Anit A. on Sep 1, 2008 2:33 AM

    WITH t
    AS
    SELECT decode(t.spnlevel
    ,3,t.u_quotesdtlid
    ,2,decode((select count(*)
    from u_quotesdtl t2
    where t2.u_quotesdtlid = t.u_quotesdtlid
    and t2.parentspn = (t2.jobgroupid||':'||t2.jobtype)
    ),0,(select t1.u_quotesdtlid
    from u_quotesdtl t1
    where t1.spnitemcode = t.parentspn
    and t1.spnlevel = '3'
    and t1.jobtype = t.jobtype
    and t1.jobgroupid = t.jobgroupid
    and t1.QUOTEID = t.QUOTEID
    ),t.u_quotesdtlid
    ,1,decode((select count(*)
    from u_quotesdtl t2
    where t2.QUOTEID = t.QUOTEID
    and t2.parentspn = (t2.jobgroupid||':'||t2.jobtype)
    ),0,t.u_quotesdtlid,decode((select count(*)
    from u_quotesdtl t3
    where t3.QUOTEID = t.QUOTEID
    and t3.parentspn = (t3.jobgroupid||':'||t3.jobtype)
    and t3.u_quotesdtlid in (select t1.u_quotesdtlid
    from u_quotesdtl t1
    where t1.spnitemcode = t.parentspn
    and t1.spnlevel = '2'
    and t1.jobtype = t.jobtype
    and t1.jobgroupid = t.jobgroupid
    and t1.QUOTEID = t.QUOTEID
    ),0,(select t4.u_quotesdtlid
    from u_quotesdtl t4
    ,(select t1.parentspn
    ,t1.jobtype
    ,t1.jobgroupid
    from u_quotesdtl t1
    where t1.spnitemcode = t.parentspn
    and t1.spnlevel = '2'
    and t1.jobtype = t.jobtype
    and t1.jobgroupid = t.jobgroupid
    and t1.QUOTEID = t.QUOTEID
    ) t5
    where t4.spnitemcode = t5.parentspn
    and t4.spnlevel = '3'
    and t4.jobtype = t5.jobtype
    and t4.jobgroupid = t5.jobgroupid
    and t4.QUOTEID = t.QUOTEID
    (select t1.u_quotesdtlid
    from u_quotesdtl t1
    where t1.spnitemcode = t.parentspn
    and t1.spnlevel = '2'
    and t1.jobtype = t.jobtype
    and t1.jobgroupid = t.jobgroupid
    and t1.QUOTEID = t.QUOTEID
    ,null,t.u_quotesdtlid) as parentquoteid
    ,t.u_quotesdtlid as quotesdtlid
    ,t.spnlevel as spnlevel
    FROM u_quotesdtl t
    WHERE t.QUOTEID ='som key id'
    ORDER BY parentquoteid,t.spnlevel desc
    select * from t;

  • 'ORA-01722: Invalid Number' error while Running a Query

    Hi,
    I'm trying to run a query built on a DSO. The DSO has a field 'Start Date'. This Start Date InfoObject has a reference Char as 0DATE.
    This Start Field has blank values due to which I'm getting the ORA-01722 error. I came across many threads with same topic of discussion. As mentioned in one of the Threads I have written a program to update 'Start Date' with 00000000. The code wriiten is "UPDATE /BIC/AZ_MONINV00 SET /BIC/ZSTR_DTE = '00000000' where /BIC/ZSTR_DTE = ' '.
    Now when I see the data in the active data table of DSO the blank value is replaced with '00000000'.
    But If I right click on the DSO click on display data the 'Start Date' field is blank. And now the Query also gets executed without any error. But in the output of the query the 'Start Date' Field has "#" values.
    Can anyone suggest on how can I make these "#" values appear as 00000000 in the report?

    In this case, you have to write a macro to avoid # in Analyzer.
    Right Click-->Display Data will show data from Active table of DSO only.
    If you don't want to show any blank date values in the report, you can exclude in Filter in Query.

  • ORA-12712 error while changing nls character set to AL32UTF8

    Hi,
    It is strongly recommend to use database character set AL32UTF8 when ever a database is going to used with our XML capabilities. The database character set in the installed DB is WE8MSWIN1252. For making use of XML DB features, I need to change it to AL32UTF8. But, when I try doing this, I'm getting ORA-12712: new character set must be a superset of old character set. Is there a way to solve this issue?
    Thanks in advance,
    Divya.

    Hi,
    a change from we8mswin1252 to al32utf8 is not directly possible. This is because al32utf is not a binary superset of we8mswin1252.
    There are 2 options:
    - use full export and import
    - Use of the Alter in a sort of restricted way
    The method you can choose depends on the characters in the database, is it only ASCII then the second one can work, in other cases the first one is needed.
    It is all described in the Support Note 260192.1, "Changing the NLS_CHARACTERSET to AL32UTF8 / UTF8 (Unicode)". Get it from the support/metalink site.
    You can also read the chapters about this issue in the Globalization Guide: [url http://download.oracle.com/docs/cd/E11882_01/server.112/e10729/ch11charsetmig.htm#g1011430]Change characterset.
    Herald ten Dam
    http://htendam.wordpress.com

  • While updating a table i am getting ORA-00600 error.

    Hi all,
    While updating a table i am getting the following:
    **SQL Error: ORA-00600: internal error code, arguments: [qkebCreateConstantOpn1], [], [], [], [], [], [], [], [], [], [], []**
    **00600. 00000 - "internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]"**
    I am not getting how to proceed on this. Please guide me.
    Thanks,
    Ritesh

    While performing some unspecified action (no DML) on an unknown table (no DDL) in an unknown version and edition of the Oracle database you had an untrapped Oracle exceptions.
    There are too many unknowns to help you beyond recommending you open an SR at MyOracleSupport.

  • Error while adding Image: ORA-00001: unique constraint

    Dear all,
    I have an error while adding images to MDM I can´t explain. I want to add 7231 images. About 6983 run fine. The rest throws this error.
    Error: Service 'SRM_MDM_CATALOG', Schema 'SRMMDMCATALOG2_m000', ERROR CODE=1 ||| ORA-00001: unique constraint (SRMMDMCATALOG2_M000.IDATA_6_DATAID) violated
    Last CMD: INSERT INTO A2i_Data_6 (PermanentId, DataId, DataGroupId, Description_L3, CodeName, Name_L3) VALUES (:1, :2, :3, :4, :5, :6)
    Name=PermanentId; Type=9; Value=1641157; ArraySize=0; NullInd=0;
    Name=DataId; Type=5; Value=426458; ArraySize=0; NullInd=0;
    Name=DataGroupId; Type=4; Value=9; ArraySize=0; NullInd=0;
    Name=Description_L3; Type=2; Value=; ArraySize=0; NullInd=0;
    Name=CodeName; Type=2; Value=207603_Img8078_gif; ArraySize=0; NullInd=0;
    Name=Name_L3; Type=2; Value=207603_Img8078.gif; ArraySize=0; NullInd=0;
    Error: Service 'SRM_MDM_CATALOG', Schema 'SRMMDMCATALOG2_m000', ERROR CODE=1 ||| ORA-00001: unique constraint (SRMMDMCATALOG2_M000.IDATA_6_DATAID) violated
    Last CMD: INSERT INTO A2i_Data_6 (PermanentId, DataId, DataGroupId, Description_L3, CodeName, Name_L3) VALUES (:1, :2, :3, :4, :5, :6)
    Name=PermanentId; Type=9; Value=1641157; ArraySize=0; NullInd=0;
    Name=DataId; Type=5; Value=426458; ArraySize=0; NullInd=0;
    Name=DataGroupId; Type=4; Value=9; ArraySize=0; NullInd=0;
    Name=Description_L3; Type=2; Value=; ArraySize=0; NullInd=0;
    Name=CodeName; Type=2; Value=207603_Img8085_gif; ArraySize=0; NullInd=0;
    Name=Name_L3; Type=2; Value=207603_Img8085.gif; ArraySize=0; NullInd=0;
    I checked all data. There is no such dataset in the database. Can anybody give me a hint how to avoid this error.
    One thing I wonder: The PermanentId is allways the same but I can´t do anything here.
    BR
    Roman
    Edited by: Roman Becker on Jan 13, 2009 12:59 AM

    Hi Ritam,
    For such issues, can you please create a new thread or directly email the author rather than dragging back up a very old thread, it is unlikely that the resolution would be the same as the database/application/etc releases would most probably be very different.
    For now I will close this thread as unanswered.
    SAP SRM Moderators.

  • ORA-600 [17069] error while running catrelod.sql to downgrade 11g database

    Hi,
    We are downgrading our 11.2.0.2 database to 10.2.0.4. We have successfullly run catdwgrd.sql without any errors in 11g env. While running catrelod.sql in 10g env we are facing the following error:
    SQL> @?/rdbms/admin/catrelod.sql
    TIMESTAMP
    COMP_TIMESTAMP RELOD__BGN 2013-04-24 20:15:39 2456407 72939
    DOC>#######################################################################
    DOC>#######################################################################
    DOC>  The following statement will cause an "ORA-01722: invalid number"
    DOC>  error if the database server version is not 10.0.0.
    DOC>  Shutdown ABORT and use a different script or a different server.
    DOC>#######################################################################
    DOC>#######################################################################
    DOC>#
    no rows selected
    DOC>#######################################################################
    DOC>#######################################################################
    DOC>  The following statement will cause an "ORA-01722: invalid number"
    DOC>  error if the database has not been opened for MIGRATE.
    DOC>
    DOC>  Perform a "SHUTDOWN ABORT"  and
    DOC>  restart using MIGRATE.
    DOC>#######################################################################
    DOC>#######################################################################
    DOC>#
    no rows selected
    Session altered.
    Session altered.
    no rows selected
    DECLARE
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [17069], [0x170FB8CA8], [], [], [],
    [], [], []I have checked the trace file in udump but it dint give any readable information.
    Please find below environment details.
    OS : RHEL 5 64 bit
    11g Database : 11.2.0.2
    10g Database : 10.2.0.4
    Kindly assist.

    KR10822864 wrote:
    Whenever an ORA-600 error is raised a trace file is generated and an entry written to the alert.log with details of the trace file location. Starting with Oracle Database 11g Release 1, the diagnosability infrastructure was introduced which places the trace and core files into a location controlled by the DIAGNOSTIC_DEST initialization parameter when an incident, such as an ORA-600 is created. For earlier versions, the trace file will be written to either USER_DUMP_DEST (if the error was caught in a user process) or BACKGROUND_DUMP_DEST (if the error was caught in a background process like PMON or SMON). The trace file contains vital information about what led to the error condition
    please post 40 lines of alert log info .
    MOS Note:ORA-600 [17069] "Failed to pin a library cache object after 50 attempts" [ID 39616.1]
    "Look in the trace file for the text 'LIBRARY OBJECT HANDLE: handle=170fb8ca8'"
    if not found any massages like above please raise [email protected].
    Hi KR,
    Thanks for your help. As suggested I have checked the trace file to search and found the below info. I suppose it is some kind of lock but not sure about it. Please let me know if the following makes sense:
        SO: 0x21158a6e0, type: 3, owner: 0x211006f28, flag: INIT/-/-/0x00
        (call) sess: cur 211572570, rec 211572570, usr 211572570; depth: 0
          SO: 0x21158a9b8, type: 3, owner: 0x21158a6e0, flag: INIT/-/-/0x00
          (call) sess: cur 211572570, rec 0, usr 211572570; depth: 1
            SO: 0x1727a2618, type: 54, owner: 0x21158a9b8, flag: INIT/-/-/0x00
            LIBRARY OBJECT PIN: pin=1727a2618 handle=170fb8ca8 mode=S lock=171243e98
            user=211572570 session=211572570 count=1 mask=001d savepoint=0x43 flags=[00]
            SO: 0x171243e98, type: 53, owner: 0x21158a9b8, flag: INIT/-/-/0x00
            LIBRARY OBJECT LOCK: lock=171243e98 handle=170fb8ca8 mode=S
            call pin=0x1727a2618 session pin=(nil) hpc=0000 hlc=0000
            htl=0x171243f18[0x17278a310,0x17278a310] htb=0x17278a310 ssga=0x172789928
            user=211572570 session=211572570 count=1 flags=PNC/[0400] savepoint=0x43
            LIBRARY OBJECT HANDLE: handle=170fb8ca8 mtx=0x170fb8dd8(0) cdp=0
            name=SYS.STANDARD
            hash=51570e225ed8a9a803b7318f191e0a8d timestamp=04-18-2006 00:00:00
            namespace=TABL flags=KGHP/TIM/SML/[02000000]
            kkkk-dddd-llll=0000-001d-001d lock=S pin=S latch#=3 hpc=0004 hlc=0004
            lwt=0x170fb8d50[0x170fb8d50,0x170fb8d50] ltm=0x170fb8d60[0x170fb8d60,0x170fb8d60]
            pwt=0x170fb8d18[0x170fb8d18,0x170fb8d18] ptm=0x170fb8d28[0x170fb8d28,0x170fb8d28]
            ref=0x170fb8d80[0x170fb8d80,0x170fb8d80] lnd=0x170fb8d98[0x170f05b50,0x170fa6858]
              LIBRARY OBJECT: object=170e82de8
              type=PCKG flags=EXS/LOC[0005] pflags=NST/IVR[0201] status=VALD load=0
              DATA BLOCKS:
              data#     heap  pointer    status pins change whr
                  0 170e831f8 170e82fc0 I/P/A/-/-    0 NONE   00
          SO: 0x21158e470, type: 5, owner: 0x21158a6e0, flag: INIT/-/-/0x00
          (enqueue) CU-70E88BC0-00000001    DID: 0001-001F-00000004
          lv: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  res_flag: 0x2
          res: 0x17677adc8, mode: X, lock_flag: 0x0
          own: 0x211572570, sess: 0x211572570, proc: 0x211006f28, prv: 0x17677add8
          SO: 0x177f82c28, type: 59, owner: 0x21158a6e0, flag: INIT/-/-/0x00
          cursor enqueue
          child: 170e89348, flag: 53, number: 0
          parent: 170e89738

  • Ora-00604,ora-01422 error while dropping the table

    Hi gurus,
    I am using Oracle 10g R2 on windows 2000 platform,while dropping the table the following error occured.
    ORA-00604 : error occurred at recursive sql level 1.
    ORA-01422: exact fetch returns more than requested number of rows.
    Need urgent help.
    Thanks in advance

    Is there an AFTER EVENT trigger defined on this database? Can you check that?
    Secondly, was this database migrated from earlier version? I remember having seen this problem on 9i (it was 9.2.0.1 or 9.2.0.2; I can't recall exactly).

Maybe you are looking for