RESOURCE_NAME : cmtcallbk

Hi all and happy new year!
Could someone tell me that is the RESOURCE_NAME cmtcallbk in v$resource_limit.
I have the following value:
RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_AL LIMIT_VALU
cmtcallbk 4294966174 4294967295 6600 UNLIMITED

I like to provide you better link ...
source
http://download.oracle.com/docs/cd/B32110_01/web.1013/b28221/undejdev008.htm#CHDFGGDC
CMT - container manged transactions
CALLBK - it is kind of roll back.
Edited by: CKPT on Jan 4, 2011 1:59 PM

Similar Messages

  • Values or size when  RESOURCE_NAME equal to LIMIT=DEFAULT

    For audit work, are asking me to place the boundary values which are as DEFAULT, which belongs to RESOURCE_NAME parameters. I do not remember if unlimited or if I can see the default values in some way. Thanks in advance!
    PROFILE RESOURCE_NAME          RESOURCE_TYPE     LIMIT
    SOB_PROFILE FAILED_LOGIN_ATTEMPTS     PASSWORD          UNLIMITED
    SOB_PROFILE PRIVATE_SGA          KERNEL          DEFAULT
    SOB_PROFILE CONNECT_TIME          KERNEL          DEFAULT
    SOB_PROFILE IDLE_TIME               KERNEL          DEFAULT
    SOB_PROFILE LOGICAL_READS_PER_CALL     KERNEL          DEFAULT
    SOB_PROFILE LOGICAL_READS_PER_SESSION     KERNEL          DEFAULT
    SOB_PROFILE CPU_PER_CALL          KERNEL          DEFAULT
    SOB_PROFILE CPU_PER_SESSION          KERNEL          DEFAULT
    SOB_PROFILE SESSIONS_PER_USER          KERNEL          DEFAULT

    11gR2 SQL Reference - CREATE PROFILE
    If you set a limit to DEFAULT for a profile then it will use the corresponding value from the DEFAULT profile.

  • Error while running commands at RMAN prompt

    Hi ,
    We have a few oracle 10g(10.2.0.3) databases on AIX platform.We use RMAN backup with a recovery catalog database.
    The rman full(level 0)backups are scheduled dailly and running fine.When I tried to run commands like 'list backup','report obsolete' I'm getting the following errors.
    connected to target database: TICSPROD (DBID=2626621498)
    connected to recovery catalog database
    RMAN> report obsolete;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to redundancy 3
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of report command at 08/04/2011 07:49:36
    RMAN-06004: ORACLE error from recovery catalog database: ORA-03113: end-of-file on communication channel
    ORACLE error from recovery catalog database: ORA-03114: not connected to ORACLE
    RMAN> list backup;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of list command at 08/04/2011 07:56:25
    RMAN-06004: ORACLE error from recovery catalog database: ORA-03113: end-of-file on communication channel
    ORACLE error from recovery catalog database: ORA-03114: not connected to ORACLE
    But the recovery catalog database is up and running fine.For few other databases I'm able to run the above commands without errors and for some databases I'm getting the errors as mentioned above.
    Could someone help me out with this...

    Thanks Tycho for your reply.
    Please find the output of the query in recovery catalog.
    SQL> select * from v$resource_limit;
    RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_AL LIMIT_VALU
    processes 49 83 5000 5000
    sessions 30 63 5505 5505
    enqueue_locks 27 94 65910 65910
    enqueue_resources 27 73 24440 UNLIMITED
    ges_procs 0 0 0 0
    ges_ress 0 0 0 UNLIMITED
    ges_locks 0 0 0 UNLIMITED
    ges_cache_ress 0 0 0 UNLIMITED
    ges_reg_msgs 0 0 0 UNLIMITED
    ges_big_msgs 0 0 0 UNLIMITED
    ges_rsv_msgs 0 0 0 0
    gcs_resources 0 0 0 0
    gcs_shadows 0 0 0 0
    dml_locks 0 76 24220 UNLIMITED
    temporary_table_locks 0 3 UNLIMITED UNLIMITED
    transactions 1 10 6055 UNLIMITED
    branches 0 0 6055 UNLIMITED
    cmtcallbk 0 1 6055 UNLIMITED
    sort_segment_locks 0 5 UNLIMITED UNLIMITED
    max_rollback_segments 11 11 6055 65535
    max_shared_servers 20 20 800 800
    parallel_max_servers 0 32 320 3600
    22 rows selected.
    The alert log of the catalog database is continously getting refreshed with the following message.
    Incremental checkpoint up to RBA [0x3b3.a780.0], current log tail at RBA [0x3b3.a78f.0]
    Mon Aug 8 00:16:17 2011
    Incremental checkpoint up to RBA [0x3b3.abf8.0], current log tail at RBA [0x3b3.ac4f.0]
    Mon Aug 8 00:46:19 2011
    Incremental checkpoint up to RBA [0x3b3.1451b.0], current log tail at RBA [0x3b3.1451b.0]
    Mon Aug 8 01:16:21 2011
    Incremental checkpoint up to RBA [0x3b3.14b15.0], current log tail at RBA [0x3b3.14baa.0]
    Mon Aug 8 01:46:23 2011
    Incremental checkpoint up to RBA [0x3b3.14be1.0], current log tail at RBA [0x3b3.14bf0.0]
    Mon Aug 8 02:16:25 2011
    Incremental checkpoint up to RBA [0x3b3.15069.0], current log tail at RBA [0x3b3.150a9.0]
    Mon Aug 8 02:46:27 2011
    Incremental checkpoint up to RBA [0x3b3.150ed.0], current log tail at RBA [0x3b3.150ed.0]
    What could be the potential cause of the issue I'm facing .Could you please guide me...

  • Db parameters on 10.2.0.4 running Ebs11i

    Hi Oracle world,
    I've got the following parameters set of for the db running Ebs 11.5.10 on Sun Solaris Sparc.
    The version of the database is 10.2.0.4.. I just wanted t find out if this parameters
    are set correctly or not. Thanks in advance
    processes = 600 # Max. no. of users x 2
    sessions = 400 # 2 X processes
    db_files = 512 # Max. no. of database files
    dml_locks = 10000
    cursor_sharing = EXACT # Required 11i settting
    open_cursors = 600 # Consumes process memory, unless using MTS.
    session_cached_cursors = 500
    regards
    Sbu

    Hi Rajesh
    SQL> select * from v$resource_limit;
    RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION
    INITIAL_ALLOCATION LIMIT_VALUE
    processes 146 154
    600 600
    sessions 154 164
    665 665
    enqueue_locks 131 163
    8398 8398
    RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION
    INITIAL_ALLOCATION LIMIT_VALUE
    enqueue_resources 134 163
    10532 UNLIMITED
    ges_procs 0 0
    0 0
    ges_ress 0 0
    0 UNLIMITED
    RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION
    INITIAL_ALLOCATION LIMIT_VALUE
    ges_locks 0 0
    0 UNLIMITED
    ges_cache_ress 0 0
    0 UNLIMITED
    ges_reg_msgs 0 0
    0 UNLIMITED
    RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION
    INITIAL_ALLOCATION LIMIT_VALUE
    ges_big_msgs 0 0
    0 UNLIMITED
    ges_rsv_msgs 0 0
    0 0
    gcs_resources 0 0
    0 0
    RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION
    INITIAL_ALLOCATION LIMIT_VALUE
    gcs_shadows 0 0
    0 0
    dml_locks 2 59
    10000 UNLIMITED
    temporary_table_locks 0 8
    UNLIMITED UNLIMITED
    RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION
    INITIAL_ALLOCATION LIMIT_VALUE
    transactions 295 4294967295
    731 UNLIMITED
    branches 0 0
    731 UNLIMITED
    cmtcallbk 0 4
    731 UNLIMITED
    RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION
    INITIAL_ALLOCATION LIMIT_VALUE
    sort_segment_locks 1 7
    UNLIMITED UNLIMITED
    max_rollback_segments 31 31
    731 65535
    max_shared_servers 0 0
    UNLIMITED UNLIMITED
    RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION
    INITIAL_ALLOCATION LIMIT_VALUE
    parallel_max_servers 0 8
    8 3600
    22 rows selected.

  • OGG ABEND TNS:internal limit restriction exceeded

    I Want to determine the cause..error
    Stopped Primary Extract.
    command START EXTA....
    but EXTA error occurred.
    EXTA error log ..............................................................................
    ERROR   OGG-00665  Oracle GoldenGate Capture for Oracle, exta.prm:  OCI Error during OCIServerAttach (status = 12540-ORA-12540: TNS:internal limit restriction exceeded), SQL<Not available>.
    a few minutes later starting process again. then Extract was started.
    at the time swap memoery was full.
    these phenomena are related to the OGG ?
    DB error log.................................................................................
    TNS-12500: TNS:listener failed to start a dedicated server process
    TNS-12540: TNS:internal limit restriction exceeded
      TNS-12560: TNS:protocol adapter error
       TNS-00510: Internal limit restriction exceeded
        Solaris Error: 12: Not enough space

    Thanks for comming back.
    while this issue happens login to db directly even as sysdba takes a while and could not even view listener status. I tried to kill some of the processes base on below cmd.
    ps -eaf|grep LOCAL
    then I am able to connect to db , also Listener responds.
    i also noticed queuesize was set on listener.ora and removed it , and set the trace levels to 10.
    Listener has been restarted now. Seems stable at the min.
    But i am not sure if the actuall issue has been resolved or not.
    I also checked the resource limit
    none of them reached limitation
    RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_AL LIMIT_VALU
    processes 324 688 700 700
    sessions 335 478 1088 1088
    enqueue_locks 580 768 14380 14380
    enqueue_resources 286 314 3011 UNLIMITED
    ges_procs 0 0 0 0
    ges_ress 0 0 0 UNLIMITED
    ges_locks 0 0 0 UNLIMITED
    ges_cache_ress 0 0 0 UNLIMITED
    ges_reg_msgs 0 0 0 UNLIMITED
    ges_big_msgs 0 0 0 UNLIMITED
    ges_rsv_msgs 0 0 0 0
    gcs_resources 0 0 0 0
    gcs_shadows 0 0 0 0
    dml_locks 0 0 100 UNLIMITED
    temporary_table_locks 0 64 UNLIMITED UNLIMITED
    transactions 0 0 1196 UNLIMITED
    branches 0 1 1196 UNLIMITED
    cmtcallbk 0 6 1196 UNLIMITED
    max_rollback_segments 63 63 1196 65535
    sort_segment_locks 12 80 UNLIMITED UNLIMITED
    k2q_locks 0 0 2176 UNLIMITED
    max_shared_servers 0 0 UNLIMITED UNLIMITED
    parallel_max_servers 0 96 640 3600

  • Solaris Error: 32: Broken pipe

    Dear sir,
    Yesterday I found in alert log file bellows warning.
    and In that time some clients inform us they are cannot log on
    to the application. after few times they could log on to
    database automatically.
    Oracle Database 10g
    Version:- 10.2.0.4
    OS :- Sun Solaries spark
    and
    It is dedicated environment .
    In parameter file
    processes = 4000
    Content of alert log file.
    ===================
    Mon Dec 6 16:03:00 2010
    Thread 1 advanced to log sequence 67690 (LGWR switch)
    Current log# 3 seq# 67690 mem# 0: /d01/oracle/oradata/stlbas/redo03.log
    Mon Dec 6 16:20:39 2010
    Process J000 died, see its trace file
    Mon Dec 6 16:20:39 2010
    kkjcre1p: unable to spawn jobq slave process
    Mon Dec 6 16:20:39 2010
    Errors in file /d04/admin/stlbas/bdump/stlbas_cjq0_1885.trc:
    Process J000 died, see its trace file
    Mon Dec 6 16:20:45 2010
    kkjcre1p: unable to spawn jobq slave process
    Mon Dec 6 16:20:45 2010
    Errors in file /d04/admin/stlbas/bdump/stlbas_cjq0_1885.trc:
    Mon Dec 6 16:21:01 2010
    Process J000 died, see its trace file
    Mon Dec 6 16:21:01 2010
    kkjcre1p: unable to spawn jobq slave process
    Mon Dec 6 16:21:01 2010
    Errors in file /d04/admin/stlbas/bdump/stlbas_cjq0_1885.trc:
    Mon Dec 6 16:21:17 2010
    Process J000 died, see its trace file
    Mon Dec 6 16:21:17 2010
    kkjcre1p: unable to spawn jobq slave process
    Mon Dec 6 16:21:17 2010
    Errors in file /d04/admin/stlbas/bdump/stlbas_cjq0_1885.trc:
    Mon Dec 6 16:36:24 2010
    Process J000 died, see its trace file
    Mon Dec 6 16:36:24 2010
    kkjcre1p: unable to spawn jobq slave process
    Mon Dec 6 16:36:24 2010
    Errors in file /d04/admin/stlbas/bdump/stlbas_cjq0_1885.trc:
    Process J000 died, see its trace file
    Mon Dec 6 16:36:30 2010
    kkjcre1p: unable to spawn jobq slave process
    Mon Dec 6 16:36:30 2010
    Errors in file /d04/admin/stlbas/bdump/stlbas_cjq0_1885.trc:
    Mon Dec 6 16:36:41 2010
    Process J000 died, see its trace file
    Mon Dec 6 16:36:41 2010
    kkjcre1p: unable to spawn jobq slave process
    Mon Dec 6 16:36:41 2010
    Errors in file /d04/admin/stlbas/bdump/stlbas_cjq0_1885.trc:
    Mon Dec 6 16:38:18 2010
    Thread 1 advanced to log sequence 67691 (LGWR switch)
    Current log# 4 seq# 67691 mem# 0: /d01/oracle/oradata/stlbas/redo04.log
    contents in the trace file are -
    ==========================
    /d04/admin/stlbas/bdump/stlbas_cjq0_1885.trc
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine
    and Real Application Testing options
    ORACLE_HOME = /d04/oracle/ora102
    System name:     SunOS
    Node name:     badb1
    Release:     5.10
    Version:     Generic_142900-07
    Machine:     sun4v
    Instance name: stlbas
    Redo thread mounted by this instance: 1
    Oracle process number: 26
    Unix process pid: 1885, image: oracle@badb1 (CJQ0)
    *** SERVICE NAME:(SYS$BACKGROUND) 2010-12-01 13:24:30.248
    *** SESSION ID:(2191.1) 2010-12-01 13:24:30.248
    *** 2010-12-01 13:24:30.248
    Process J000 is dead (pid=25006, state=3):
    *** 2010-12-01 13:24:37.277
    Process J000 is dead (pid=25012, state=3):
    *** 2010-12-01 13:59:56.397
    Process J000 is dead (pid=1185, state=3):
    *** 2010-12-01 15:55:42.277
    Process J000 is dead (pid=15686, state=3):
    *** 2010-12-06 16:20:39.526
    Process J000 is dead (pid=9458, state=3):
    *** 2010-12-06 16:20:45.565
    Process J000 is dead (pid=9480, state=3):
    *** 2010-12-06 16:21:01.641
    Process J000 is dead (pid=9518, state=3):
    *** 2010-12-06 16:21:17.712
    Process J000 is dead (pid=9550, state=3):
    *** 2010-12-06 16:36:24.213
    Process J000 is dead (pid=11942, state=3):
    *** 2010-12-06 16:36:30.238
    Process J000 is dead (pid=11970, state=3):
    *** 2010-12-06 16:36:41.289
    Process J000 is dead (pid=11998, state=3):
    content of listener log file like bellows (in that time only)
    =====================================
    06-DEC-2010 16:16:21 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=STLBAS)(CID=(PROGRAM=D:\OraNT\BIN\ifrun60.EXE)(HOST=APPLICATION-07)(USER=001zohur))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.11.1.36)(PORT=1771)) * establish * STLBAS * 0
    06-DEC-2010 16:16:21 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=STLBAS)(CID=(PROGRAM=D:\OraNT\BIN\RWRBE60.exe)(HOST=APPLICATION-02)(USER=154shahadat))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.11.1.32)(PORT=1528)) * establish * STLBAS * 0
    06-DEC-2010 16:16:21 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=STLBAS)(CID=(PROGRAM=D:\OraNT\BIN\RWRBE60.exe)(HOST=APPLICATION-07)(USER=043sathekur))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.11.1.36)(PORT=1758)) * establish * STLBAS * 12518
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12547: TNS:lost contact
    TNS-12560: TNS:protocol adapter error
    TNS-00517: Lost contact
    Solaris Error: 32: Broken pipe
    06-DEC-2010 16:16:21 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=STLBAS)(CID=(PROGRAM=D:\OraNT\BIN\ifrun60.EXE)(HOST=APPLICATION-07)(USER=038alfee))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.11.1.36)(PORT=1772)) * establish * STLBAS * 12518
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12547: TNS:lost contact
    TNS-12560: TNS:protocol adapter error
    TNS-00517: Lost contact
    Solaris Error: 32: Broken pipe
    06-DEC-2010 16:16:22 * service_update * stlbas * 0
    06-DEC-2010 16:16:24 * service_update * stlbas * 0
    06-DEC-2010 16:16:25 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=STLBAS)(CID=(PROGRAM=D:\OraNT\BIN\ifrun60.EXE)(HOST=APPLICATION-07)(USER=003aftab))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.11.1.36)(PORT=1794)) * establish * STLBAS * 12518
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12547: TNS:lost contact
    TNS-12560: TNS:protocol adapter error
    TNS-00517: Lost contact
    Solaris Error: 32: Broken pipe
    06-DEC-2010 16:16:25 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=STLBAS)(CID=(PROGRAM=D:\OraNT\BIN\RWRBE60.exe)(HOST=NEW-SUN-APP)(USER=023sohel))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.11.1.37)(PORT=4291)) * establish * STLBAS * 12518
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12547: TNS:lost contact
    TNS-12560: TNS:protocol adapter error
    TNS-00517: Lost contact
    Solaris Error: 32: Broken pipe
    06-DEC-2010 16:16:27 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=STLBAS)(CID=(PROGRAM=D:\OraNT\BIN\ifrun60.EXE)(HOST=APPLICATION-07)(USER=038alfee))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.11.1.36)(PORT=1796)) * establish * STLBAS * 0
    06-DEC-2010 16:16:27 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=STLBAS)(CID=(PROGRAM=D:\OraNT\BIN\ifrun60.EXE)(HOST=APPLICATION-07)(USER=038alfee))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.11.1.36)(PORT=1797)) * establish * STLBAS * 0
    06-DEC-2010 16:16:28 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=STLBAS)(CID=(PROGRAM=D:\OraNT\BIN\RWRBE60.exe)(HOST=APPLICATION-11)(USER=030salah))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.11.1.33)(PORT=3982)) * establish * STLBAS * 0
    06-DEC-2010 16:16:29 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=stlbas)(CID=(PROGRAM=D:\OraNT\BIN\ifrun60.EXE)(HOST=REPORTS_APP)(USER=504refayet))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.11.1.233)(PORT=4995)) * establish * stlbas * 0
    06-DEC-2010 16:16:29 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=STLBAS)(CID=(PROGRAM=D:\OraNT\BIN\ifrun60.EXE)(HOST=APPLICATION-07)(USER=019aporna))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.11.1.36)(PORT=1800)) * establish * STLBAS * 0
    06-DEC-2010 16:16:29 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=stlbas)(CID=(PROGRAM=D:\OraNT\BIN\ifrun60.EXE)(HOST=REPORTS_APP)(USER=504refayet))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.11.1.233)(PORT=4996)) * establish * stlbas * 0
    06-DEC-2010 16:16:30 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=STLBAS)(CID=(PROGRAM=D:\OraNT\BIN\ifrun60.EXE)(HOST=APPLICATION-07)(USER=003aftab))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.11.1.36)(PORT=1801)) * establish * STLBAS * 12518
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12547: TNS:lost contact
    TNS-12560: TNS:protocol adapter error
    TNS-00517: Lost contact
    Solaris Error: 32: Broken pipe
    06-DEC-2010 16:16:30 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=STLBAS)(CID=(PROGRAM=D:\OraNT\BIN\ifrun60.EXE)(HOST=APPLICATION-07)(USER=019aporna))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.11.1.36)(PORT=1802)) * establish * STLBAS * 12518
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12547: TNS:lost contact
    TNS-12560: TNS:protocol adapter error
    TNS-00517: Lost contact
    Solaris Error: 32: Broken pipe
    06-DEC-2010 16:16:30 * service_update * stlbas * 0
    06-DEC-2010 16:16:30 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=stlbas)(CID=(PROGRAM=D:\OraNT\BIN\ifrun60.EXE)(HOST=REPORTS_APP)(USER=501azad))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.11.1.233)(PORT=4997)) * establish * stlbas * 0
    06-DEC-2010 16:16:31 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=stlbas)(CID=(PROGRAM=D:\OraNT\BIN\ifrun60.EXE)(HOST=REPORTS_APP)(USER=501azad))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.11.1.233)(PORT=4999)) * establish * stlbas * 0
    06-DEC-2010 16:16:32 * service_update * stlbas * 0
    What is the cause ?
    and
    why it shown "Solaris Error: 32: Broken pipe" ? please
    Best Regards
    Halim

    Thanks
    Sorry for not Formatting .
    Actually I don't know how format code here.
    SQL>
    SQL>
    SQL> select * from v$resource_limit ;
    RESOURCE_NAME                  CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_AL LIMIT_VALU
    processes                                     1607            4000       4000       4000
    sessions                                      1596            4005       4405       4405
    enqueue_locks                                 1380            6280      57390      57390
    enqueue_resources                              563            2901      19600  UNLIMITED
    ges_procs                                        0               0          0          0
    ges_ress                                         0               0          0  UNLIMITED
    ges_locks                                        0               0          0  UNLIMITED
    ges_cache_ress                                   0               0          0  UNLIMITED
    ges_reg_msgs                                     0               0          0  UNLIMITED
    ges_big_msgs                                     0               0          0  UNLIMITED
    ges_rsv_msgs                                     0               0          0          0
    gcs_resources                                    0               0          0          0
    gcs_shadows                                      0               0          0          0
    dml_locks                                       43             718      19380  UNLIMITED
    temporary_table_locks                            0               3  UNLIMITED  UNLIMITED
    transactions                                   306             722       4845  UNLIMITED
    branches                                         1              13       4845  UNLIMITED
    cmtcallbk                                        2               4       4845  UNLIMITED
    sort_segment_locks                            1594            4451  UNLIMITED  UNLIMITED
    max_rollback_segments                          136             361       4845      65535
    max_shared_servers                               0               0  UNLIMITED  UNLIMITED
    parallel_max_servers                          1324            3600       2560       3600
    22 rows selected.
    SQL>Regards
    Halim
    Edited by: Abdul Halim on Dec 7, 2010 4:04 PM
    Edited by: Abdul Halim on Dec 7, 2010 4:04 PM

  • 数据库莫名其妙连接不上,一会有好了

    在alert_sid.log里面有这些错误日志:
    287 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_ora_22393.trc:
    291 SVR4 Error: 2: No such file or directory
    293 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_ora_22393.trc:
    297 SVR4 Error: 2: No such file or directory
    299 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_ora_22393.trc:
    303 SVR4 Error: 2: No such file or directory
    305 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_ora_22393.trc:
    309 SVR4 Error: 2: No such file or directory
    313 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_ora_22393.trc:
    317 SVR4 Error: 2: No such file or directory
    319 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_ora_22393.trc:
    323 SVR4 Error: 2: No such file or directory
    1195 Fatal NI connect error 12170.
    1203 Tns error struct:
    3155 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_smco_22227.trc (incident=7425):
    4049 Fatal NI connect error 12170.
    4057 Tns error struct:
    11189 USER (ospid: 13563): terminating the instance due to error 472
    13033 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_cjq0_5688.trc (incident=268769):
    13037 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_cjq0_5688.trc:
    19297 Fatal NI connect error 12537, connecting to:
    19306 Tns error struct:
    19425 Fatal NI connect error 12537, connecting to:
    19434 Tns error struct:
    19448 Fatal NI connect error 12537, connecting to:
    19457 Tns error struct:
    19489 Fatal NI connect error 12537, connecting to:
    19498 Tns error struct:
    19506 Fatal NI connect error 12537, connecting to:
    19515 Tns error struct:
    20874 Fatal NI connect error 12537, connecting to:
    20883 Tns error struct:
    20891 Fatal NI connect error 12537, connecting to:
    20900 Tns error struct:
    20919 Fatal NI connect error 12537, connecting to:
    20928 Tns error struct:
    20943 Fatal NI connect error 12537, connecting to:
    20952 Tns error struct:
    20962 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_qmnc_5539.trc (incident=268617):
    21535 Fatal NI connect error 12537, connecting to:
    21544 Tns error struct:
    21552 Fatal NI connect error 12537, connecting to:
    21561 Tns error struct:
    22617 Fatal NI connect error 12537, connecting to:
    22626 Tns error struct:
    22658 Fatal NI connect error 12537, connecting to:
    22667 Tns error struct:
    22681 Fatal NI connect error 12537, connecting to:
    22690 Tns error struct:
    25625 Fatal NI connect error 12537, connecting to:
    25634 Tns error struct:
    26099 Error occured while spawning process m000; error = 12751
    26754 Fatal NI connect error 12537, connecting to:
    26763 Tns error struct:
    26944 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_qmnc_5539.trc (incident=268618):
    28030 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_cjq0_5688.trc (incident=268770):
    28034 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_cjq0_5688.trc:
    28227 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_qmnc_5539.trc (incident=268619):
    28377 Error occured while spawning process m000; error = 12751
    29126 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_qmnc_5539.trc (incident=268620):
    32745 Fatal NI connect error 12537, connecting to:
    32754 Tns error struct:
    33252 Fatal NI connect error 12537, connecting to:
    33261 Tns error struct:
    33269 Fatal NI connect error 12537, connecting to:
    33278 Tns error struct:
    34298 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_cjq0_5688.trc:
    34870 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_cjq0_5688.trc:
    36044 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_cjq0_5688.trc:
    37341 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_qmnc_5539.trc (incident=268621):
    37760 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_cjq0_5688.trc:
    37854 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_cjq0_5688.trc:
    38204 Error occured while spawning process m000; error = 12751
    38533 Fatal NI connect error 12537, connecting to:
    38542 Tns error struct:
    39535 Error occured while spawning process m000; error = 12751
    40689 Fatal NI connect error 12537, connecting to:
    40698 Tns error struct:
    40712 Fatal NI connect error 12537, connecting to:
    40721 Tns error struct:
    41289 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_cjq0_5688.trc (incident=268771):
    41295 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_cjq0_5688.trc:
    41611 Fatal NI connect error 12537, connecting to:
    41620 Tns error struct:
    42176 Fatal NI connect error 12537, connecting to:
    42185 Tns error struct:
    42199 Fatal NI connect error 12537, connecting to:
    42208 Tns error struct:
    43552 Fatal NI connect error 12537, connecting to:
    43560 Tns error struct:
    43573 Fatal NI connect error 12537, connecting to:
    43582 Tns error struct:
    44752 Error occured while spawning process m000; error = 12751
    44841 Error occured while spawning process m000; error = 12751
    46011 Error occured while spawning process m000; error = 12751
    46502 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_cjq0_5688.trc (incident=268772):
    46506 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_cjq0_5688.trc:
    48574 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_qmnc_11135.trc (incident=288617):
    48604 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_cjq0_11259.trc (incident=288945):
    48610 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_cjq0_11259.trc:
    49056 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_cjq0_11259.trc (incident=288946):
    49060 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_cjq0_11259.trc:
    49193 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_smco_12433.trc (incident=289313):
    50121 Fatal NI connect error 12537, connecting to:
    50130 Tns error struct:
    50183 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_mmon_9996.trc (incident=288569):
    50300 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_mmon_9996.trc (incident=288570):
    50381 Error occured while spawning process m000; error = 12751
    50847 Errors in file /data3/oracle/diag/rdbms/aiobs/aiobs/trace/aiobs_smco_12433.trc (incident=289314):
    主要有:
    Fatal NI connect error 12170.
    Fatal NI connect error 12537, connecting to:
    Tns error struct:
    Error occured while spawning process m000; error = 12751
    Error occured while spawning process m000; error = 12751
    Error occured while spawning process m000; error = 12751
    Error occured while spawning process m000; error = 12751
    142 ORA-1109 signalled during: ALTER DATABASE CLOSE NORMAL...
    288 ORA-00313: open failed for members of log group 1 of thread 1
    289 ORA-00312: online log 1 thread 1: '/data3/oracle/oradata/aiobs/redo01.log'
    290 ORA-27037: unable to obtain file status
    294 ORA-00313: open failed for members of log group 1 of thread 1
    295 ORA-00312: online log 1 thread 1: '/data3/oracle/oradata/aiobs/redo01.log'
    296 ORA-27037: unable to obtain file status
    300 ORA-00313: open failed for members of log group 2 of thread 1
    301 ORA-00312: online log 2 thread 1: '/data3/oracle/oradata/aiobs/redo02.log'
    302 ORA-27037: unable to obtain file status
    306 ORA-00313: open failed for members of log group 2 of thread 1
    307 ORA-00312: online log 2 thread 1: '/data3/oracle/oradata/aiobs/redo02.log'
    308 ORA-27037: unable to obtain file status
    314 ORA-00313: open failed for members of log group 3 of thread 1
    315 ORA-00312: online log 3 thread 1: '/data3/oracle/oradata/aiobs/redo03.log'
    316 ORA-27037: unable to obtain file status
    320 ORA-00313: open failed for members of log group 3 of thread 1
    321 ORA-00312: online log 3 thread 1: '/data3/oracle/oradata/aiobs/redo03.log'
    322 ORA-27037: unable to obtain file status
    1212 WARNING: inbound connection timed out (ORA-3136)
    1392 ORA-1144 signalled during: create tablespace obs_data
    1436 ORA-12913 signalled during: create tablespace obs_temp
    1565 ORA-1144 signalled during: create tablespace obs_data
    1590 ORA-12913 signalled during: create tablespace obs_temp
    1601 ORA-12913 signalled during: create tablespace obs_temp
    1612 ORA-12913 signalled during: create tablespace obs_temp
    1623 ORA-12913 signalled during: create tablespace obs_temp
    1633 ORA-12913 signalled during: create tablespace obs_temp
    1644 ORA-12913 signalled during: create tablespace obs_temp
    1656 ORA-12913 signalled during: create tablespace obs_temp
    1668 ORA-12913 signalled during: create tablespace obs_temp
    1679 ORA-12913 signalled during: create tablespace obs_temp
    3156 ORA-00445: background process "W000" did not start after 120 seconds
    11226 ksuapc : ORA-1033 foreground process starts before PMON
    13034 ORA-00445: background process "J000" did not start after 120 seconds
    19314 opiodr aborting process unknown ospid (27176) as a result of ORA-609
    19442 opiodr aborting process unknown ospid (11389) as a result of ORA-609
    19465 opiodr aborting process unknown ospid (11178) as a result of ORA-609
    19523 opiodr aborting process unknown ospid (21443) as a result of ORA-609
    19529 opiodr aborting process unknown ospid (21732) as a result of ORA-609
    20913 opiodr aborting process unknown ospid (20937) as a result of ORA-609
    20936 opiodr aborting process unknown ospid (22466) as a result of ORA-609
    20937 opiodr aborting process unknown ospid (21451) as a result of ORA-609
    20960 opiodr aborting process unknown ospid (23100) as a result of ORA-609
    20963 ORA-00445: background process "q000" did not start after 120 seconds
    21574 opiodr aborting process unknown ospid (19936) as a result of ORA-609
    21575 opiodr aborting process unknown ospid (19139) as a result of ORA-609
    22634 opiodr aborting process unknown ospid (28687) as a result of ORA-609
    22679 opiodr aborting process unknown ospid (4346) as a result of ORA-609
    22698 opiodr aborting process unknown ospid (4410) as a result of ORA-609
    25642 opiodr aborting process unknown ospid (15895) as a result of ORA-609
    26771 opiodr aborting process unknown ospid (26238) as a result of ORA-609
    26945 ORA-00445: background process "q003" did not start after 120 seconds
    28031 ORA-00445: background process "J001" did not start after 120 seconds
    28228 ORA-00445: background process "q002" did not start after 120 seconds
    29127 ORA-00445: background process "q003" did not start after 120 seconds
    32762 opiodr aborting process unknown ospid (5719) as a result of ORA-609
    33286 opiodr aborting process unknown ospid (17120) as a result of ORA-609
    33292 opiodr aborting process unknown ospid (17203) as a result of ORA-609
    37342 ORA-00445: background process "q003" did not start after 120 seconds
    38550 opiodr aborting process unknown ospid (24929) as a result of ORA-609
    40706 opiodr aborting process unknown ospid (18372) as a result of ORA-609
    40729 opiodr aborting process unknown ospid (17856) as a result of ORA-609
    41290 ORA-00445: background process "J001" did not start after 120 seconds
    41628 opiodr aborting process unknown ospid (653) as a result of ORA-609
    42193 opiodr aborting process unknown ospid (20038) as a result of ORA-609
    42216 opiodr aborting process unknown ospid (19243) as a result of ORA-609
    43590 opiodr aborting process unknown ospid (4934) as a result of ORA-609
    46503 ORA-00445: background process "J001" did not start after 120 seconds
    48575 ORA-00445: background process "q000" did not start after 120 seconds
    48605 ORA-00445: background process "J000" did not start after 120 seconds
    49057 ORA-00445: background process "J001" did not start after 120 seconds
    49194 ORA-00445: background process "W000" did not start after 120 seconds
    50138 opiodr aborting process unknown ospid (27455) as a result of ORA-609
    50184 ORA-00445: background process "m000" did not start after 120 seconds
    50301 ORA-00445: background process "m000" did not start after 120 seconds
    50848 ORA-00445: background process "W000" did not start after 120 seconds
    50901 ORA-1624 signalled during: alter database drop logfile group 3...
    50904 ORA-1624 signalled during: alter database drop logfile group 3...
    50906 ORA-1624 signalled during: alter database drop logfile group 2...
    50909 ORA-1624 signalled during: alter database drop logfile group 1 ...
    50920 ORA-1624 signalled during: alter database drop logfile group 2...
    50926 ORA-1623 signalled during: alter database drop logfile group 2...
    50928 ORA-1624 signalled during: alter database drop logfile group 3...
    50937 ORA-1623 signalled during: alter database drop logfile group 3...
    50939 ORA-1624 signalled during: alter database drop logfile group 2...
    50952 ORA-1624 signalled during: alter database drop logfile group 3...
    50954 ORA-1624 signalled during: alter database drop logfile group 2...
    50966 ORA-1624 signalled during: alter database drop logfile group 2...
    50969 ORA-1624 signalled during: alter database drop logfile group 2...
    50988 ORA-1624 signalled during: alter database drop logfile group 3 ...
    50997 ORA-1623 signalled during: alter database drop logfile group 3 ...
    50999 ORA-1624 signalled during: alter database drop logfile group 2...
    51011 ORA-1624 signalled during: alter database drop logfile group 2...
    SQL> show parameter mttr
    NAME TYPE VALUE
    fast_start_mttr_target integer 0

    bash-3.00$ more /etc/hosts
    # Internet host table
    ::1     localhost      
    127.0.0.1       localhost      
    10.1.248.135    aisms  
    bash-3.00$ ping $HOSTNAME
    aisms is alive
    bash-3.00$ cat $ORACLE_HOME/network/admin/sqlnet.ora
    # sqlnet.ora Network Configuration File: /data/oracle/product/11.2.0.1/network/admin/sqlnet.ora
    # Generated by Oracle configuration tools.
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    ADR_BASE = /data/oracle/app/oracle
    bash-3.00$
    SQL> select * from v$resource_limit;
    RESOURCE_NAME                  CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_ALLOCATION   LIMIT_VALUE
    processes                                       29              31        150                 2500
    sessions                                        32              35        256                 4023
    enqueue_locks                                   17              30       3350                 3350
    enqueue_resources                               16              16       1344            UNLIMITED
    ges_procs                                        0               0          0                    0
    ges_ress                                         0               0          0            UNLIMITED
    ges_locks                                        0               0          0            UNLIMITED
    ges_cache_ress                                   0               0          0            UNLIMITED
    ges_reg_msgs                                     0               0          0            UNLIMITED
    ges_big_msgs                                     0               0          0            UNLIMITED
    ges_rsv_msgs                                     0               0          0                    0
    RESOURCE_NAME                  CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_ALLOCATION   LIMIT_VALUE
    gcs_resources                                    0               0          0                    0
    gcs_shadows                                      0               0          0                    0
    dml_locks                                        1               1       1124            UNLIMITED
    temporary_table_locks                            0               1  UNLIMITED            UNLIMITED
    transactions                                     1               1        281            UNLIMITED
    branches                                         0               0        281            UNLIMITED
    cmtcallbk                                        0               1        281            UNLIMITED
    max_rollback_segments                           11              11        281                65535
    sort_segment_locks                               0               1  UNLIMITED            UNLIMITED
    k2q_locks                                        0               0        512            UNLIMITED
    max_shared_servers                               1               1  UNLIMITED            UNLIMITED
    RESOURCE_NAME                  CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_ALLOCATION   LIMIT_VALUE
    parallel_max_servers                             0               0        135                 3600
    23 rows selected.
    SQL> 帖子经 Northmoor编辑过

  • Seesion and Process increase..

    Dear All
    There are 75 to 100 users are accesing the databse simulateuosly and i recently got the error of session and process exceeded ....then i tried to increase seesion and process using OEM but i got following error
    Io exception: Unknown host specified Is there any other way to do this? Can any one suggest me a best way to do this? or how do i tune it properly to acces DB without any interruption?
    Vijay
    Edited by: Vijayamurugan on Dec 8, 2010 9:29 PM

    Dear Anand
    The below is the out put v$resource_limit
    RESOURCE_NAME                  CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_AL
    LIMIT_VALU
    processes                                       70             150        150
           150
    sessions                                        74             170        170
           170
    enqueue_locks                                   12              47       2380
          2380
    RESOURCE_NAME                  CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_AL
    LIMIT_VALU
    enqueue_resources                              164             263        968
    UNLIMITED
    ges_procs                                        0               0          0
             0
    ges_ress                                         0               0          0
    UNLIMITED
    RESOURCE_NAME                  CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_AL
    LIMIT_VALU
    ges_locks                                        0               0          0
    UNLIMITED
    ges_cache_ress                                   0               0          0
    UNLIMITED
    ges_reg_msgs                                     0               0          0
    UNLIMITED
    RESOURCE_NAME                  CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_AL
    LIMIT_VALU
    ges_big_msgs                                     0               0          0
    UNLIMITED
    ges_rsv_msgs                                     0               0          0
             0
    gcs_resources                                    0               0          0
             0
    RESOURCE_NAME                  CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_AL
    LIMIT_VALU
    gcs_shadows                                      0               0          0
             0
    dml_locks                                     2037            7548        748
    UNLIMITED
    temporary_table_locks                            0               3  UNLIMITED
    UNLIMITED
    RESOURCE_NAME                  CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_AL
    LIMIT_VALU
    transactions                                    45             123        187
    UNLIMITED
    branches                                         0               0        187
    UNLIMITED
    cmtcallbk                                        0               1        187
    UNLIMITED
    RESOURCE_NAME                  CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_AL
    LIMIT_VALU
    sort_segment_locks                               0               6  UNLIMITED
    UNLIMITED
    max_rollback_segments                           12              66        187
         65535
    max_shared_servers                               1               1  UNLIMITED
    UNLIMITED
    RESOURCE_NAME                  CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_AL
    LIMIT_VALU
    parallel_max_servers                             0               3         80
          3600Vijay

  • TNS-12564: TNS:connection refused

    Hi,
    I have some PHP applications which connect to Oracle database.
    I sometime receive the following error message.
    Fatal NI connect error 12516, connecting to:
    (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=)(CID=(PROGRAM=httpd)(HOST=r33188.ovh.net)(USER=nobody)))(ADDRESS=(PROTOCOL=TCP)(HOST=178.32.113.43)(PORT=1521)))
    VERSION INFORMATION:
         TNS for Linux: Version 10.2.0.1.0 - Production
         TCP/IP NT Protocol Adapter for Linux: Version 10.2.0.1.0 - Production
    Time: 29-JUL-2010 18:01:45
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12564
    TNS-12564: TNS:connection refused
    ns secondary err code: 0
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
    I already had that error message in the past. At that time, I looked at the V$RESOURCE_LIMIT view and I saw session and process parameters were too small so I increased its.
    Now, I checked again to these parameters and values never went nearly the max values.
    RESOURCE_NAME     CURRENT_UTILIZATION     MAX_UTILIZATION     INITIAL_ALLOCATION     LIMIT_VALUE
    processes     21     183     400     400
    sessions     29     191     445     445
    enqueue_locks     13     23     5470     5470
    enqueue_resources     13     44     2176     UNLIMITED
    ges_procs     0     0     0     0
    ges_ress     0     0     0     UNLIMITED
    ges_locks     0     0     0     UNLIMITED
    ges_cache_ress     0     0     0     UNLIMITED
    ges_reg_msgs     0     0     0     UNLIMITED
    ges_big_msgs     0     0     0     UNLIMITED
    ges_rsv_msgs     0     0     0     0
    gcs_resources     0     0     0     0
    gcs_shadows     0     0     0     0
    dml_locks     0     73     1956     UNLIMITED
    temporary_table_locks     0     3     UNLIMITED     UNLIMITED
    transactions     1     6     489     UNLIMITED
    branches     0     0     489     UNLIMITED
    cmtcallbk     0     1     489     UNLIMITED
    sort_segment_locks     5     8     UNLIMITED     UNLIMITED
    max_rollback_segments     11     11     489     65535
    max_shared_servers     4     7     UNLIMITED     UNLIMITED
    parallel_max_servers     0     0     0     3600
    Is it possible it can from another thing ? What is the best way to never have this error message again ? What is max value for sessions and processes that Oracle can support ?
    Thanks in advance,
    Best regards.

    Why do I am having (HOST=178.32.113.43)(PORT=1521) in the error message? I am using only the DNS name.
    my tnsnames.ora file:
    NV =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dns_name)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = NV)
    and in my php connection function I also use the DNS name as the host and username/password like:
    $connect = ocilogon($username, $password, 'dns_name');
    Should I connect in another way ? like:
    $ora_host='(DESCRIPTION =(ADDRESS =(PROTOCOL = TCP)(HOST = dns_name)(PORT = 1521))(CONNECT_DATA =(SID = NV)))';
    $connect = ocilogon($username, $password, $ora_host);

  • SGA Sizing Questions

    Hello,
    I have a Windows 64-bit server with 16GB of RAM.
    Right now, both my sga_max_size and sga_target are set to 4896M.
    I've been reading that if I set the SGA too high, it could cause performance issues, but I would still like to increase this a bit.
    My database is around 150GB in size, with many reads and writes to the database through HTMLDB applications, also dealing with BLOBS (documents/images stored in our database that are downloaded and uploaded to the system).
    I know I can't be told an exact answer, but does anybody have any suggestions on what a safe SGA size would be? I was going to try setting the max_size to 12G and the target to 8G. Does that sound reasonable, or too high/low?
    Thanks,
    Nora

    Check the v$resource_limit to determine if other limits set have been reached.
    select * from v$resource_limit;
    SQL> /
    RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_ALLOCATION LIMIT_VALUE
    processes 999 1000 1000 1000
    sessions 93 149 1105 1105
    enqueue_locks 34 70 14134 14134
    enqueue_resources 34 65 5904 UNLIMITED
    ges_procs 0 0 0 0
    ges_ress 0 0 0 UNLIMITED
    ges_locks 0 0 0 UNLIMITED
    ges_cache_ress 0 0 0 UNLIMITED
    ges_reg_msgs 0 0 0 UNLIMITED
    ges_big_msgs 0 0 0 UNLIMITED
    ges_rsv_msgs 0 0 0 0
    gcs_resources 0 0 0 0
    gcs_shadows 0 0 0 0
    dml_locks 0 55 4860 UNLIMITED
    temporary_table_locks 0 3 UNLIMITED UNLIMITED
    transactions 0 13 1215 UNLIMITED
    branches 0 2 1215 UNLIMITED
    cmtcallbk 0 2 1215 UNLIMITED
    sort_segment_locks 1 9 UNLIMITED UNLIMITED
    max_rollback_segments 13 13 1215 65535
    max_shared_servers 0 0 UNLIMITED UNLIMITED
    parallel_max_servers 0 17 20 3600
    22 rows selected.
    Regards,
    Jess
    Edited by: jjhoup on Sep 9, 2008 1:32 AM

  • Gcs_resources at 100% on V$RESOURCE_LIMIT

    Hi folks.
    A query in V$RESOURCE_LIMIT shows 100% of utilization for gcs_shadows and gcs_resources. Is that a problem? If it is a problem, how do I fix / tune it?
    INIT LIMIT CURR CURR MAX MAX
    RESOURCE_NAME ALLOC VALUE UTILIZ PCT UTILIZ PCT
    gcs_resources 226590 226590 126431 56 226590 100
    gcs_shadows 226590 226590 126864 56 226590 100
    sessions 885 885 250 28 609 69
    processes 800 800 245 31 532 67
    ges_procs 801 801 244 30 530 66
    enqueue_locks 10672 10672 90 1 199 2
    branches 973 UNLIMITED 10 0 38 0
    cmtcallbk 973 UNLIMITED 1 0 3 0
    dml_locks 3892 UNLIMITED 15 0 470 0
    enqueue_resources 4112 UNLIMITED 64 0 200 0
    ges_big_msgs 1934 UNLIMITED 30 0 530 0
    ges_cache_ress 0 UNLIMITED 4098 0 58463 0
    ges_locks 25951 UNLIMITED 0 0 0 0
    ges_reg_msgs 2350 UNLIMITED 271 0 1760 0
    ges_ress 16806 UNLIMITED 0 0 0 0
    ges_rsv_msgs 1000 1000 0 0 0 0
    max_rollback_segments 973 65535 32 0 84 0
    max_shared_servers UNLIMITED UNLIMITED 1 0 1 0
    parallel_max_servers 0 3600 1 0 10 0
    sort_segment_locks UNLIMITED UNLIMITED 54 0 73 0
    temporary_table_locks UNLIMITED UNLIMITED 0 0 3 0
    transactions 973 UNLIMITED 15 0 92 0
    Thanks in advance,
    Danilo

    In a RAC enviornment there are no specific parameters to allocate space for say global activity. Oracle allocates a % from the already allocated pool of resources.
    If you are using automatic memory management, the option to fix this problem is to increase your total SGA size

  • Package.......StatsPack...Error..

    Hi.. i m tuning my Oracle Database, for that i need to install Statspack package, when i compiled package... it returned following error.
    Warning: Package Body created with compilation errors.
    SQL> show error
    Errors for PACKAGE BODY STATSPACK:
    LINE/COL ERROR
    2045/3 PLS-00201: identifier 'SYS.DBMS_SHARED_POOL' must be declared
    2045/3 PL/SQL: Statement ignored
    HOw to solve above error..Please check the following Package, and do help me.
    Note: I m connected perfstat user, no as SYS user.
    create or replace package body STATSPACK as
    /* Define package variables.
    Variables prefixed with p_ are package variables.
    p_snap_id integer; /* snapshot id */
    p_instance_number number; /* instance number */
    p_instance_name varchar2(16); /* instance name */
    p_startup_time date; /* instance startup time */
    p_parallel varchar2(3); /* parallel server */
    p_version varchar2(17); /* Oracle release */
    p_dbid number; /* database id */
    p_host_name varchar2(64); /* host instance is on */
    p_name varchar2(9); /* database name */
    p_new_sga integer; /* Instance bounced since last snap? */
    tmp_int integer; /* initialise defaults */
    p_def_snap_level number default 5; /* default snapshot lvl */
    p_def_session_id number default 0; /* default session id */
    p_def_ucomment varchar2(160) default null;
    p_def_pin_statspack varchar2(10) default 'TRUE';
    p_def_last_modified date default SYSDATE;
    /* Below are the default threshold (_th) values for choosing SQL statements
    to store in the stats$sqlsummary table - these statements will typically
    be the statements using the most resources.
    p_def_num_sql number default 50; /* Num. SQL statements */
    p_def_executions_th number default 100; /* Num. executions */
    p_def_parse_calls_th number default 1000; /* Num. parse calls */
    p_def_disk_reads_th number default 1000; /* Num. disk reads */
    p_def_buffer_gets_th number default 10000; /* Num. buf gets */
    p_def_sharable_mem_th number default 1048576; /* Sharable memory */
    p_def_version_count_th number default 20; /* Child Cursors */
    p_def_all_init varchar2(10) default 'FALSE';
    cursor get_instance is
    select instance_number, instance_name
    , startup_time, parallel, version
    , host_name
    from v$instance;
    cursor get_db is
    select dbid, name
    from v$database;
    procedure SNAP
    (i_snap_level in number default null
    ,i_session_id in number default null
    ,i_ucomment in varchar2 default null
    ,i_num_sql in number default null
    ,i_executions_th in number default null
    ,i_parse_calls_th in number default null
    ,i_disk_reads_th in number default null
    ,i_buffer_gets_th in number default null
    ,i_sharable_mem_th in number default null
    ,i_version_count_th in number default null
    ,i_all_init in varchar2 default null
    ,i_pin_statspack in varchar2 default null
    ,i_modify_parameter in varchar2 default 'FALSE'
    is
    /* Takes a snapshot by calling the SNAP function, and discards
    the snapshot id. This is useful when automating taking
    snapshots from dbms_job
    l_snap_id number;
    begin
    l_snap_id := statspack.snap ( i_snap_level, i_session_id, i_ucomment
    , i_num_sql
    , i_executions_th
    , i_parse_calls_th
    , i_disk_reads_th
    , i_buffer_gets_th
    , i_sharable_mem_th
    , i_version_count_th
    , i_all_init
    , i_pin_statspack
    , i_modify_parameter);
    end SNAP;
    procedure MODIFY_STATSPACK_PARAMETER
    ( i_dbid in number default null
    , i_instance_number in number default null
    , i_snap_level in number default null
    , i_session_id in number default null
    , i_ucomment in varchar2 default null
    , i_num_sql in number default null
    , i_executions_th in number default null
    , i_parse_calls_th in number default null
    , i_disk_reads_th in number default null
    , i_buffer_gets_th in number default null
    , i_sharable_mem_th in number default null
    , i_version_count_th in number default null
    , i_all_init in varchar2 default null
    , i_pin_statspack in varchar2 default null
    , i_modify_parameter in varchar2 default 'TRUE'
    is
    /* Calls QAM with the modify flag, and discards the
    output variables
    l_snap_level number;
    l_session_id number;
    l_ucomment varchar2(160);
    l_num_sql number;
    l_executions_th number;
    l_parse_calls_th number;
    l_disk_reads_th number;
    l_buffer_gets_th number;
    l_sharable_mem_th number;
    l_version_count_th number;
    l_all_init varchar2(5);
    l_pin_statspack varchar2(10);
    begin
    statspack.qam_statspack_parameter( i_dbid
    , i_instance_number
    , i_snap_level
    , i_session_id
    , i_ucomment
    , i_num_sql
    , i_executions_th
    , i_parse_calls_th
    , i_disk_reads_th
    , i_buffer_gets_th
    , i_sharable_mem_th
    , i_version_count_th
    , i_all_init
    , i_pin_statspack
    , 'TRUE'
    , l_snap_level
    , l_session_id
    , l_ucomment
    , l_num_sql
    , l_executions_th
    , l_parse_calls_th
    , l_disk_reads_th
    , l_buffer_gets_th
    , l_sharable_mem_th
    , l_version_count_th
    , l_all_init
    , l_pin_statspack);
    /* As we have explicity been requested to change the parameters,
    independently of taking a snapshot, commit
    commit;
    end MODIFY_STATSPACK_PARAMETER;
    procedure QAM_STATSPACK_PARAMETER
    ( i_dbid in number default null
    , i_instance_number in number default null
    , i_snap_level in number default null
    , i_session_id in number default null
    , i_ucomment in varchar2 default null
    , i_num_sql in number default null
    , i_executions_th in number default null
    , i_parse_calls_th in number default null
    , i_disk_reads_th in number default null
    , i_buffer_gets_th in number default null
    , i_sharable_mem_th in number default null
    , i_version_count_th in number default null
    , i_all_init in varchar2 default null
    , i_pin_statspack in varchar2 default null
    , i_modify_parameter in varchar2 default 'FALSE'
    , o_snap_level out number
    , o_session_id out number
    , o_ucomment out varchar2
    , o_num_sql out number
    , o_executions_th out number
    , o_parse_calls_th out number
    , o_disk_reads_th out number
    , o_buffer_gets_th out number
    , o_sharable_mem_th out number
    , o_version_count_th out number
    , o_all_init out varchar2
    , o_pin_statspack out varchar2
    is
    /* Query And Modify statspack parameter procedure, allows query
    and/or user modification of the statistics collection parameters
    for an instance. If there are no pre-existing parameters for
    an instance, insert the Oracle defaults.
    l_instance_number number;
    l_dbid number;
    ui_all_init varchar2(5);
    l_params_exist varchar2(1);
    begin
    if ((i_dbid is null ) or (i_instance_number is null)) then
    l_dbid := p_dbid;
    l_instance_number := p_instance_number;
    else
    l_dbid := i_dbid;
    l_instance_number := i_instance_number;
    end if;
    /* Upper case any input vars which are inserted */
    ui_all_init := upper(i_all_init);
    if ( (i_modify_parameter is null)
    or (upper(i_modify_parameter) = 'FALSE') ) then
    /* Query values, if none exist, insert the defaults tempered
    with variables supplied */
    begin
    select nvl(i_session_id, session_id)
    , nvl(i_snap_level, snap_level)
    , nvl(i_ucomment, ucomment)
    , nvl(i_num_sql, num_sql)
    , nvl(i_executions_th, executions_th)
    , nvl(i_parse_calls_th, parse_calls_th)
    , nvl(i_disk_reads_th, disk_reads_th)
    , nvl(i_buffer_gets_th, buffer_gets_th)
    , nvl(i_sharable_mem_th, sharable_mem_th)
    , nvl(i_version_count_th, version_count_th)
    , nvl(ui_all_init, all_init)
    , nvl(i_pin_statspack, pin_statspack)
    into o_session_id
    , o_snap_level
    , o_ucomment
    , o_num_sql
    , o_executions_th
    , o_parse_calls_th
    , o_disk_reads_th
    , o_buffer_gets_th
    , o_sharable_mem_th
    , o_version_count_th
    , o_all_init
    , o_pin_statspack
    from stats$statspack_parameter
    where instance_number = l_instance_number
    and dbid = l_dbid;
    exception
    when NO_DATA_FOUND then
    insert into stats$statspack_parameter
    ( dbid
    , instance_number
    , session_id
    , snap_level
    , ucomment
    , num_sql
    , executions_th
    , parse_calls_th
    , disk_reads_th
    , buffer_gets_th
    , sharable_mem_th
    , version_count_th
    , all_init
    , pin_statspack
    , last_modified
    values
    ( l_dbid
    , l_instance_number
    , p_def_session_id
    , p_def_snap_level
    , p_def_ucomment
    , p_def_num_sql
    , p_def_executions_th
    , p_def_parse_calls_th
    , p_def_disk_reads_th
    , p_def_buffer_gets_th
    , p_def_sharable_mem_th
    , p_def_version_count_th
    , p_def_all_init
    , p_def_pin_statspack
    , SYSDATE
    returning nvl(i_session_id, p_def_session_id)
    , nvl(i_snap_level, p_def_snap_level)
    , nvl(i_ucomment, p_def_ucomment)
    , nvl(i_num_sql, p_def_num_sql)
    , nvl(i_executions_th, p_def_executions_th)
    , nvl(i_parse_calls_th, p_def_parse_calls_th)
    , nvl(i_disk_reads_th, p_def_disk_reads_th)
    , nvl(i_buffer_gets_th, p_def_buffer_gets_th)
    , nvl(i_sharable_mem_th, p_def_sharable_mem_th)
    , nvl(i_version_count_th, p_def_version_count_th)
    , nvl(ui_all_init, p_def_all_init)
    , nvl(i_pin_statspack, p_def_pin_statspack)
    into o_session_id
    , o_snap_level
    , o_ucomment
    , o_num_sql
    , o_executions_th
    , o_parse_calls_th
    , o_disk_reads_th
    , o_buffer_gets_th
    , o_sharable_mem_th
    , o_version_count_th
    , o_all_init
    , o_pin_statspack;
    end; /* don't modify parameter values */
    elsif upper(i_modify_parameter) = 'TRUE' then
    /* modify values, if none exist, insert the defaults tempered
    with the variables supplied */
    begin
    update stats$statspack_parameter
    set session_id = nvl(i_session_id, session_id)
    , snap_level = nvl(i_snap_level, snap_level)
    , ucomment = nvl(i_ucomment, ucomment)
    , num_sql = nvl(i_num_sql, num_sql)
    , executions_th = nvl(i_executions_th, executions_th)
    , parse_calls_th = nvl(i_parse_calls_th, parse_calls_th)
    , disk_reads_th = nvl(i_disk_reads_th, disk_reads_th)
    , buffer_gets_th = nvl(i_buffer_gets_th, buffer_gets_th)
    , sharable_mem_th = nvl(i_sharable_mem_th, sharable_mem_th)
    , version_count_th = nvl(i_version_count_th, version_count_th)
    , all_init = nvl(ui_all_init, all_init)
    , pin_statspack = nvl(i_pin_statspack, pin_statspack)
    where instance_number = l_instance_number
    and dbid = l_dbid
    returning session_id
    , snap_level
    , ucomment
    , num_sql
    , executions_th
    , parse_calls_th
    , disk_reads_th
    , buffer_gets_th
    , sharable_mem_th
    , version_count_th
    , all_init
    , pin_statspack
    into o_session_id
    , o_snap_level
    , o_ucomment
    , o_num_sql
    , o_executions_th
    , o_parse_calls_th
    , o_disk_reads_th
    , o_buffer_gets_th
    , o_sharable_mem_th
    , o_version_count_th
    , o_all_init
    , o_pin_statspack;
    if SQL%ROWCOUNT = 0 then
    insert into stats$statspack_parameter
    ( dbid
    , instance_number
    , session_id
    , snap_level
    , ucomment
    , num_sql
    , executions_th
    , parse_calls_th
    , disk_reads_th
    , buffer_gets_th
    , sharable_mem_th
    , version_count_th
    , all_init
    , pin_statspack
    , last_modified
    values
    ( l_dbid
    , l_instance_number
    , nvl(i_session_id, p_def_session_id)
    , nvl(i_snap_level, p_def_snap_level)
    , nvl(i_ucomment, p_def_ucomment)
    , nvl(i_num_sql, p_def_num_sql)
    , nvl(i_executions_th, p_def_executions_th)
    , nvl(i_parse_calls_th, p_def_parse_calls_th)
    , nvl(i_disk_reads_th, p_def_disk_reads_th)
    , nvl(i_buffer_gets_th, p_def_buffer_gets_th)
    , nvl(i_sharable_mem_th, p_def_sharable_mem_th)
    , nvl(i_version_count_th, p_def_version_count_th)
    , nvl(ui_all_init, p_def_all_init)
    , nvl(i_pin_statspack, p_def_pin_statspack)
    , SYSDATE
    returning session_id
    , snap_level
    , ucomment
    , num_sql
    , executions_th
    , parse_calls_th
    , disk_reads_th
    , buffer_gets_th
    , sharable_mem_th
    , version_count_th
    , all_init
    , pin_statspack
    into o_session_id
    , o_snap_level
    , o_ucomment
    , o_num_sql
    , o_executions_th
    , o_parse_calls_th
    , o_disk_reads_th
    , o_buffer_gets_th
    , o_sharable_mem_th
    , o_version_count_th
    , o_all_init
    , o_pin_statspack;
    end if;
    end; /* modify values */
    else
    /* error */
    raise_application_error
    (-20100,'QAM_STATSPACK_PARAMETER i_modify_parameter value is invalid');
    end if; /* modify */
    end QAM_STATSPACK_PARAMETER;
    procedure STAT_CHANGES
    /* Returns a set of differences of the values from corresponding pairs
    of rows in STATS$SYSSTAT, STATS$LIBRARYCACHE and STATS$WAITSTAT,
    based on the begin and end (bid, eid) snapshot id's specified.
    This procedure is the only call to STATSPACK made by the statsrep
    report.
    Modified to include multi-db support.
    ( bid IN number
    , eid IN number
    , db_ident IN number
    , inst_num IN number
    , parallel IN varchar2
    , lhtr OUT number, bfwt OUT number
    , tran OUT number, chng OUT number
    , ucal OUT number, urol OUT number
    , rsiz OUT number
    , phyr OUT number, phyrd OUT number
    , phyrdl OUT number
    , phyw OUT number, ucom OUT number
    , prse OUT number, hprse OUT number
    , recr OUT number, gets OUT number
    , rlsr OUT number, rent OUT number
    , srtm OUT number, srtd OUT number
    , srtr OUT number, strn OUT number
    , lhr OUT number, bc OUT varchar2
    , sp OUT varchar2, lb OUT varchar2
    , bs OUT varchar2, twt OUT number
    , logc OUT number, prscpu OUT number
    , tcpu OUT number, exe OUT number
    , prsela OUT number
    , bspm OUT number, espm OUT number
    , bfrm OUT number, efrm OUT number
    , blog OUT number, elog OUT number
    , bocur OUT number, eocur OUT number
    , dmsd OUT number, dmfc OUT number -- begin OPS
    , dfcms OUT number, dfcmr OUT number
    , dmsi OUT number, dmrv OUT number
    , dynal OUT number, dynares OUT number
    , pmrv OUT number, pmpt OUT number
    , npmrv OUT number, npmpt OUT number
    , scma OUT number, scml OUT number
    , pinc OUT number, picrnc OUT number
    , picc OUT number, picrcc OUT number
    , pbc OUT number, pbcrc OUT number
    , pcba OUT number, pccrba OUT number
    , pcrbpi OUT number
    , dynapres OUT number, dynapshl OUT number
    , prcma OUT number, prcml OUT number
    , pwrm OUT number, pfpim OUT number
    , pwnm OUT number
    , dpms OUT number, dnpms OUT number
    , glsg OUT number, glag OUT number
    , glgt OUT number, glsc OUT number
    , glac OUT number, glct OUT number
    , glrl OUT number
    , gcge OUT number, gcgt OUT number
    , gccv OUT number, gcct OUT number
    , gccrrv OUT number, gccrrt OUT number
    , gccurv OUT number, gccurt OUT number
    , gccrsv OUT number
    , gccrbt OUT number, gccrft OUT number
    , gccrst OUT number, gccusv OUT number
    , gccupt OUT number, gccuft OUT number
    , gccust OUT number -- end OPS
    ) is
    bval number;
    eval number;
    l_b_session_id number; /* begin session id */
    l_b_serial# number; /* begin serial# */
    l_e_session_id number; /* end session id */
    l_e_serial# number; /* end serial# */
    function LIBRARYCACHE_HITRATIO RETURN number is
    /* Returns Library cache hit ratio for the begin and end (bid, eid)
    snapshot id's specified
    cursor LH (i_snap_id number) is
    select sum(pins), sum(pinhits)
    from stats$librarycache
    where snap_id = i_snap_id
    and dbid = db_ident
    and instance_number = inst_num;
    bpsum number;
    bhsum number;
    epsum number;
    ehsum number;
    begin
    if not LH%ISOPEN then open LH (bid); end if;
    fetch LH into bpsum, bhsum;
    if LH%NOTFOUND then
    raise_application_error
    (-20100,'Missing start value for stats$librarycache');
    end if; close LH;
    if not LH%ISOPEN then open LH (eid); end if;
    fetch LH into epsum, ehsum;
    if LH%NOTFOUND then
    raise_application_error
    (-20100,'Missing end value for stats$librarycache');
    end if; close LH;
    return (ehsum - bhsum) / (epsum - bpsum);
    end LIBRARYCACHE_HITRATIO;
    function GET_PARAM (i_name varchar2) RETURN varchar2 is
    /* Returns the value for the init.ora parameter for the snapshot
    specified.
    cursor PARAMETER is
    select value
    from stats$parameter
    where snap_id = eid
    and dbid = db_ident
    and instance_number = inst_num
    and name = i_name;
    par_value varchar2(512);
    begin
    if not PARAMETER%ISOPEN then open PARAMETER; end if;
    fetch PARAMETER into par_value;
    if PARAMETER%NOTFOUND then
    raise_application_error
    (-20100,'Missing Init.ora parameter '|| i_name);
    end if; close PARAMETER;
    return par_value;
    end GET_PARAM;
    function GET_SYSSTAT (i_name varchar2, i_beid number) RETURN number is
    /* Returns the value for the System Statistic for the snapshot
    specified.
    cursor SYSSTAT is
    select value
    from stats$sysstat
    where snap_id = i_beid
    and dbid = db_ident
    and instance_number = inst_num
    and name = i_name;
    stat_value varchar2(512);
    begin
    if not SYSSTAT%ISOPEN then open SYSSTAT; end if;
    fetch SYSSTAT into stat_value;
    if SYSSTAT%NOTFOUND then
    raise_application_error
    (-20100,'Missing System Statistic '|| i_name);
    end if; close SYSSTAT;
    return stat_value;
    end GET_SYSSTAT;
    function BUFFER_WAITS RETURN number is
    /* Returns the total number of waits for all buffers in the interval
    specified by the begin and end snapshot id's (bid, eid)
    cursor BW (i_snap_id number) is
    select sum(wait_count)
    from stats$waitstat
    where snap_id = i_snap_id
    and dbid = db_ident
    and instance_number = inst_num;
    bbwsum number; ebwsum number;
    begin
    if not BW%ISOPEN then open BW (bid); end if;
    fetch BW into bbwsum;
    if BW%NOTFOUND then
    raise_application_error
    (-20100,'Missing start value for stats$waitstat');
    end if; close BW;
    if not BW%ISOPEN then open BW (eid); end if;
    fetch BW into ebwsum;
    if BW%NOTFOUND then
    raise_application_error
    (-20100,'Missing end value for stats$waitstat');
    end if; close BW;
    return ebwsum - bbwsum;
    end BUFFER_WAITS;
    function TOTAL_EVENT_TIME RETURN number is
    /* Returns the total amount of time waited for events for
    the interval specified by the begin and end snapshot id's
    (bid, eid) by foreground processes. This excludes idle
    wait events.
    cursor WAITS (i_snap_id number) is
    select sum(time_waited_micro)
    from stats$system_event
    where snap_id = i_snap_id
    and dbid = db_ident
    and instance_number = inst_num
    and event not in (select event from stats$idle_event);
    bwaittime number;
    ewaittime number;
    begin
    if not WAITS%ISOPEN then open WAITS (bid); end if;
    fetch WAITS into bwaittime;
    if WAITS%NOTFOUND then
    raise_application_error
    (-20100,'Missing start value for stats$system_event');
    end if; close WAITS;
    if not WAITS%ISOPEN then open WAITS (eid); end if;
    fetch WAITS into ewaittime;
    if WAITS%NOTFOUND then
    raise_application_error
    (-20100,'Missing end value for stats$system_event');
    end if; close WAITS;
    return ewaittime - bwaittime;
    end TOTAL_EVENT_TIME;
    function LATCH_HITRATIO return NUMBER is
    /* Returns the latch hit ratio specified by the begin and
    end snapshot id's (bid, eid)
    cursor GETS_MISSES (i_snap_id number) is
    select sum(gets), sum(misses)
    from stats$latch
    where snap_id = i_snap_id
    and dbid = db_ident
    and instance_number = inst_num;
    blget number; -- beginning latch gets
    blmis number; -- beginning latch misses
    elget number; -- end latch gets
    elmis number; -- end latch misses
    begin
    if not GETS_MISSES%ISOPEN then open GETS_MISSES (bid); end if;
    fetch GETS_MISSES into blget, blmis;
    if GETS_MISSES%NOTFOUND then
    raise_application_error
    (-20100,'Missing start value for STATS$LATCH gets and misses');
    end if; close GETS_MISSES;
    if not GETS_MISSES%ISOPEN then open GETS_MISSES (eid); end if;
    fetch GETS_MISSES into elget, elmis;
    if GETS_MISSES%NOTFOUND then
    raise_application_error
    (-20100,'Missing end value for STATS$LATCH gets and misses');
    end if; close GETS_MISSES;
    return ( ( elmis - blmis ) / ( elget - blget ) );
    end LATCH_HITRATIO;
    function SGASTAT (i_name varchar2, i_beid number) RETURN number is
    /* Returns the bytes used by i_name in the shared pool
    for the begin or end snapshot (bid, eid) specified
    cursor bytes_used is
    select bytes
    from stats$sgastat
    where snap_id = i_beid
    and dbid = db_ident
    and instance_number = inst_num
    and pool in ('shared pool', 'all pools')
    and name = i_name;
    total_bytes number;
    begin
    if i_name = 'total_shared_pool' then
    select sum(bytes)
    into total_bytes
    from stats$sgastat
    where snap_id = i_beid
    and dbid = db_ident
    and instance_number = inst_num
    and pool in ('shared pool','all pools');
    else
    open bytes_used; fetch bytes_used into total_bytes;
    if bytes_used%notfound then
    raise_application_error
    (-20100,'Missing value for SGASTAT: '||i_name);
    end if;
    close bytes_used;
    end if;
    return total_bytes;
    end SGASTAT;
    function SYSDIF (i_name varchar2) RETURN number is
    /* Returns the difference between statistics for the statistic
    name specified for the interval between the begin and end
    snapshot id's (bid, eid)
    cursor SY (i_snap_id number) is
    select value
    from stats$sysstat
    where snap_id = i_snap_id
    and dbid = db_ident
    and instance_number = inst_num
    and name = i_name;
    begin
    /* Get start value */
    open SY (bid); fetch SY into bval;
    if SY%notfound then
    raise_application_error
    (-20100,'Missing start value for statistic: '||i_name);
    end if; close SY;
    /* Get end value */
    open SY (eid); fetch SY into eval;
    if SY%notfound then
    raise_application_error
    (-20100,'Missing end value for statistic: '||i_name);
    end if; close SY;
    /* Return difference */
    return eval - bval;
    end SYSDIF;
    function SESDIF (st_name varchar2) RETURN number is
    /* Returns the difference between statistics values for the
    statistic name specified for the interval between the begin and end
    snapshot id's (bid, eid), for the session monitored for that
    snapshot
    cursor SE (i_snap_id number) is
    select ses.value
    from stats$sysstat sys
    , stats$sesstat ses
    where sys.snap_id = i_snap_id
    and ses.snap_id = i_snap_id
    and ses.dbid = db_ident
    and sys.dbid = db_ident
    and ses.instance_number = inst_num
    and sys.instance_number = inst_num
    and ses.statistic# = sys.statistic#
    and sys.name = st_name;
    begin
    /* Get start value */
    open SE (bid); fetch SE into bval;
    if SE%notfound then
    eval :=0;
    end if; close SE;
    /* Get end value */
    open SE (eid); fetch SE into eval;
    if SE%notfound then
    eval :=0;
    end if; close SE;
    /* Return difference */
    return eval - bval;
    end SESDIF;
    function DLMDIF (i_name varchar2) RETURN number is
    /* Returns the difference between statistics for the statistic
    name specified for the interval between the begin and end
    snapshot id's (bid, eid)
    cursor DLM (i_snap_id number) is
    select value
    from stats$dlm_misc
    where snap_id = i_snap_id
    and dbid = db_ident
    and instance_number = inst_num
    and name = i_name;
    begin
    /* Get start value */
    open DLM (bid); fetch DLM into bval;
    if DLM%notfound then
    raise_application_error
    (-20100,'Missing start value for statistic: '||i_name);
    end if; close DLM;
    /* Get end value */
    open DLM (eid); fetch DLM into eval;
    if DLM%notfound then
    raise_application_error
    (-20100,'Missing end value for statistic: '||i_name);
    end if; close DLM;
    /* Return difference */
    return eval - bval;
    end DLMDIF;
    begin /* main procedure body of STAT_CHANGES */
    lhtr := LIBRARYCACHE_HITRATIO;
    bfwt := BUFFER_WAITS;
    lhr := LATCH_HITRATIO;
    chng := SYSDIF('db block changes');
    ucal := SYSDIF('user calls');
    urol := SYSDIF('user rollbacks');
    ucom := SYSDIF('user commits');
    tran := ucom + urol;
    rsiz := SYSDIF('redo size');
    phyr := SYSDIF('physical reads');
    phyrd := SYSDIF('physical reads direct');
    phyrdl := SYSDIF('physical reads direct (lob)');
    phyw := SYSDIF('physical writes');
    hprse := SYSDIF('parse count (hard)');
    prse := SYSDIF('parse count (total)');
    gets := SYSDIF('session logical reads');
    recr := SYSDIF('recursive calls');
    rlsr := SYSDIF('redo log space requests');
    rent := SYSDIF('redo entries');
    srtm := SYSDIF('sorts (memory)');
    srtd := SYSDIF('sorts (disk)');
    srtr := SYSDIF('sorts (rows)');
    logc := SYSDIF('logons cumulative');
    prscpu := SYSDIF('parse time cpu');
    prsela := SYSDIF('parse time elapsed');
    tcpu := SYSDIF('CPU used by this session');
    exe := SYSDIF('execute count');
    bs := GET_PARAM('db_block_size');
    bc := GET_PARAM('db_block_buffers') * bs;
    if bc = 0 then
    bc := GET_PARAM('db_cache_size')
    + GET_PARAM('db_keep_cache_size')
    + GET_PARAM('db_recycle_cache_size')
    + GET_PARAM('db_2k_cache_size')
    + GET_PARAM('db_4k_cache_size')
    + GET_PARAM('db_8k_cache_size')
    + GET_PARAM('db_16k_cache_size')
    + GET_PARAM('db_32k_cache_size');
    end if;
    sp := GET_PARAM('shared_pool_size');
    lb := GET_PARAM('log_buffer');
    twt := TOTAL_EVENT_TIME; -- total wait time for all non-idle events
    bspm := SGASTAT('total_shared_pool', bid);
    espm := SGASTAT('total_shared_pool', eid);
    bfrm := SGASTAT('free memory', bid);
    efrm := SGASTAT('free memory', eid);
    blog := GET_SYSSTAT('logons current', bid);
    elog := GET_SYSSTAT('logons current', eid);
    bocur := GET_SYSSTAT('opened cursors current', bid);
    eocur := GET_SYSSTAT('opened cursors current', eid);
    /* Do we want to report on cluster-specific statistics? Check
    in procedure variable "parallel".
    if parallel = 'YES' then
    dmsd := DLMDIF('messages sent directly');
    dmfc := DLMDIF('messages flow controlled');
    dmsi := DLMDIF('messages sent indirectly');
    dmrv := DLMDIF('messages received');
    dfcms := DLMDIF('flow control messages sent');
    dfcmr := DLMDIF('flow control messages received');
    dynal := DLMDIF('dynamically allocated enqueues');
    dynares := DLMDIF('dynamically allocated resources');
    pmrv := DLMDIF('gcs msgs received');
    pmpt := DLMDIF('gcs msgs process time(ms)');
    npmrv := DLMDIF('ges msgs received');
    npmpt := DLMDIF('ges msgs process time(ms)');
    scma := DLMDIF('gcs side channel msgs actual');
    scml := DLMDIF('gcs side channel msgs logical');
    pinc := DLMDIF('gcs immediate (null) converts');
    picrnc := DLMDIF('gcs immediate cr (null) converts');
    picc := DLMDIF('gcs immediate (compatible) converts');
    picrcc := DLMDIF('gcs immediate cr (compatible) converts');
    pbc := DLMDIF('gcs blocked converts');
    pbcrc := DLMDIF('gcs blocked cr converts');
    pcba := DLMDIF('gcs compatible basts');
    pccrba := DLMDIF('gcs compatible cr basts');
    pcrbpi := DLMDIF('gcs cr basts to PIs');
    dynapres := DLMDIF('dynamically allocated gcs resources');
    dynapshl := DLMDIF('dynamically allocated gcs shadows');
    prcma := DLMDIF('gcs recovery claim msgs actual');
    prcml := DLMDIF('gcs recovery claim msgs logical');
    pwrm := DLMDIF('gcs write request msgs');
    pfpim := DLMDIF('gcs flush pi msgs');
    pwnm := DLMDIF('gcs write notification msgs');
    dpms := SYSDIF('gcs messages sent');
    dnpms := SYSDIF('ges messages sent');
    glsg := SYSDIF('global lock sync gets');
    glag := SYSDIF('global lock async gets');
    glgt := SYSDIF('global lock get time');
    glsc := SYSDIF('global lock sync converts');
    glac := SYSDIF('global lock async converts');
    glct := SYSDIF('global lock convert time');
    glrl := SYSDIF('global lock releases');
    gcge := SYSDIF('global cache gets');
    gcgt := SYSDIF('global cache get time');
    gccv := SYSDIF('global cache converts');
    gcct := SYSDIF('global cache convert time');
    gccrrv := SYSDIF('global cache cr blocks received');
    gccrrt := SYSDIF('global cache cr block receive time');
    gccurv := SYSDIF('global cache current blocks received');
    gccurt := SYSDIF('global cache current block receive time');
    gccrsv := SYSDIF('global cache cr blocks served');
    gccrbt := SYSDIF('global cache cr block build time');
    gccrft := SYSDIF('global cache cr block flush time');
    gccrst := SYSDIF('global cache cr block send time');
    gccusv := SYSDIF('global cache current blocks served');
    gccupt := SYSDIF('global cache current block pin time');
    gccuft := SYSDIF('global cache current block flush time');
    gccust := SYSDIF('global cache current block send time');
    end if;
    /* Determine if we want to report on session-specific statistics.
    Check that the session is the same one for both snapshots.
    select session_id
    , serial#
    into l_b_session_id
    , l_b_serial#
    from stats$snapshot
    where snap_id = bid
    and dbid = db_ident
    and instance_number = inst_num;
    select session_id
    , serial#
    into l_e_session_id
    , l_e_serial#
    from stats$snapshot
    where snap_id = eid
    and dbid = db_ident
    and instance_number = inst_num;
    if ( (l_b_session_id = l_e_session_id)
    and (l_b_serial# = l_e_serial#)
    and (l_b_session_id != 0) ) then
    /* we have a valid comparison - it is the
    same session - get number of tx performed
    by this session */
    strn := SESDIF('user rollbacks') + SESDIF('user commits');
    if strn = 0 then
    /* No new transactions */
    strn := 1;
    end if;
    else
    /* No valid comparison can be made */
    strn :=1;
    end if;
    end STAT_CHANGES;
    function SNAP
    (i_snap_level in number default null
    ,i_session_id in number default null
    ,i_ucomment in varchar2 default null
    ,i_num_sql in number default null
    ,i_executions_th in number default null
    ,i_parse_calls_th in number default null
    ,i_disk_reads_th in number default null
    ,i_buffer_gets_th in number default null
    ,i_sharable_mem_th in number default null
    ,i_version_count_th in number default null
    ,i_all_init in varchar2 default null
    ,i_pin_statspack in varchar2 default null
    ,i_modify_parameter in varchar2 default 'FALSE'
    RETURN integer IS
    /* This function performs a snapshot of the v$ views into the
    stats$ tables, and returns the snapshot id.
    If parameters are passed, these are the values used, otherwise
    the values stored in the stats$statspack_parameter table are used.
    l_snap_id integer;
    l_snap_level number;
    l_session_id number;
    l_serial# number;
    l_ucomment varchar2(160);
    l_num_sql number;
    l_executions_th number;
    l_parse_calls_th number;
    l_disk_reads_th number;
    l_buffer_gets_th number;
    l_sharable_mem_th number;
    l_version_count_th number;
    l_all_init varchar2(5);
    l_pin_statspack varchar2(10);
    l_sql_stmt varchar2(3000);
    l_slarti varchar2(20);
    l_threshold number;
    l_total_sql number := 0;
    l_total_sql_mem number := 0;
    l_single_use_sql number := 0;
    l_single_use_sql_mem number := 0;
    l_text_subset varchar2(31);
    l_sharable_mem number;
    l_version_count number;
    l_sorts number;
    l_module varchar2(64);
    l_loaded_versions number;
    l_executions number;
    l_loads number;
    l_invalidations number;
    l_parse_calls number;
    l_disk_reads number;
    l_buffer_gets number;
    l_rows_processed number;
    l_address raw(8);
    l_hash_value number;
    l_version_count number;
    l_max_begin_time date;
    cursor GETSERIAL is
    select serial#
    from v$session
    where sid = l_session_id;
    PROCEDURE snap_sql IS
    begin
    /* Gather summary statistics */
    insert into stats$sql_statistics
    ( snap_id
    , dbid
    , instance_number
    , total_sql
    , total_sql_mem
    , single_use_sql
    , single_use_sql_mem
    select l_snap_id
    , p_dbid
    , p_instance_number
    , count(1)
    , sum(sharable_mem)
    , sum(decode(executions, 1, 1, 0))
    , sum(decode(executions, 1, sharable_mem, 0))
    from stats$v$sqlxs
    where is_obsolete = 'N';
    /* Gather SQL statements which exceed any threshold,
    excluding obsolete parent cursors
    insert into stats$sql_summary
    ( snap_id
    , dbid
    , instance_number
    , text_subset
    , sharable_mem
    , sorts
    , module
    , loaded_versions
    , executions
    , loads
    , invalidations
    , parse_calls
    , disk_reads
    , buffer_gets
    , rows_processed
    , command_type
    , address
    , hash_value
    , version_count
    , cpu_time
    , elapsed_time
    , outline_sid
    , outline_category
    select l_snap_id
    , p_dbid
    , p_instance_number
    , substr(sql_text,1,31)
    , sharable_mem
    , sorts
    , module
    , loaded_versions
    , executions
    , loads
    , invalidations
    , parse_calls
    , disk_reads
    , buffer_gets
    , rows_processed
    , command_type
    , address
    , hash_value
    , version_count
    , cpu_time
    , elapsed_time
    , outline_sid
    , outline_category
    from stats$v$sqlxs
    where is_obsolete = 'N'
    and ( buffer_gets > l_buffer_gets_th
    or disk_reads > l_disk_reads_th
    or parse_calls > l_parse_calls_th
    or executions > l_executions_th
    or sharable_mem > l_sharable_mem_th
    or version_count > l_version_count_th
    /* Insert the SQL Text for hash_values captured in the snapshot
    into stats$sqltext if it's not already there. Identify SQL which
    execeeded the threshold by querying stats$sql_summary for this
    snapid and database instance
    insert into stats$sqltext
    ( hash_value
    , text_subset
    , piece
    , sql_text
    , address
    , command_type
    , last_snap_id
    select st1.hash_value
    , ss.text_subset
    , st1.piece
    , st1.sql_text
    , st1.address
    , st1.command_type
    , ss.snap_id
    from v$sqltext st1
    , stats$sql_summary ss
    where ss.snap_id = l_snap_id
    and ss.dbid = p_dbid
    and ss.instance_number = p_instance_number
    and st1.hash_value = ss.hash_value
    and st1.address = ss.address
    and not exists (select 1
    from stats$sqltext st2
    where st2.hash_value = ss.hash_value
    and st2.text_subset = ss.text_subset
    IF l_snap_level >= 6 THEN
    /* Identify SQL which execeeded the threshold by querying
    stats$sql_summary for this snapid and database instance.
    Capture the plans which were used for the high-load SQL if
    don't already have this data.
    Omit capturing plan usage information for cursors which
    have a zero plan hash value.
    Currently this is captured in a level 6 (or greater)
    snapshot, however this may be integrated into level 5
    snapshot at a later date.
    hl - high load
    insert into stats$sql_plan_usage
    ( hash_value
    , text_subset
    , plan_hash_value
    , cost
    , snap_id
    , address
    , optimizer
    select hl.hash_value
    , hl.text_subset
    , hl.plan_hash_value
    , hl.cost
    , max(hl.snap_id)
    , max(hl.address)
    , max(hl.optimizer)
    from (select /*+ ordered use_nl(sq) index(sq) */
    ss.hash_value
    , ss.text_subset
    , sq.plan_hash_value
    , nvl(sq.optimizer_cost,-9) cost
    , ss.snap_id snap_id
    , ss.address
    , sq.optimizer_mode optimizer
    from stats$sql_summary ss
    , v$sql sq
    where ss.snap_id = l_snap_id
    and ss.dbid = p_dbid
    and ss.instance_number = p_instance_number
    and sq.hash_value = ss.hash_value
    and sq.address = ss.address
    and sq.plan_hash_value > 0
    ) hl
    where not exists (select /*+ no_unnest */
    from stats$sql_plan_usage spu
    where spu.hash_value = hl.hash_value
    and spu.text_subset = hl.text_subset
    and spu.plan_hash_value
    = hl.plan_hash_value
    and spu.cost = hl.cost
    group by hl.hash_value
    , hl.text_subset
    , hl.plan_hash_value
    , hl.cost
    , hl.optimizer;
    /* For all new hash_value, plan_hash_value, cost combinations
    just captured, get the optimizer plans, if we don't already
    have them. Note that the plan (and hence the plan hash value)
    comprises the access path and the join order (and not
    variable factors such as the cardinality).
    insert into stats$sql_plan
    ( plan_hash_value
    , id
    , operation
    , options
    , object_node
    , object#
    , object_owner
    , object_name
    , optimizer
    , parent_id
    , depth
    , position
    , cost
    , cardinality
    , bytes
    , other_tag
    , partition_start
    , partition_stop
    , partition_id
    , other
    , distribution
    , cpu_cost
    , io_cost
    , temp_space
    , snap_id
    select /*+ ordered use_nl(s) use_nl(sp.p) */
    new_plan.plan_hash_value
    , sp.id
    , max(sp.operation)
    , max(sp.options)
    , max(sp.object_node)
    , max(sp.object#)
    , max(sp.object_owner)
    , max(sp.object_name)
    , max(sp.optimizer)
    , max(sp.parent_id)
    , max(sp.depth)
    , max(sp.position)
    , max(sp.cost)
    , max(sp.cardinality)
    , max(sp.bytes)
    , max(sp.other_tag)
    , max(sp.partition_start)
    , max(sp.partition_stop)
    , max(sp.partition_id)
    , max(sp.other)
    , max(sp.distribution)
    , max(sp.cpu_cost)
    , max(sp.io_cost)
    , max(sp.temp_space)
    , max(new_plan.snap_id)
    from (select /*+ index(spu) */
    distinct
    spu.plan_hash_value
    , spu.hash_value
    , spu.address
    , spu.text_subset
    , spu.snap_id
    from stats$sql_plan_usage spu
    where spu.snap_id = l_snap_id
    and not exists (select /*+ nl_aj */ *
    from stats$sql_plan ssp
    where ssp.plan_hash_value
    = spu.plan_hash_value
    ) new_plan
    , v$sql s
    , v$sql_plan sp
    where sp.hash_value = new_plan.hash_value
    and sp.address = new_plan.address
    and s.hash_value = new_plan.hash_value
    and s.address = new_plan.address
    and s.hash_value = sp.hash_value
    and s.address = sp.address
    and s.child_number = sp.child_number
    group by
    new_plan.plan_hash_value
    , sp.id;
    END IF; /* snap level >=6 */
    END snap_sql;
    begin /* Function SNAP */
    /* Get instance parameter defaults from stats$statspack_parameter,
    or use supplied parameters.
    If all parameters are specified, use them, otherwise get values
    from the parameters not specified from stats$statspack_parameter.
    statspack.qam_statspack_parameter
    ( p_dbid
    , p_instance_number
    , i_snap_level, i_session_id, i_ucomment, i_num_sql
    , i_executions_th, i_parse_calls_th
    , i_disk_reads_th, i_buffer_gets_th, i_sharable_mem_th
    , i_version_count_th, i_all_init
    , i_pin_statspack
    , i_modify_parameter
    , l_snap_level, l_session_id, l_ucomment, l_num_sql
    , l_executions_th, l_parse_calls_th
    , l_disk_reads_th, l_buffer_gets_th, l_sharable_mem_th
    , l_version_count_th, l_all_init
    , l_pin_statspack);
    /* Generate a snapshot id */
    select stats$snapshot_id.nextval
    into l_snap_id
    from dual
    where rownum = 1;
    /* Determine the serial# of the session to maintain stats for,
    if this was requested.
    if l_session_id > 0 then
    if not GETSERIAL%ISOPEN then open GETSERIAL; end if;
    fetch GETSERIAL into l_serial#;
    if GETSERIAL%NOTFOUND then
    /* Session has already disappeared - don't gather
    statistics for this session in this snapshot */
    l_session_id := 0;
    l_serial# := 0;
    end if; close GETSERIAL;
    else
    l_serial# := 0;
    end if;
    /* The instance has been restarted since the last snapshot */
    if p_new_sga = 0
    then
    begin
    p_new_sga := 1;
    /* Get the instance startup time, and other characteristics */
    insert into stats$database_instance
    ( dbid
    , instance_number
    , startup_time
    , snap_id
    , parallel
    , version
    , db_name
    , instance_name
    , host_name
    select p_dbid
    , p_instance_number
    , p_startup_time
    , l_snap_id
    , p_parallel
    , p_version
    , p_name
    , p_instance_name
    , p_host_name
    from sys.dual;
    commit;
    end;
    end if; /* new SGA */
    /* Work out the max undo stat time, used for gathering undo stat data */
    select nvl(max(begin_time), to_date('01011900','DDMMYYYY'))
    into l_max_begin_time
    from stats$undostat
    where dbid = p_dbid
    and instance_number = p_instance_number;
    /* Save the snapshot characteristics */
    insert into stats$snapshot
    ( snap_id, dbid, instance_number
    , snap_time, startup_time
    , session_id, snap_level, ucomment
    , executions_th, parse_calls_th, disk_reads_th
    , buffer_gets_th, sharable_mem_th
    , version_count_th, serial#, all_init)
    values
    ( l_snap_id, p_dbid, p_instance_number
    , SYSDATE, p_startup_time
    , l_session_id, l_snap_level, l_ucomment
    , l_executions_th, l_parse_calls_th, l_disk_reads_th
    , l_buffer_gets_th, l_sharable_mem_th
    , l_version_count_th, l_serial#, l_all_init);
    /* Begin gathering statistics */
    insert into stats$filestatxs
    ( snap_id
    , dbid
    , instance_number
    , tsname
    , filename
    , phyrds
    , phywrts
    , singleblkrds
    , readtim
    , writetim
    , singleblkrdtim
    , phyblkrd
    , phyblkwrt
    , wait_count
    , time
    select l_snap_id
    , p_dbid
    , p_instance_number
    , tsname
    , filename
    , phyrds
    , phywrts
    , singleblkrds
    , readtim
    , writetim
    , singleblkrdtim
    , phyblkrd
    , phyblkwrt
    , wait_count
    , time
    from stats$v$filestatxs;
    insert into stats$tempstatxs
    ( snap_id
    , dbid
    , instance_number
    , tsname
    , filename
    , phyrds
    , phywrts
    , singleblkrds
    , readtim
    , writetim
    , singleblkrdtim
    , phyblkrd
    , phyblkwrt
    , wait_count
    , time
    select l_snap_id
    , p_dbid
    , p_instance_number
    , tsname
    , filename
    , phyrds
    , phywrts
    , singleblkrds
    , readtim
    , writetim
    , singleblkrdtim
    , phyblkrd
    , phyblkwrt
    , wait_count
    , time
    from stats$v$tempstatxs;
    insert into stats$librarycache
    ( snap_id
    , dbid
    , instance_number
    , namespace
    , gets
    , gethits
    , pins
    , pinhits
    , reloads
    , invalidations
    , dlm_lock_requests
    , dlm_pin_requests
    , dlm_pin_releases
    , dlm_invalidation_requests
    , dlm_invalidations
    select l_snap_id
    , p_dbid
    , p_instance_number
    , namespace
    , gets
    , gethits
    , pins
    , pinhits
    , reloads
    , invalidations
    , dlm_lock_requests
    , dlm_pin_requests
    , dlm_pin_releases
    , dlm_invalidation_requests
    , dlm_invalidations
    from v$librarycache;
    insert into stats$buffer_pool_statistics
    ( snap_id
    , dbid
    , instance_number
    , id
    , name
    , block_size
    , set_msize
    , cnum_repl
    , cnum_write
    , cnum_set
    , buf_got
    , sum_write
    , sum_scan
    , free_buffer_wait
    , write_complete_wait
    , buffer_busy_wait
    , free_buffer_inspected
    , dirty_buffers_inspected
    , db_block_change
    , db_block_gets
    , consistent_gets
    , physical_reads
    , physical_writes
    select l_snap_id
    , p_dbid
    , p_instance_number
    , id
    , name
    , block_size
    , set_msize
    , cnum_repl
    , cnum_write
    , cnum_set
    , buf_got
    , sum_write
    , sum_scan
    , free_buffer_wait
    , write_complete_wait
    , buffer_busy_wait
    , free_buffer_inspected
    , dirty_buffers_inspected
    , db_block_change
    , db_block_gets
    , consistent_gets
    , physical_reads
    , physical_writes
    from v$buffer_pool_statistics;
    insert into stats$rollstat
    ( snap_id
    , dbid
    , instance_number
    , usn
    , extents
    , rssize
    , writes
    , xacts
    , gets
    , waits
    , optsize
    , hwmsize
    , shrinks
    , wraps
    , extends
    , aveshrink
    , aveactive
    select l_snap_id
    , p_dbid
    , p_instance_number
    , usn
    , extents
    , rssize
    , writes
    , xacts
    , gets
    , waits
    , optsize
    , hwmsize
    , shrinks
    , wraps
    , extends
    , aveshrink
    , aveactive
    from v$rollstat;
    insert into stats$rowcache_summary
    ( snap_id
    , dbid
    , instance_number
    , parameter
    , total_usage
    , usage
    , gets
    , getmisses
    , scans
    , scanmisses
    , scancompletes
    , modifications
    , flushes
    , dlm_requests
    , dlm_conflicts
    , dlm_releases
    select l_snap_id
    , p_dbid
    , p_instance_number
    , parameter
    , sum("COUNT")
    , sum(usage)
    , sum(gets)
    , sum(getmisses)
    , sum(scans)
    , sum(scanmisses)
    , sum(scancompletes)
    , sum(modifications)
    , sum(flushes)
    , sum(dlm_requests)
    , sum(dlm_conflicts)
    , sum(dlm_releases)
    from v$rowcache
    group by l_snap_id, p_dbid, p_instance_number, parameter;
    /* Collect parameters every snapshot, to cater for dynamic
    parameters changable while instance is running
    if l_all_init = 'FALSE' then
    insert into stats$parameter
    ( snap_id
    , dbid
    , instance_number
    , name
    , value
    , isdefault
    , ismodified
    select l_snap_id
    , p_dbid
    , p_instance_number
    , name
    , value
    , isdefault
    , ismodified
    from v$system_parameter;
    else
    insert into stats$parameter
    ( snap_id
    , dbid
    , instance_number
    , name
    , value
    , isdefault
    , ismodified
    select l_snap_id
    , p_dbid
    , p_instance_number
    , i.ksppinm
    , sv.ksppstvl
    , sv.ksppstdf
    , decode(bitand(sv.ksppstvf,7),1,'MODIFIED',4,'SYSTEM_MOD','FALSE')
    from stats$x$ksppi i
    , stats$x$ksppsv sv
    where i.indx = sv.indx;
    end if;
    /* To cater for variable size SGA - insert on each snapshot */
    insert into stats$sga
    ( snap_id
    , dbid
    , instance_number
    , name
    , value
    select l_snap_id
    , p_dbid
    , p_instance_number
    , name
    , value
    from v$sga;
    /* Get current allocation of memory in the SGA */
    insert into stats$sgastat
    ( snap_id
    , dbid
    , instance_number
    , pool
    , name
    , bytes
    select l_snap_id
    , p_dbid
    , p_instance_number
    , pool
    , name
    , bytes
    from v$sgastat;
    insert into stats$system_event
    ( snap_id
    , dbid
    , instance_number
    , event
    , total_waits
    , total_timeouts
    , time_waited_micro
    select l_snap_id
    , p_dbid
    , p_instance_number
    , event
    , total_waits
    , total_timeouts
    , time_waited_micro
    from v$system_event;
    insert into stats$bg_event_summary
    ( snap_id
    , dbid
    , instance_number
    , event
    , total_waits
    , total_timeouts
    , time_waited_micro
    select l_snap_id
    , p_dbid
    , p_instance_number
    , e.event
    , sum(e.total_waits)
    , sum(e.total_timeouts)
    , sum(e.time_waited_micro)
    from v$session_event e
    where e.sid in (select s.sid from v$session s where s.type = 'BACKGROUND')
    group by l_snap_id, p_dbid, p_instance_number, e.event;
    insert into stats$sysstat
    ( snap_id
    , dbid
    , instance_number
    , statistic#
    , name
    , value
    select l_snap_id
    , p_dbid
    , p_instance_number
    , statistic#
    , name
    , value
    from v$sysstat;
    insert into stats$waitstat
    ( snap_id
    , dbid
    , instance_number
    , class
    , wait_count
    , time
    select l_snap_id
    , p_dbid
    , p_instance_number
    , class
    , "COUNT"
    , time
    from v$waitstat;
    insert into stats$enqueue_stat
    ( snap_id
    , dbid
    , instance_number
    , eq_type
    , total_req#
    , total_wait#
    , succ_req#
    , failed_req#
    , cum_wait_time
    select l_snap_id
    , p_dbid
    , p_instance_number
    , eq_type
    , total_req#
    , total_wait#
    , succ_req#
    , failed_req#
    , cum_wait_time
    from v$enqueue_stat
    where total_req# != 0;
    insert into stats$latch
    ( snap_id
    , dbid
    , instance_number
    , name
    , latch#
    , level#
    , gets
    , misses
    , sleeps
    , immediate_gets
    , immediate_misses
    , spin_gets
    , sleep1
    , sleep2
    , sleep3
    , sleep4
    , wait_time
    select l_snap_id
    , p_dbid
    , p_instance_number
    , name
    , latch#
    , level#
    , gets
    , misses
    , sleeps
    , immediate_gets
    , immediate_misses
    , spin_gets
    , sleep1
    , sleep2
    , sleep3
    , sleep4
    , wait_time
    from v$latch;
    insert into stats$latch_misses_summary
    ( snap_id
    , dbid
    , instance_number
    , parent_name
    , where_in_code
    , nwfail_count
    , sleep_count
    , wtr_slp_count
    select l_snap_id
    , p_dbid
    , p_instance_number
    , parent_name
    , "WHERE"
    , sum(nwfail_count)
    , sum(sleep_count)
    , sum(wtr_slp_count)
    from v$latch_misses
    where sleep_count > 0
    group by l_snap_id, p_dbid, p_instance_number
    , parent_name, "WHERE";
    insert into stats$resource_limit
    ( snap_id
    , dbid
    , instance_number
    , resource_name
    , current_utilization
    , max_utilization
    , initial_allocation
    , limit_value
    select l_snap_id
    , p_dbid
    , p_instance_number
    , resource_name
    , current_utilization
    , max_utilization
    , initial_allocation
    , limit_value
    from v$resource_limit
    where limit_value != ' UNLIMITED'
    and max_utilization > 0;
    insert into stats$undostat
    ( begin_time
    , end_time
    , dbid
    , instance_number
    , snap_id
    , undotsn
    , undoblks
    , txncount
    , maxquerylen
    , maxconcurrency
    , unxpstealcnt
    , unxpblkrelcnt
    , unxpblkreucnt
    , expstealcnt
    , expblkrelcnt
    , expblkreucnt
    , ssolderrcnt
    , nospaceerrcnt
    select begin_time
    , end_time
    , p_dbid
    , p_instance_number
    , l_snap_id
    , undotsn
    , undoblks
    , txncount
    , maxquerylen
    , maxconcurrency
    , unxpstealcnt
    , unxpblkrelcnt
    , unxpblkreucnt
    , expstealcnt
    , expblkrelcnt
    , expblkreucnt
    , ssolderrcnt
    , nospaceerrcnt
    from v$undostat
    where begin_time > l_max_begin_time
    and begin_time + (1/(24*6)) <= end_time;
    insert into stats$db_cache_advice
    ( snap_id
    , dbid
    , instance_number
    , id
    , name
    , block_size
    , buffers_for_estimate
    , advice_status
    , size_for_estimate
    , estd_physical_read_factor
    , estd_physical_reads
    select l_snap_id
    , p_dbid
    , p_instance_number
    , id
    , name
    , block_size
    , buffers_for_estimate
    , advice_status
    , size_for_estimate
    , estd_physical_read_factor
    , estd_physical_reads
    from v$db_cache_advice
    where advice_status = 'ON';
    insert into stats$pgastat
    ( snap_id
    , dbid
    , instance_number
    , name
    , value
    select l_snap_id
    , p_dbid
    , p_instance_number
    , name
    , value
    from v$pgastat;
    insert into stats$instance_recovery
    ( snap_id
    , dbid
    , instance_number
    , recovery_estimated_ios
    , actual_redo_blks
    , target_redo_blks
    , log_file_size_redo_blks
    , log_chkpt_timeout_redo_blks
    , log_chkpt_interval_redo_blks
    , fast_start_io_target_redo_blks
    , target_mttr
    , estimated_mttr
    , ckpt_block_writes
    select l_snap_id
    , p_dbid
    , p_instance_number
    , recovery_estimated_ios
    , actual_redo_blks
    , target_redo_blks
    , log_file_size_redo_blks
    , log_chkpt_timeout_redo_blks
    , log_chkpt_interval_redo_blks
    , fast_start_io_target_redo_blks
    , target_mttr
    , estimated_mttr
    , ckpt_block_writes
    from v$instance_recovery;
    if p_parallel = 'YES' then
    insert into stats$dlm_misc
    ( snap_id
    , dbid
    , instance_number
    , statistic#
    , name
    , value
    select l_snap_id
    , p_dbid
    , p_instance_number
    , statistic#
    , name
    , value
    from v$dlm_misc;
    end if; /* parallel */
    /* Begin gathering Extended Statistics */
    IF l_snap_level >= 5 THEN
    snap_sql;
    END IF; /* snap level >=5 */
    IF l_snap_level >= 10 THEN
    insert into stats$latch_children
    ( snap_id
    , dbid
    , instance_number
    , latch#
    , child#
    , gets
    , misses
    , sleeps
    , immediate_gets
    , immediate_misses
    , spin_gets
    , sleep1
    , sleep2
    , sleep3
    , sleep4
    , wait_time
    select l_snap_id
    , p_dbid
    , p_instance_number
    , latch#
    , child#
    , gets
    , misses
    , sleeps
    , immediate_gets
    , immediate_misses
    , spin_gets
    , sleep1
    , sleep2
    , sleep3
    , sleep4
    , wait_time
    from v$latch_children;
    insert into stats$latch_parent
    ( snap_id
    , dbid
    , instance_number
    , latch#
    , level#
    , gets
    , misses
    , sleeps
    , immediate_gets
    , immediate_misses
    , spin_gets
    , sleep1
    , sleep2
    , sleep3
    , sleep4
    , wait_time
    select l_snap_id
    , p_dbid
    , p_instance_number
    , latch#
    , level#
    , gets
    , misses
    , sleeps
    , immediate_gets
    , immediate_misses
    , spin_gets
    , sleep1
    , sleep2
    , sleep3
    , sleep4
    , wait_time
    from v$latch_parent;
    END IF; /* snap level >=10 */
    /* Record level session-granular statistics if a specific session
    has been requested
    if l_session_id > 0
    then
    insert into stats$sesstat
    ( snap_id
    , dbid
    , instance_number
    , statistic#
    , value
    select l_snap_id
    , p_dbid
    , p_instance_number
    , statistic#
    , value
    from v$sesstat
    where sid = l_session_id;
    insert into stats$session_event
    ( snap_id
    , dbid
    , instance_number
    , event
    , total_waits
    , total_timeouts
    , time_waited_micro
    , max_wait
    select l_snap_id
    , p_dbid
    , p_instance_number
    , event
    , total_waits
    , total_timeouts
    , time_waited_micro
    , max_wait
    from v$session_event
    where sid = l_session_id;
    end if;
    commit work;
    RETURN l_snap_id;
    end SNAP; /* Function SNAP */
    begin /* STATSPACK body */
    /* Query the database id, instance_number, database name, instance
    name and startup time for the instance we are working on
    /* Get information about the current instance */
    open get_instance;
    fetch get_instance into
    p_instance_number, p_instance_name
    , p_startup_time, p_parallel, p_version
    , p_host_name;
    close get_instance;
    /* Select the database info for the db connected to */
    open get_db;
    fetch get_db into p_dbid, p_name;
    close get_db;
    /* Keep the package
    sys.dbms_shared_pool.keep('PERFSTAT.STATSPACK', 'P');
    /* Determine if the instance has been restarted since the previous snapshot
    begin
    select 1
    into p_new_sga
    from stats$database_instance
    where startup_time = p_startup_time
    and dbid = p_dbid
    and instance_number = p_instance_number;
    exception
    when NO_DATA_FOUND then
    p_new_sga := 0;
    end;
    end STATSPACK;
    Warning: Package Body created with compilation errors.
    SQL> show error
    Errors for PACKAGE BODY STATSPACK:
    LINE/COL ERROR
    2045/3 PLS-00201: identifier 'SYS.DBMS_SHARED_POOL' must be declared
    2045/3 PL/SQL: Statement ignored

    When i compiled the package, it compiled with following error.
    Warning: Package Body created with compilation errors.
    SQL> show error
    Errors for PACKAGE BODY STATSPACK:
    LINE/COL ERROR
    2045/3 PLS-00201: identifier 'SYS.DBMS_SHARED_POOL' must be declared
    2045/3 PL/SQL: Statement ignored
    SQL>

  • Password change fails in SQL Developer with verify function...

    A couple of months ago I enforced a password verify function on our 11.2.0.3 databases and also one legacy 10.2.0.4 database.
    At the time I tested on my account (which had elevated privileges...doh!).   Now some users are hitting expiry, they can't change it via SQL Developer.
    If I create a user with 'create session' privilege and set their profile to one that uses the verify function (see both below), I then log in to SQL Developer (we have tried with versions 3.1 (Windows) and 3.2 (Linux) with same failure results.
    BTW,.. the password verify function enforces the following:
    password must be minimum of 8 characters
    password must not be the same as the user name, or user name (1-100)
    password must contain at least a single digit
    password must contain at least a single character
    1. Works = I log into the local server and run command line SQLPlus, type 'password' and update.   I can successfully change my password.
    2. Fails = I log into the local server and run command line SQLPlus, type 'alter user <me> identified by <newpwd>;' I get:
    TEST: SUTEMP > alter user sutemp identified by carport9999;
    alter user sutemp identified by carport9999
    ERROR at line 1:
    ORA-28221: REPLACE not specified
    This error is because the account does not have the 'alter user' privilege.   I'm okay with this, as I don't want our users having this privilege.
    3. I start SQL Developer 3.2, type 'alter user <me> identified by <newpwd>;' I get the same ORA-28221 error as above.   That is fine, and as expected.
    4. Now in SQL Developer, I type 'password', set a valid password, but I get 'Failed to change password' in the Script Output tab.
    I have a database 'after servererror on database' trigger set, and querying the database table it is logging into, I see a record with a date stamp matching my failure with a server_error=28221 (the same as above).
    So I'm wondering if I'm doing something wrong here, or if this is a bug in SQL Developer.   I don't want standard users having 'alter user' privileges, but I do want to enforce password verification.
    I get the same result on three 11.2.0.3 databases (haven't tried any more but suspect same results for others) and one legacy 10.2.0.4 database, and using SQL Developer 3.1 and 3.2.
    DBA_PROFILE used:
    PROFILE   
    RESOURCE_NAME  
    RESOURCE LIMIT
    CTRU  
    COMPOSITE_LIMIT  
    KERNEL     DEFAULT
    CTRU  
    SESSIONS_PER_USER  
    KERNEL     10
    CTRU  
    CPU_PER_SESSION  
    KERNEL     DEFAULT
    CTRU  
    CPU_PER_CALL  
    KERNEL     DEFAULT
    CTRU  
    LOGICAL_READS_PER_SESSION    KERNEL     DEFAULT
    CTRU  
    LOGICAL_READS_PER_CALL  
    KERNEL     DEFAULT
    CTRU  
    IDLE_TIME  
    KERNEL     DEFAULT
    CTRU  
    CONNECT_TIME  
    KERNEL     DEFAULT
    CTRU  
    PRIVATE_SGA  
    KERNEL     DEFAULT
    CTRU  
    FAILED_LOGIN_ATTEMPTS  
    PASSWORD 10
    CTRU  
    PASSWORD_LIFE_TIME  
    PASSWORD 180
    CTRU  
    PASSWORD_REUSE_TIME  
    PASSWORD DEFAULT
    CTRU  
    PASSWORD_REUSE_MAX  
    PASSWORD 5
    CTRU  
    PASSWORD_VERIFY_FUNCTION     PASSWORD VERIFY_FUNCTION_11G
    CTRU  
    PASSWORD_LOCK_TIME  
    PASSWORD .002
    CTRU  
    PASSWORD_GRACE_TIME  
    PASSWORD 21
    16 rows selected.
    Verify Function used:
    $ cat utlpwdmg.sql
    Rem
    Rem $Header: utlpwdmg.sql 02-aug-2006.08:18:05 asurpur Exp $
    Rem
    Rem utlpwdmg.sql
    Rem
    Rem Copyright (c) 2006, Oracle. All rights reserved.
    Rem
    Rem    NAME
    Rem      utlpwdmg.sql - script for Default Password Resource Limits
    Rem
    Rem    DESCRIPTION
    Rem      This is a script for enabling the password management features
    Rem      by setting the default password resource limits.
    Rem
    Rem    NOTES
    Rem      This file contains a function for minimum checking of password
    Rem      complexity. This is more of a sample function that the customer
    Rem      can use to develop the function for actual complexity checks that the
    Rem      customer wants to make on the new password.
    Rem
    Rem    MODIFIED   (MM/DD/YY)
    Rem    suren       05/09/13 - customise for NIHI use
    Rem    asurpur     05/30/06 - fix - 5246666 beef up password complexity check
    Rem    nireland    08/31/00 - Improve check for username=password. #1390553
    Rem    nireland    06/28/00 - Fix null old password test. #1341892
    Rem    asurpur     04/17/97 - Fix for bug479763
    Rem    asurpur     12/12/96 - Changing the name of password_verify_function
    Rem    asurpur     05/30/96 - New script for default password management
    Rem    asurpur     05/30/96 - Created
    Rem
    -- This script sets the default password resource parameters
    -- This script needs to be run to enable the password features.
    -- However the default resource parameters can be changed based
    -- on the need.
    -- A default password complexity function is also provided.
    -- This function makes the minimum complexity checks like
    -- the minimum length of the password, password not same as the
    -- username, etc. The user may enhance this function according to
    -- the need.
    -- This function must be created in SYS schema.
    -- connect sys/<password> as sysdba before running the script
    CREATE OR REPLACE FUNCTION verify_function_11G
    (username varchar2,
      password varchar2,
      old_password varchar2)
      RETURN boolean IS
       n boolean;
       m integer;
       differ integer;
       isdigit boolean;
       ischar  boolean;
       ispunct boolean;
       db_name varchar2(40);
       digitarray varchar2(20);
       punctarray varchar2(25);
       chararray varchar2(52);
       i_char varchar2(10);
       simple_password varchar2(10);
       reverse_user varchar2(32);
    BEGIN
       digitarray:= '0123456789';
       chararray:= 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
       -- Check for the minimum length of the password
       IF length(password) < 8 THEN
          raise_application_error(-20001, 'Password length less than 8');
       END IF;
       -- Check if the password is same as the username or username(1-100)
       IF NLS_LOWER(password) = NLS_LOWER(username) THEN
         raise_application_error(-20002, 'Password same as or similar to user');
       END IF;
       FOR i IN 1..100 LOOP
          i_char := to_char(i);
          if NLS_LOWER(username)|| i_char = NLS_LOWER(password) THEN
            raise_application_error(-20005, 'Password same as or similar to user name ');
          END IF;
        END LOOP;
       -- Check if the password contains at least one letter, one digit
       -- 1. Check for the digit
       isdigit:=FALSE;
       m := length(password);
       FOR i IN 1..10 LOOP
          FOR j IN 1..m LOOP
             IF substr(password,j,1) = substr(digitarray,i,1) THEN
                isdigit:=TRUE;
                 GOTO findchar;
             END IF;
          END LOOP;
       END LOOP;
       IF isdigit = FALSE THEN
          raise_application_error(-20008, 'Password must contain at least one digit, one character');
       END IF;
       -- 2. Check for the character
       <<findchar>>
       ischar:=FALSE;
       FOR i IN 1..length(chararray) LOOP
          FOR j IN 1..m LOOP
             IF substr(password,j,1) = substr(chararray,i,1) THEN
                ischar:=TRUE;
                 GOTO endsearch;
             END IF;
          END LOOP;
       END LOOP;
       IF ischar = FALSE THEN
          raise_application_error(-20009, 'Password must contain at least one digit, and one character');
       END IF;
       <<endsearch>>
       -- Check if the password differs from the previous password by at least
       -- 3 letters
       IF old_password IS NOT NULL THEN
         differ := length(old_password) - length(password);
         differ := abs(differ);
         IF differ < 3 THEN
           IF length(password) < length(old_password) THEN
             m := length(password);
           ELSE
             m := length(old_password);
           END IF;
           FOR i IN 1..m LOOP
             IF substr(password,i,1) != substr(old_password,i,1) THEN
               differ := differ + 1;
             END IF;
           END LOOP;
           IF differ < 3 THEN
             raise_application_error(-20011, 'Password should differ from the old password by at least 3 characters');
           END IF;
         END IF;
       END IF;
       -- Everything is fine; return TRUE ;
       RETURN(TRUE);
    END;
    alter profile ctru limit password_verify_function verify_function_11g;
    alter profile default limit password_verify_function verify_function_11g;
    alter profile web_and_it limit password_verify_function verify_function_11g;

    okay,... I just saw another website which shows I should put in the 'replace <oldpwd>' clause in.
    This works in SQL Developer:     alter user sutemp identified by carport999 replace garage999;
    So why does the 'password' command fail?     (Developers:  it would also be helpful to have the ORA- error displayed as opposed to 'Failed to change password')

  • Help needed for implementing master details region on the search page

    Hi All,
         I am new to Jdeveloper and OAF. I need to develop a sales order search page, for which the VO query is
         SELECT ch.order_number order_number
         , ch.attribute97 order_detail
         , ch.attribute14 sold_to
         , ch.attribute50 business_group
         , ch.source_doc_type source_doc_type
         , ch.line_number line_number
         , ch.transaction_amount transaction_amount
         , ch.split_pct||'%' split_percentage
         , jrs.NAME resource_name
         , jrr.resource_number resource_number
         , ch.processed_date processed_date
         , cq.NAME quota_name
         , ch.attribute34 transaction_type
         , ch.attribute35 order_type
         , ch.attribute51 product_line
         , ch.attribute54 city
         , ch.attribute55 state
         , ch.attribute56 district
         , ch.attribute57 area
         , ch.attribute61 salesrep_number
         , ch.attribute62 region
         , ch.attribute64 sales_org
         , ch.attribute68 terr_order_type
         , ch.attribute58 market_indicator
         FROM cn_commission_lines_all cl
         , cn_commission_headers_all ch
         , cn_quotas_all cq
         , jtf_rs_salesreps jrs
         , jtf_rs_resource_extns jrr
         WHERE cl.direct_salesrep_id = cl.credited_salesrep_id
         AND cl.commission_header_id = ch.commission_header_id
         AND cl.quota_id = cq.quota_id
         AND ch.direct_salesrep_id = jrs.salesrep_id
         AND jrr.resource_id = jrs.resource_id
         AND (NVL(ch.source_doc_type,'X') = 'EVEREST' OR NVL(ch.source_doc_type,'X') = 'SAP')
    AND (NVL(ch.attribute50,'X') = 'EMG' OR NVL(ch.attribute50,'X') = 'LSCA')
    I have 3 query parameters business_group, source_doc_type and sales order number.
    The results region should look like,
    Header region with order_number,order_detail,sold_to,business_group and the source_doc_type columns.
    The remaining fields go into the details region.
    Highly appreciate if anyone could help me on this.
    Regards,

    Hi,
    When I have a messagestyle layout for my header, I am not able to find the items in this region for the querycriteriamap. I need to populate the header region with values entered in the search region.
    For example: I create the OrderNumber messagestyledtext item in the messagecomponent layout of the header region. In simplesearchmappings, for the querycriteriamap, I am not able to find this item in the drop down for Results Item property.
    Please help me to understand.
    Regards,

  • Loading Error  - 'JTF ' in  API -'jtf_rs_resource_pub.create_resource'

    Hi ,
    I am working on  Project resource Create conversion , i did the mapping it work fine but while loading i got the error , in the log message
    RETURN_STATUS= 'E'
    X_MSG_DATA = 'JTF'
    I am not able to understand error data that is 'JTF' . Please if some one have idea then please let me know the solution . 
    I am posting the code for load part ,
    jtf_rs_resource_pub.create_resource
                   (p_api_version            => 1.0,
                    p_commit                 => fnd_api.g_true,
                    p_init_msg_list          => 'F',
                    x_return_status          => l_return_status,
                    x_msg_count              => l_msg_count,
                    x_msg_data               => l_msg_data,
                    x_resource_id            => l_resource_id,
                    x_resource_number        => l_resource_number,
                    p_resource_name          => 'Mohit',--rec_create_resource_load.resource_name,
                    p_category               => 'Other',--rec_create_resource_load.CATEGORY,
                    p_start_date_active      => rec_create_resource_load.start_date_active,
                    p_source_name            => 'MOHIT',--rec_create_resource_load.source_name,
                    p_user_name              => 'MOHIT',--rec_create_resource_load.user_name,
                    p_source_id              => 6584321, --rec_create_resource_load.source_id,
                    p_address_id             => null--rec_create_resource_load.address_id
    King Regards
    Ashish.

    Hi ,
    there is no need of form i thing , i am using the API .
    when i run the API  it shows errors .
    JTF_RS_INVALID_SOURCE_ID  N P_SOURCE_ID 38897
    if you know any thing about this please help me .

Maybe you are looking for