Sql tunning in oracle

Hi all,
DB- ORACLE 9.2.0.4
I am facing problem in one query it is taking more than one hour, so i have traced the query and aslo after 15 min i ahve to cancel the query....
select  MRH_MRN,DECODE(MRH_SEX,'M','MALE','FEMALE') AS SEX, trim((mrh_sur_name||' '||mrh_first_name||' '||mrh_middle_name)) as MEMNAME, decode(nvl(mrh_fellow_status_yn,'333'),'Y','FCA','ACA')
AS ACA_FCA, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_1,'A',MRH_RES_ADDR_LINE_1) AS L_ADD1, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_2,'A',MRH_RES_ADDR_LINE_2) AS L_ADD2,     DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_3,'A',MRH_RES_ADDR_LINE_3) AS L_ADD3, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_4,'A',MRH_RES_ADDR_LINE_4) AS L_ADD4, DECODE(MRH_RESI_STATUS,'I',
a.city_name,'A',C.CITY_NAME) AS L_CITY, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ZIP_POSTAL_CODE,'A',MRH_RES_ZIP_POSTAL_CODE) AS L_PIN, DECODE(MRH_RESI_STATUS,'I',b.cou_name,'A',D.COU_NAME) as L_Country,
DECODE(MRH_RESI_STATUS,'I','NOT APPLICABLE',MRH_PROF_ADDR_LINE_1) AS R_ADD1, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_2) AS R_ADD2, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_3)
AS R_ADD3, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_4) AS R_ADD4, DECODE(MRH_RESI_STATUS,'I',' ','A',A.CITY_NAME) AS R_CITY, DECODE(MRH_RESI_STATUS,'I',' ','A',
MRH_PROF_ZIP_POSTAL_CODE) AS R_PIN, DECODE(MRH_RESI_STATUS,'I',' ','A',B.COU_NAME) as R_Country, decode(nvl(mrh_mem_sub_status,'555'),'26','EXPIRED','') as sub_status,
decode(nvl(mrh_mem_status,'777'),'1','ACTIVE','2','REMOVED') as mem_status,mrh_resi_status, DECODE(MRH_COP_STATUS,'1',DECODE(MRH_COP_TYPE ,'13','FULLTIME-COP','1','FULLTIME-COP', '12','PARTTIME-COP','2','PARTTIME-COP'),'NOT HOLDING COP')
AS COP_STATUS, TO_CHAR(MRH_ENROL_DT,'RRRR') AS ASSO_YR,TO_CHAR(MRH_FELLOW_DT,'RRRR') AS FELLOW_YR   from om_mem_reg_head,om_city A,om_country B,om_city C,om_country D
where  mrh_doc_status=5  and mrh_prof_city_code=A.City_code(+) and mrh_prof_cou_code=B.cou_code(+)
and mrh_res_city_code=C.City_code(+) and mrh_res_cou_code=D.cou_code(+)  and trim((mrh_sur_name||' '||mrh_first_name||''||mrh_middle_name)) like upper('%%')
ORDER BY trim((mrh_sur_name||' '||mrh_first_name||' '||mrh_middle_name));
63196 rows selected.
Elapsed: 00:15:10.07And the explan plan for the query is
SQL> select * from table(DBMS_XPLAN.display());
PLAN_TABLE_OUTPUT
| Id  | Operation              |  Name            | Rows  | Bytes |TempSpc| Cost
  |
|   0 | SELECT STATEMENT       |                  |  2967 |   799K|       |  150
6 |
|   1 |  SORT ORDER BY         |                  |  2967 |   799K|  1704K|  150
6 |
|   2 |   NESTED LOOPS OUTER   |                  |  2967 |   799K|       |  138
3 |
|   3 |    NESTED LOOPS OUTER  |                  |  2967 |   744K|       |  138
3 |
|   4 |     HASH JOIN OUTER    |                  |  2967 |   689K|       |  138
3 |
|   5 |      HASH JOIN OUTER   |                  |  2967 |   637K|       |  137
4 |
|   6 |       TABLE ACCESS FULL| OM_MEM_REG_HEAD  |  2967 |   585K|       |  136
5 |
|   7 |       TABLE ACCESS FULL| OM_COUNTRY       |   678 | 12204 |       |
3 |
|   8 |      TABLE ACCESS FULL | OM_COUNTRY       |   678 | 12204 |       |
3 |
|   9 |     INDEX UNIQUE SCAN  | CITY_CODE_PK     |     1 |    19 |       |
  |
|  10 |    INDEX UNIQUE SCAN   | CITY_CODE_PK     |     1 |    19 |       |
  |
--------------------------------------------------------------------------------Tkprof Report
TKPROF: Release 9.2.0.4.0 - Production on Thu Aug 6 11:47:36 2009
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Trace file: /u01/app/oracle/admin/icai/udump/icai_ora_16195.trc
Sort options: prsdsk  exedsk  fchdsk 
count    = number of times OCI procedure was executed
cpu      = cpu time in seconds executing
elapsed  = elapsed time in seconds executing
disk     = number of physical reads of buffers from disk
query    = number of buffers gotten for consistent read
current  = number of buffers gotten in current mode (usually for update)
rows     = number of rows processed by the fetch or execute call
select  MRH_MRN,DECODE(MRH_SEX,'M','MALE','FEMALE') AS SEX, trim((mrh_sur_name||' '||mrh_first_name||' '||mrh_middle_name)) as MEMNAME, decode(nvl(mrh_fellow_status_yn,'333'),'Y','FCA','ACA')
AS ACA_FCA, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_1,'A',MRH_RES_ADDR_LINE_1) AS L_ADD1, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_2,'A',MRH_RES_ADDR_LINE_2) AS L_ADD2,     DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_3,'A',MRH_RES_ADDR_LINE_3) AS L_ADD3, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_4,'A',MRH_RES_ADDR_LINE_4) AS L_ADD4, DECODE(MRH_RESI_STATUS,'I',
a.city_name,'A',C.CITY_NAME) AS L_CITY, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ZIP_POSTAL_CODE,'A',MRH_RES_ZIP_POSTAL_CODE) AS L_PIN, DECODE(MRH_RESI_STATUS,'I',b.cou_name,'A',D.COU_NAME) as L_Country,
DECODE(MRH_RESI_STATUS,'I','NOT APPLICABLE',MRH_PROF_ADDR_LINE_1) AS R_ADD1, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_2) AS R_ADD2, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_3)
AS R_ADD3, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_4) AS R_ADD4, DECODE(MRH_RESI_STATUS,'I',' ','A',A.CITY_NAME) AS R_CITY, DECODE(MRH_RESI_STATUS,'I',' ','A',
MRH_PROF_ZIP_POSTAL_CODE) AS R_PIN, DECODE(MRH_RESI_STATUS,'I',' ','A',B.COU_NAME) as R_Country, decode(nvl(mrh_mem_sub_status,'555'),'26','EXPIRED','') as sub_status,
decode(nvl(mrh_mem_status,'777'),'1','ACTIVE','2','REMOVED') as mem_status,mrh_resi_status, DECODE(MRH_COP_STATUS,'1',DECODE(MRH_COP_TYPE ,'13','FULLTIME-COP','1','FULLTIME-COP', '12','PARTTIME-COP','2','PARTTIME-COP'),'NOT HOLDING COP')
AS COP_STATUS, TO_CHAR(MRH_ENROL_DT,'RRRR') AS ASSO_YR,TO_CHAR(MRH_FELLOW_DT,'RRRR') AS FELLOW_YR   from om_mem_reg_head,om_city A,om_country B,om_city C,om_country D
where  mrh_doc_status=5  and mrh_prof_city_code=A.City_code(+) and mrh_prof_cou_code=B.cou_code(+)
and mrh_res_city_code=C.City_code(+) and mrh_res_cou_code=D.cou_code(+)  and trim((mrh_sur_name||' '||mrh_first_name||''||mrh_middle_name)) like upper('%%')
ORDER BY trim((mrh_sur_name||' '||mrh_first_name||' '||mrh_middle_name))
call     count       cpu    elapsed       disk      query    current        rows
Parse        2      0.00       0.00          0          0          0           0
Execute      3      0.00       0.00          0          0          0           0
Fetch        2      5.30      32.71      10615     368623          7          16
total        7      5.31      32.72      10615     368623          7          16
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 62 
Rows     Row Source Operation
     16  SORT ORDER BY (cr=368623 r=10615 w=14576 time=32712633 us)
177199   NESTED LOOPS OUTER (cr=368623 r=10361 w=10170 time=22170155 us)
177199    NESTED LOOPS OUTER (cr=191422 r=10361 w=10170 time=21538665 us)
177199     HASH JOIN OUTER (cr=14222 r=10361 w=10170 time=20649137 us)
177199      HASH JOIN OUTER (cr=14206 r=5210 w=5040 time=9619390 us)
177199       TABLE ACCESS FULL OM_MEM_REG_HEAD (cr=14190 r=155 w=0 time=491000 us)
    678       TABLE ACCESS FULL OM_COUNTRY (cr=16 r=0 w=0 time=378 us)
    678      TABLE ACCESS FULL OM_COUNTRY (cr=16 r=6 w=0 time=22130 us)
177198     INDEX UNIQUE SCAN CITY_CODE_PK (cr=177200 r=0 w=0 time=518983 us)(object id 33611)
177199    INDEX UNIQUE SCAN CITY_CODE_PK (cr=177201 r=0 w=0 time=342868 us)(object id 33611)
Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  SQL*Net more data from client                   1        0.00          0.00
  SQL*Net message to client                       3        0.00          0.00
  direct path write                            1052        0.00          0.00
  db file sequential read                        49        0.00          0.00
  db file scattered read                         41        0.01          0.02
  direct path read                             1055        0.00          0.00
  SQL*Net message from client                     2      139.65        139.75
  SQL*Net more data to client                     1        0.00          0.00
select default$
from
col$ where rowid=:1
call     count       cpu    elapsed       disk      query    current        rows
Parse        1      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch        1      0.00       0.00          0          2          0           1
total        3      0.00       0.00          0          2          0           1
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: SYS   (recursive depth: 1)
Rows     Row Source Operation
      1  TABLE ACCESS BY USER ROWID COL$ (cr=1 r=0 w=0 time=14 us)
select condition
from
cdef$ where rowid=:1
call     count       cpu    elapsed       disk      query    current        rows
Parse        7      0.00       0.00          0          0          0           0
Execute      7      0.00       0.00          0          0          0           0
Fetch        7      0.00       0.00          0         15          0           7
total       21      0.00       0.00          0         15          0           7
Misses in library cache during parse: 0
Optimizer goal: CHOOSE
Parsing user id: SYS   (recursive depth: 1)
Rows     Row Source Operation
      1  TABLE ACCESS BY USER ROWID CDEF$ (cr=2 r=0 w=0 time=12 us)
select o.owner#,o.name,o.namespace,o.remoteowner,o.linkname,o.subname,
  o.dataobj#,o.flags
from
obj$ o where o.obj#=:1
call     count       cpu    elapsed       disk      query    current        rows
Parse        1      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch        1      0.00       0.00          0          3          0           1
total        3      0.00       0.00          0          3          0           1
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: SYS   (recursive depth: 1)
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call     count       cpu    elapsed       disk      query    current        rows
Parse        2      0.00       0.00          0          0          0           0
Execute      3      0.00       0.00          0          0          0           0
Fetch        2      5.30      32.71      10615     368623          7          16
total        7      5.31      32.72      10615     368623          7          16
Misses in library cache during parse: 1
Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  SQL*Net more data from client                   2        0.00          0.00
  SQL*Net message to client                       3        0.00          0.00
  direct path write                            1052        0.00          0.00
  db file sequential read                        49        0.00          0.00
  db file scattered read                         41        0.01          0.02
  direct path read                             1055        0.00          0.00
  SQL*Net message from client                     2      139.65        139.75
  SQL*Net more data to client                     1        0.00          0.00
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call     count       cpu    elapsed       disk      query    current        rows
Parse        9      0.00       0.00          0          0          0           0
Execute      9      0.00       0.00          0          0          0           0
Fetch        9      0.00       0.00          0         20          0           9
total       27      0.00       0.00          0         20          0           9
Misses in library cache during parse: 2
    2  user  SQL statements in session.
    9  internal SQL statements in session.
   11  SQL statements in session.
Trace file: /u01/app/oracle/admin/icai/udump/icai_ora_16195.trc
Trace file compatibility: 9.00.01
Sort options: prsdsk  exedsk  fchdsk 
       1  session in tracefile.
       2  user  SQL statements in trace file.
       9  internal SQL statements in trace file.
      11  SQL statements in trace file.
       4  unique SQL statements in trace file.
    2378  lines in trace file.please suggest me how to resolve this problem...

And 10046 event
/u01/app/oracle/admin/ai/udump/ai_ora_16195.trc
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
ORACLE_HOME = /u01/app/oracle/product/9.2.0.4.0/db_1
System name:     Linux
Node name:     ai-oracle
Release:     2.6.16.21-0.8-bigsmp
Version:     #1 SMP Mon Jul 3 18:25:39 UTC 2006
Machine:     i686
Instance name: ai
Redo thread mounted by this instance: 1
Oracle process number: 49
Unix process pid: 16195, image: oracle@ai-oracle (TNS V1-V3)
*** 2009-08-06 11:44:03.255
*** SESSION ID:(336.2123) 2009-08-06 11:44:03.237
WAIT #1: nam='SQL*Net more data from client' ela= 317 p1=1413697536 p2=48 p3=0
=====================
PARSING IN CURSOR #2 len=40 dep=1 uid=0 oct=3 lid=0 tim=1220253167243103 hv=3360804353 ad='b4705130'
select default$ from col$ where rowid=:1
END OF STMT
PARSE #2:c=0,e=254,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=0,tim=1220253167243098
BINDS #2:
bind 0: dty=11 mxl=16(16) mal=00 scl=00 pre=00 oacflg=18 oacfl2=1 size=16 offset=0
   bfp=b783df20 bln=16 avl=16 flg=05
   value=0000C04B.0005.0001
EXEC #2:c=0,e=251,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167243426
FETCH #2:c=0,e=25,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=4,tim=1220253167243472
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=21 op='TABLE ACCESS BY USER ROWID COL$ (cr=1 r=0 w=0 time=14 us)'
=====================
PARSING IN CURSOR #2 len=42 dep=1 uid=0 oct=3 lid=0 tim=1220253167243990 hv=1307778841 ad='b0e73c30'
select condition from cdef$ where rowid=:1
END OF STMT
PARSE #2:c=0,e=25,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167243987
BINDS #2:
bind 0: dty=11 mxl=16(16) mal=00 scl=00 pre=00 oacflg=18 oacfl2=1 size=16 offset=0
   bfp=b787950c bln=16 avl=16 flg=05
   value=0000980A.0022.0001
EXEC #2:c=0,e=56,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167244103
FETCH #2:c=0,e=15,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=4,tim=1220253167244136
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=31 op='TABLE ACCESS BY USER ROWID CDEF$ (cr=2 r=0 w=0 time=12 us)'
=====================
PARSING IN CURSOR #2 len=42 dep=1 uid=0 oct=3 lid=0 tim=1220253167244235 hv=1307778841 ad='b0e73c30'
select condition from cdef$ where rowid=:1
END OF STMT
PARSE #2:c=0,e=14,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167244233
BINDS #2:
bind 0: dty=11 mxl=16(16) mal=00 scl=00 pre=00 oacflg=18 oacfl2=1 size=16 offset=0
   bfp=b787950c bln=16 avl=16 flg=05
   value=0000980A.001E.0001
EXEC #2:c=0,e=46,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167244336
FETCH #2:c=0,e=8,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=4,tim=1220253167244361
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=31 op='TABLE ACCESS BY USER ROWID CDEF$ (cr=1 r=0 w=0 time=5 us)'
=====================
PARSING IN CURSOR #2 len=42 dep=1 uid=0 oct=3 lid=0 tim=1220253167244447 hv=1307778841 ad='b0e73c30'
select condition from cdef$ where rowid=:1
END OF STMT
PARSE #2:c=0,e=13,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167244444
BINDS #2:
bind 0: dty=11 mxl=16(16) mal=00 scl=00 pre=00 oacflg=18 oacfl2=1 size=16 offset=0
   bfp=b787950c bln=16 avl=16 flg=05
   value=0000980A.001F.0001
EXEC #2:c=0,e=46,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167244546
FETCH #2:c=0,e=8,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=4,tim=1220253167244571
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=31 op='TABLE ACCESS BY USER ROWID CDEF$ (cr=1 r=0 w=0 time=4 us)'
=====================
PARSING IN CURSOR #2 len=42 dep=1 uid=0 oct=3 lid=0 tim=1220253167244656 hv=1307778841 ad='b0e73c30'
select condition from cdef$ where rowid=:1
END OF STMT
PARSE #2:c=0,e=12,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167244653
BINDS #2:
bind 0: dty=11 mxl=16(16) mal=00 scl=00 pre=00 oacflg=18 oacfl2=1 size=16 offset=0
   bfp=b787950c bln=16 avl=16 flg=05
   value=0000980A.0020.0001
EXEC #2:c=0,e=46,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167244755
FETCH #2:c=0,e=8,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=4,tim=1220253167244779
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=31 op='TABLE ACCESS BY USER ROWID CDEF$ (cr=1 r=0 w=0 time=5 us)'
=====================
PARSING IN CURSOR #2 len=42 dep=1 uid=0 oct=3 lid=0 tim=1220253167244864 hv=1307778841 ad='b0e73c30'
select condition from cdef$ where rowid=:1
END OF STMT
PARSE #2:c=0,e=13,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167244862
BINDS #2:
bind 0: dty=11 mxl=16(16) mal=00 scl=00 pre=00 oacflg=18 oacfl2=1 size=16 offset=0
   bfp=b787950c bln=16 avl=16 flg=05
   value=0000980A.0021.0001
EXEC #2:c=0,e=46,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167244977
FETCH #2:c=0,e=7,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=4,tim=1220253167245001
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=31 op='TABLE ACCESS BY USER ROWID CDEF$ (cr=1 r=0 w=0 time=4 us)'
=====================
PARSING IN CURSOR #2 len=42 dep=1 uid=0 oct=3 lid=0 tim=1220253167245086 hv=1307778841 ad='b0e73c30'
select condition from cdef$ where rowid=:1
END OF STMT
PARSE #2:c=0,e=11,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167245083
BINDS #2:
bind 0: dty=11 mxl=16(16) mal=00 scl=00 pre=00 oacflg=18 oacfl2=1 size=16 offset=0
   bfp=b787950c bln=16 avl=16 flg=05
   value=0000980A.0023.0001
EXEC #2:c=0,e=45,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167245185
FETCH #2:c=0,e=7,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=4,tim=1220253167245209
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=31 op='TABLE ACCESS BY USER ROWID CDEF$ (cr=1 r=0 w=0 time=5 us)'
=====================
PARSING IN CURSOR #2 len=42 dep=1 uid=0 oct=3 lid=0 tim=1220253167245299 hv=1307778841 ad='b0e73c30'
select condition from cdef$ where rowid=:1
END OF STMT
PARSE #2:c=0,e=12,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167245296
BINDS #2:
bind 0: dty=11 mxl=16(16) mal=00 scl=00 pre=00 oacflg=18 oacfl2=1 size=16 offset=0
   bfp=b787950c bln=16 avl=16 flg=05
   value=0000980A.0024.0001
EXEC #2:c=0,e=45,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253167245398
FETCH #2:c=0,e=7,p=0,cr=2,cu=0,mis=0,r=1,dep=1,og=4,tim=1220253167245422
STAT #2 id=1 cnt=1 pid=0 pos=1 obj=31 op='TABLE ACCESS BY USER ROWID CDEF$ (cr=1 r=0 w=0 time=4 us)'
=====================
PARSING IN CURSOR #1 len=2036 dep=0 uid=62 oct=3 lid=62 tim=1220253167250626 hv=3672446138 ad='b1cb8350'
select  MRH_MRN,DECODE(MRH_SEX,'M','MALE','FEMALE') AS SEX, trim((mrh_sur_name||' '||mrh_first_name||' '||mrh_middle_name)) as MEMNAME, decode(nvl(mrh_fellow_status_yn,'333'),'Y','FCA','ACA')
AS ACA_FCA, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_1,'A',MRH_RES_ADDR_LINE_1) AS L_ADD1, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_2,'A',MRH_RES_ADDR_LINE_2) AS L_ADD2,     DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_3,'A',MRH_RES_ADDR_LINE_3) AS L_ADD3, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_4,'A',MRH_RES_ADDR_LINE_4) AS L_ADD4, DECODE(MRH_RESI_STATUS,'I',
a.city_name,'A',C.CITY_NAME) AS L_CITY, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ZIP_POSTAL_CODE,'A',MRH_RES_ZIP_POSTAL_CODE) AS L_PIN, DECODE(MRH_RESI_STATUS,'I',b.cou_name,'A',D.COU_NAME) as L_Country,
DECODE(MRH_RESI_STATUS,'I','NOT APPLICABLE',MRH_PROF_ADDR_LINE_1) AS R_ADD1, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_2) AS R_ADD2, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_3)
AS R_ADD3, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_4) AS R_ADD4, DECODE(MRH_RESI_STATUS,'I',' ','A',A.CITY_NAME) AS R_CITY, DECODE(MRH_RESI_STATUS,'I',' ','A',
MRH_PROF_ZIP_POSTAL_CODE) AS R_PIN, DECODE(MRH_RESI_STATUS,'I',' ','A',B.COU_NAME) as R_Country, decode(nvl(mrh_mem_sub_status,'555'),'26','EXPIRED','') as sub_status,
decode(nvl(mrh_mem_status,'777'),'1','ACTIVE','2','REMOVED') as mem_status,mrh_resi_status, DECODE(MRH_COP_STATUS,'1',DECODE(MRH_COP_TYPE ,'13','FULLTIME-COP','1','FULLTIME-COP', '12','PARTTIME-COP','2','PARTTIME-COP'),'NOT HOLDING COP')
AS COP_STATUS, TO_CHAR(MRH_ENROL_DT,'RRRR') AS ASSO_YR,TO_CHAR(MRH_FELLOW_DT,'RRRR') AS FELLOW_YR   from om_mem_reg_head,om_city A,om_country B,om_city C,om_country D
where  mrh_doc_status=5  and mrh_prof_city_code=A.City_code(+) and mrh_prof_cou_code=B.cou_code(+)
and mrh_res_city_code=C.City_code(+) and mrh_res_cou_code=D.cou_code(+)  and trim((mrh_sur_name||' '||mrh_first_name||''||mrh_middle_name)) like upper('%%')
ORDER BY trim((mrh_sur_name||' '||mrh_first_name||' '||mrh_middle_name))
END OF STMT
PARSE #1:c=8001,e=8557,p=0,cr=17,cu=0,mis=1,r=0,dep=0,og=4,tim=1220253167250624
BINDS #1:
EXEC #1:c=0,e=54,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=1220253167250805
WAIT #1: nam='SQL*Net message to client' ela= 0 p1=1413697536 p2=1 p3=0
WAIT #1: nam='direct path write' ela= 10 p1=201 p2=119945 p3=15
WAIT #1: nam='direct path write' ela= 1 p1=201 p2=119960 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=119975 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=119990 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=120005 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=120020 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=120035 p3=15
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=120050 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=130441 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=130456 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=130471 p3=15
WAIT #1: nam='db file sequential read' ela= 28 p1=3 p2=907029 p3=1
WAIT #1: nam='direct path write' ela= 5 p1=201 p2=130486 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=130501 p3=15
WAIT #1: nam='db file sequential read' ela= 18 p1=3 p2=907149 p3=1
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=130516 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=130531 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=130546 p3=15
WAIT #1: nam='db file sequential read' ela= 18 p1=3 p2=907262 p3=1
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=102665 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=102680 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=102695 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=102710 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=102725 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=102740 p3=15
WAIT #1: nam='db file sequential read' ela= 27 p1=3 p2=907546 p3=1
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=102755 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=102770 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=73865 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=73880 p3=15
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=73895 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=73910 p3=15
WAIT #1: nam='db file sequential read' ela= 13 p1=3 p2=907783 p3=1
WAIT #1: nam='direct path write' ela= 1 p1=201 p2=73925 p3=15
WAIT #1: nam='db file sequential read' ela= 12 p1=3 p2=907841 p3=1
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=73940 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=73955 p3=15
WAIT #1: nam='db file scattered read' ela= 29 p1=3 p2=907932 p3=2
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=73970 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=130057 p3=15
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=130072 p3=15
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=130087 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=135689 p3=15
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=135704 p3=15
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=135719 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=135734 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=135749 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=135764 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=135779 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=135794 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=53897 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=53912 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=53927 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=89353 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=89368 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=89383 p3=15
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=89398 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=89413 p3=15
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=89428 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=89443 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=89458 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=122121 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=122136 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=122151 p3=15
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=122166 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=122181 p3=15
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=122196 p3=15
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=122211 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=122226 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=119433 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=119448 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=119463 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=119478 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=119493 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=119508 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=119523 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=119538 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=99849 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=99864 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=99879 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=99894 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=99909 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=99924 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=99939 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=99954 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=96137 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=96152 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=96167 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=96182 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=96197 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=96212 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=96227 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=96242 p3=15
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=64905 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=64920 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=64935 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=64950 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=64965 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=64980 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=64995 p3=15
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=87365 p3=15
WAIT #1: nam='direct path write' ela= 10 p1=201 p2=81161 p3=15
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=59190 p3=15
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=59205 p3=15
WAIT #1: nam='direct path write' ela= 8 p1=201 p2=59220 p3=15
WAIT #1: nam='direct path write' ela= 6 p1=201 p2=59235 p3=15
WAIT #1: nam='direct path write' ela= 7 p1=201 p2=59250 p3=15
WAIT #1: nam='direct path write' ela= 7 p1=201 p2=57609 p3=15
WAIT #1: nam='direct path write' ela= 5 p1=201 p2=57624 p3=15
WAIT #1: nam='direct path write' ela= 5 p1=201 p2=57639 p3=15
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=121640 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=132351 p3=10
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=93184 p3=9
FETCH #1:c=5304331,e=32712615,p=10615,cr=368623,cu=7,mis=0,r=1,dep=0,og=4,tim=1220253199963476
WAIT #1: nam='SQL*Net message from client' ela= 101608 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 2 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=114,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253200065410
WAIT #1: nam='SQL*Net more data to client' ela= 18 p1=1413697536 p2=2016 p3=0
*** 2009-08-06 11:46:59.874
WAIT #1: nam='SQL*Net message from client' ela= 139655890 p1=1413697536 p2=1 p3=0
STAT #1 id=1 cnt=16 pid=0 pos=1 obj=0 op='SORT ORDER BY (cr=368623 r=10615 w=14576 time=32712633 us)'
STAT #1 id=2 cnt=177199 pid=1 pos=1 obj=0 op='NESTED LOOPS OUTER (cr=368623 r=10361 w=10170 time=22170155 us)'
STAT #1 id=3 cnt=177199 pid=2 pos=1 obj=0 op='NESTED LOOPS OUTER (cr=191422 r=10361 w=10170 time=21538665 us)'
STAT #1 id=4 cnt=177199 pid=3 pos=1 obj=0 op='HASH JOIN OUTER (cr=14222 r=10361 w=10170 time=20649137 us)'
STAT #1 id=5 cnt=177199 pid=4 pos=1 obj=0 op='HASH JOIN OUTER (cr=14206 r=5210 w=5040 time=9619390 us)'
STAT #1 id=6 cnt=177199 pid=5 pos=1 obj=33957 op='TABLE ACCESS FULL OM_MEM_REG_HEAD (cr=14190 r=155 w=0 time=491000 us)'
=====================
PARSING IN CURSOR #2 len=116 dep=1 uid=0 oct=3 lid=0 tim=1220253339722039 hv=431456802 ad='aeeabc68'
select o.owner#,o.name,o.namespace,o.remoteowner,o.linkname,o.subname,o.dataobj#,o.flags from obj$ o where o.obj#=:1
END OF STMT
PARSE #2:c=0,e=410,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=0,tim=1220253339722035
BINDS #2:
bind 0: dty=2 mxl=22(22) mal=00 scl=00 pre=00 oacflg=08 oacfl2=1 size=24 offset=0
   bfp=b7880124 bln=22 avl=04 flg=05
   value=33630
EXEC #2:c=0,e=277,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1220253339722401
FETCH #2:c=0,e=44,p=0,cr=3,cu=0,mis=0,r=1,dep=1,og=4,tim=1220253339722463
STAT #1 id=7 cnt=678 pid=5 pos=2 obj=33630 op='TABLE ACCESS FULL OM_COUNTRY (cr=16 r=0 w=0 time=378 us)'
STAT #1 id=8 cnt=678 pid=4 pos=2 obj=33630 op='TABLE ACCESS FULL OM_COUNTRY (cr=16 r=6 w=0 time=22130 us)'
STAT #1 id=9 cnt=177198 pid=3 pos=2 obj=33611 op='INDEX UNIQUE SCAN CITY_CODE_PK (cr=177200 r=0 w=0 time=518983 us)'
STAT #1 id=10 cnt=177199 pid=2 pos=2 obj=33611 op='INDEX UNIQUE SCAN CITY_CODE_PK (cr=177201 r=0 w=0 time=342868 us)'
UNMAP #1:c=4000,e=1670,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=0,tim=1220253339724234
WAIT #1: nam='direct path read' ela= 6 p1=201 p2=79462 p3=31
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=53928 p3=31
WAIT #1: nam='direct path read' ela= 0 p1=201 p2=79607 p3=18
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=121671 p3=31
WAIT #0: nam='SQL*Net more data from client' ela= 17 p1=1413697536 p2=48 p3=0
=====================
PARSING IN CURSOR #1 len=2036 dep=0 uid=62 oct=3 lid=62 tim=1220253339730964 hv=3672446138 ad='b1cb8350'
select  MRH_MRN,DECODE(MRH_SEX,'M','MALE','FEMALE') AS SEX, trim((mrh_sur_name||' '||mrh_first_name||' '||mrh_middle_name)) as MEMNAME, decode(nvl(mrh_fellow_status_yn,'333'),'Y','FCA','ACA')
AS ACA_FCA, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_1,'A',MRH_RES_ADDR_LINE_1) AS L_ADD1, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_2,'A',MRH_RES_ADDR_LINE_2) AS L_ADD2,     DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_3,'A',MRH_RES_ADDR_LINE_3) AS L_ADD3, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ADDR_LINE_4,'A',MRH_RES_ADDR_LINE_4) AS L_ADD4, DECODE(MRH_RESI_STATUS,'I',
a.city_name,'A',C.CITY_NAME) AS L_CITY, DECODE(MRH_RESI_STATUS,'I',MRH_PROF_ZIP_POSTAL_CODE,'A',MRH_RES_ZIP_POSTAL_CODE) AS L_PIN, DECODE(MRH_RESI_STATUS,'I',b.cou_name,'A',D.COU_NAME) as L_Country,
DECODE(MRH_RESI_STATUS,'I','NOT APPLICABLE',MRH_PROF_ADDR_LINE_1) AS R_ADD1, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_2) AS R_ADD2, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_3)
AS R_ADD3, DECODE(MRH_RESI_STATUS,'I',' ',MRH_PROF_ADDR_LINE_4) AS R_ADD4, DECODE(MRH_RESI_STATUS,'I',' ','A',A.CITY_NAME) AS R_CITY, DECODE(MRH_RESI_STATUS,'I',' ','A',
MRH_PROF_ZIP_POSTAL_CODE) AS R_PIN, DECODE(MRH_RESI_STATUS,'I',' ','A',B.COU_NAME) as R_Country, decode(nvl(mrh_mem_sub_status,'555'),'26','EXPIRED','') as sub_status,
decode(nvl(mrh_mem_status,'777'),'1','ACTIVE','2','REMOVED') as mem_status,mrh_resi_status, DECODE(MRH_COP_STATUS,'1',DECODE(MRH_COP_TYPE ,'13','FULLTIME-COP','1','FULLTIME-COP', '12','PARTTIME-COP','2','PARTTIME-COP'),'NOT HOLDING COP')
AS COP_STATUS, TO_CHAR(MRH_ENROL_DT,'RRRR') AS ASSO_YR,TO_CHAR(MRH_FELLOW_DT,'RRRR') AS FELLOW_YR   from om_mem_reg_head,om_city A,om_country B,om_city C,om_country D
where  mrh_doc_status=5  and mrh_prof_city_code=A.City_code(+) and mrh_prof_cou_code=B.cou_code(+)
and mrh_res_city_code=C.City_code(+) and mrh_res_cou_code=D.cou_code(+)  and trim((mrh_sur_name||' '||mrh_first_name||''||mrh_middle_name)) like upper('%%')
ORDER BY trim((mrh_sur_name||' '||mrh_first_name||' '||mrh_middle_name))
END OF STMT
PARSE #1:c=0,e=182,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=1220253339730960
BINDS #1:
EXEC #1:c=0,e=75,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=1220253339731194
WAIT #1: nam='SQL*Net message to client' ela= 1 p1=1413697536 p2=1 p3=0
WAIT #1: nam='direct path write' ela= 10 p1=201 p2=53129 p3=31
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=53160 p3=31
WAIT #1: nam='direct path write' ela= 2 p1=201 p2=53191 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=53222 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=79369 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=79400 p3=31
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=79431 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=79462 p3=31
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=84873 p3=31
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=84904 p3=31
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=84935 p3=31
WAIT #1: nam='direct path write' ela= 5 p1=201 p2=84966 p3=31
WAIT #1: nam='direct path write' ela= 5 p1=201 p2=84745 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=84776 p3=31
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=84807 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=84838 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=121609 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=121640 p3=31
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=57190 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=119945 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=119976 p3=31
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=120007 p3=31
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=120038 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=130441 p3=31
WAIT #1: nam='direct path write' ela= 3 p1=201 p2=130472 p3=31
WAIT #1: nam='direct path write' ela= 4 p1=201 p2=130503 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=102502 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=133641 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=133672 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=133703 p3=31
WAIT #1: nam='direct path read' ela= 4 p1=201 p2=133734 p3=31
WAIT #1: nam='direct path read' ela= 4 p1=201 p2=71177 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=71208 p3=31
WAIT #1: nam='direct path read' ela= 4 p1=201 p2=71239 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=71270 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=81161 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=81192 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=81223 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=81254 p3=31
WAIT #1: nam='direct path read' ela= 4 p1=201 p2=82313 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=82344 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=82375 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=82406 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=128649 p3=31
WAIT #1: nam='direct path read' ela= 4 p1=201 p2=128680 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=128711 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=128742 p3=31
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=143369 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=143400 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=143431 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=143462 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=130185 p3=31
WAIT #1: nam='direct path read' ela= 3 p1=201 p2=130216 p3=31
WAIT #1: nam='db file sequential read' ela= 29 p1=3 p2=874392 p3=1
*** 2009-08-06 11:48:03.440
WAIT #1: nam='direct path read' ela= 10 p1=201 p2=109608 p3=31
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=96199 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=109577 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=96168 p3=31
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=103782 p3=31
WAIT #1: nam='direct path read' ela= 0 p1=201 p2=96137 p3=31
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=103751 p3=31
WAIT #1: nam='direct path write' ela= 0 p1=201 p2=84962 p3=31
WAIT #1: nam='direct path write' ela= 0 p1=201 p2=84993 p3=8
WAIT #1: nam='direct path write' ela= 0 p1=201 p2=130313 p3=31
WAIT #1: nam='direct path write' ela= 1 p1=201 p2=130344 p3=23
WAIT #1: nam='direct path read' ela= 4 p1=201 p2=84934 p3=31
WAIT #1: nam='direct path read' ela= 4 p1=201 p2=102537 p3=31
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=76928 p3=9
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=74536 p3=31
WAIT #1: nam='direct path read' ela= 1 p1=201 p2=57215 p3=10
WAIT #1: nam='direct path read' ela= 2 p1=201 p2=88280 p3=31
FETCH #1:c=5200325,e=62203320,p=11801,cr=368622,cu=7,mis=0,r=1,dep=0,og=4,tim=1220253401934572
WAIT #1: nam='SQL*Net message from client' ela= 83705 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 2 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=112,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253402018576
WAIT #1: nam='SQL*Net more data to client' ela= 19 p1=1413697536 p2=2016 p3=0
WAIT #1: nam='SQL*Net message from client' ela= 95759 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 1 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=79,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253402114512
WAIT #1: nam='SQL*Net more data to client' ela= 14 p1=1413697536 p2=2001 p3=0
WAIT #1: nam='SQL*Net message from client' ela= 109760 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 1 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=82,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253402224471
WAIT #1: nam='SQL*Net message from client' ela= 80582 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 2 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=110,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253402305271
WAIT #1: nam='SQL*Net message from client' ela= 511761 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 1 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=101,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253402817262
WAIT #1: nam='SQL*Net more data to client' ela= 21 p1=1413697536 p2=2002 p3=0
WAIT #1: nam='SQL*Net message from client' ela= 85214 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 1 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=107,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253402902725
WAIT #1: nam='SQL*Net message from client' ela= 77195 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 2 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=96,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253402980131
WAIT #1: nam='SQL*Net more data to client' ela= 37 p1=1413697536 p2=2001 p3=0
WAIT #1: nam='SQL*Net message from client' ela= 134711 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 1 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net more data to client' ela= 18 p1=1413697536 p2=2009 p3=0
FETCH #1:c=0,e=145,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253403115153
WAIT #1: nam='SQL*Net message from client' ela= 101690 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 1 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net more data to client' ela= 13 p1=1413697536 p2=2001 p3=0
FETCH #1:c=0,e=123,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253403217025
WAIT #1: nam='SQL*Net message from client' ela= 102501 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 1 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=96,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253403319700
WAIT #1: nam='SQL*Net message from client' ela= 688951 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 1 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net more data to client' ela= 16 p1=1413697536 p2=2003 p3=0
FETCH #1:c=4001,e=141,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253404008907
WAIT #1: nam='SQL*Net message from client' ela= 375225 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 2 p1=1413697536 p2=1 p3=0
FETCH #1:c=0,e=111,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=4,tim=1220253404384377

Similar Messages

  • How do I tune an Oracle database running RequestCenter?

    How do I tune an Oracle database running RequestCenter?
    The details in the following discussion apply to RequestCenter/AlignmentCenter versions 2006 and prior.
    For most efficient operation of ServiceManger, several of the RequestCenter tables must have statistics collected which include histograms.  You can use the SQL commands below to collect the required statistics:
    ANALYZE TABLE TxActivity COMPUTE STATISTICS
        FOR COLUMNS StateID SIZE 45;
    ANALYZE TABLE TxActivity COMPUTE STATISTICS
        FOR COLUMNS PerformerShared, IsBusy, TicketObjectID SIZE 2;
    ANALYZE TABLE TxActivity COMPUTE STATISTICS
        FOR COLUMNS Waiting, FlagID, EscalationLevel SIZE 3;
    ANALYZE TABLE TxActivity COMPUTE STATISTICS
        FOR COLUMNS PerformerOfficeID SIZE 75;
    ANALYZE TABLE TxActivity COMPUTE STATISTICS
        FOR COLUMNS PerformerID SIZE 185;
    ANALYZE TABLE TxActivity COMPUTE STATISTICS
        FOR COLUMNS CustomerID SIZE 200;
    ANALYZE TABLE TxActivity COMPUTE STATISTICS
        FOR COLUMNS ActivityFormID, ActivityTypeID SIZE 3;
    ANALYZE TABLE TxActivity COMPUTE STATISTICS
        FOR COLUMNS ClientOUID SIZE 45;
    ANALYZE TABLE TxActivity COMPUTE STATISTICS
        FOR COLUMNS NextActionID SIZE 6;
    ANALYZE TABLE TxProcess COMPUTE STATISTICS
        FOR COLUMNS TicketObjectID, EscalationLevel SIZE 3;
    ANALYZE TABLE TxRequisition COMPUTE STATISTICS
        FOR COLUMNS BeingProcessed SIZE 2;
    ANALYZE TABLE TxRequisition COMPUTE STATISTICS
        FOR COLUMNS OrganizationalUnitID SIZE 16;
    ANALYZE TABLE TxRequisition COMPUTE STATISTICS
        FOR COLUMNS StatusID SIZE 6;
    ANALYZE TABLE TxRequisitionEntry COMPUTE STATISTICS
        FOR COLUMNS ServiceID SIZE 32;
    ANALYZE TABLE TxRequisitionEntry COMPUTE STATISTICS
        FOR COLUMNS StatusID SIZE 6;
    ANALYZE TABLE DirPerson COMPUTE STATISTICS
        FOR COLUMNS isOffice SIZE 2;
    ANALYZE TABLE DirPerson COMPUTE STATISTICS
        FOR COLUMNS IsInactive SIZE 2;
    ANALYZE TABLE DirPerson COMPUTE STATISTICS
        FOR COLUMNS TimeZoneID SIZE 6;
    ANALYZE TABLE DirPerson COMPUTE STATISTICS
        FOR COLUMNS SupervisorID SIZE 3;
    ANALYZE TABLE DirPermission[LW1]  COMPUTE STATISTICS
        FOR COLUMNS TargetObjectID SIZE 12;
    ANALYZE TABLE DirPermission COMPUTE STATISTICS
        FOR COLUMNS OwnerObjectID SIZE 4;
    ANALYZE TABLE DirOrganizationalUnit COMPUTE STATISTICS
        FOR COLUMNS OrganizationalUnitTypeID SIZE 4;
    ANALYZE TABLE DefJavascript COMPUTE STATISTICS
        FOR COLUMNS IsGlobalOnLoad, IsGlobalOnSubmit, IsGlobalOnUnload
        SIZE 2;
    ANALYZE TABLE UIEntry COMPUTE STATISTICS
        FOR COLUMNS ObjectID SIZE 7;
    ANALYZE TABLE UIEntry COMPUTE STATISTICS
        FOR COLUMNS UserInterfaceID SIZE 16;

    I thought there will be a magic switch to turn it off and on!That is how Oracle has been since I can remember. You get what you ask for. Does that sound bad?
    Would you want:
    IF ('ABC' = 'Abc')to evaluate to TRUE or FALSE?
    The behaviour seems to be correct. In cases where you want the comparision to be case insensitive, you have several ways to do it. You do it exactly where you need it, not everywhere and all the places.
    The default behaviour would potentially give you one row where as making it case insensitive could potentially give you several rows. now you need to pick one, which one?
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1560806455855#6467925371258

  • Differece b/w SQL Tunning & SQL Access advisor

    What the difference b/w these 2 , i know SQL Access advisor suggest for index or materialize view for fast query....what SQL tunning do?

    Mithu,
    Please stop lying!!!
    You are not new in this field. You have been asking RTFM questions for almost three years!!! When I had three years experience, I didn't need to ask the questions you think you need to ask. I LOOKED THEM UP IN THE DOCUMENTATION!!
    I will continue to expose your attitude as abysmal.
    You are in flagrant violation of the Etiquette in this forum.
    You are a parasite. You don't want to do anything to resolve your own questions.
    You are a disgrace to the DBA profession.
    In fact, because of this I may want to have your account removed.
    Sybrand Bakker
    Senior Oracle DBA

  • Hi sql tunning.

    HI
    I have query sql tunning.
    SQL> explain plan set statement_id='TEST' for
    2 select * from employee where emp_id=7369;
    Explained.
    but to how to view this explained.

    That is a good explanation provided by hoek, in this case the Predicate Information section does provide a clue that the optimizer rewote the SQL statement that you provided into an equivalent form. That section of the execution plan indicates how the data will be retrieved and compared. The number to the left should be matched with the corresponding ID value in the execution plan.
    I do not have your test table, so I created one in 10.2.0.4 and 11.1.0.7, then built an equivalent query. Creating the test table and gathering statistics:
    SET LINESIZE 140
    SET TRIMSPOOL ON
    SET PAGESIZE 1000
    CREATE TABLE T1(
      EMPLOYEE_ID VARCHAR2(30),
      EMPLOYEE_NAME VARCHAR2(80),
      DEPT_ID VARCHAR2(15),
      SALARY NUMBER,
      PRIMARY KEY(EMPLOYEE_ID));
    INSERT INTO
      T1
    SELECT
      CHR(MOD(ROWNUM-1,26)+65)||TO_CHAR(ROWNUM),
      RPAD(CHR(MOD(ROWNUM-1,26)+65),40,CHR(MOD(ROWNUM-1,26)+65))||TO_CHAR(ROWNUM),
      CHR(MOD(ROWNUM-1,10)+65),
      ROUND(ABS(SIN(ROWNUM/180))*100000 + 10000,2)
    FROM
      DUAL
    CONNECT BY
      LEVEL<=1000;
    COMMIT;
    EXEC DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=>USER,TABNAME=>'T1',CASCADE=>TRUE)Executing the query with a 10053 trace enabled so that we can see how the optimizer transforms the submitted SQL statement:
    ALTER SESSION SET TRACEFILE_IDENTIFIER = '10053TraceTransform';
    ALTER SESSION SET EVENTS '10053 TRACE NAME CONTEXT FOREVER, LEVEL 1';
    SELECT /*+ FIND_ME */
      DEPT_ID
    FROM
      T1
    WHERE
      SALARY > ALL(
        SELECT
          AVG(SALARY)
        FROM
          T1
        GROUP BY
          DEPT_ID);
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,'TYPICAL'));On Oracle 10.2.0.4 the execution plan looked like this:
    SQL_ID  0yyg2tkus5avd, child number 0
    SELECT /*+ FIND_ME */   DEPT_ID FROM   T1 WHERE   SALARY > ALL(
    SELECT       AVG(SALARY)     FROM       T1     GROUP BY       DEPT_ID)
    Plan hash value: 3443957669
    | Id  | Operation            | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |      |       |       |  1561 (100)|          |
    |*  1 |  FILTER              |      |       |       |            |          |
    |   2 |   TABLE ACCESS FULL  | T1   |  1000 |  8000 |     2   (0)| 00:00:01 |
    |*  3 |   FILTER             |      |       |       |            |          |
    |   4 |    HASH GROUP BY     |      |    10 |    80 |     3  (34)| 00:00:01 |
    |   5 |     TABLE ACCESS FULL| T1   |  1000 |  8000 |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter( IS NULL)
       3 - filter(LNNVL(AVG("SALARY")<:B1))On 11.1.0.7 the execution plan looked like this:
    SQL_ID  0yyg2tkus5avd, child number 0
    SELECT /*+ FIND_ME */   DEPT_ID FROM   T1 WHERE   SALARY > ALL(
    SELECT       AVG(SALARY)     FROM       T1     GROUP BY       DEPT_ID)
    Plan hash value: 1608688004
    | Id  | Operation             | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT      |          |       |       |     9 (100)|          |
    |   1 |  MERGE JOIN ANTI NA   |          |   950 | 19950 |     9  (34)| 00:00:01 |
    |   2 |   SORT JOIN           |          |  1000 |  8000 |     4  (25)| 00:00:01 |
    |   3 |    TABLE ACCESS FULL  | T1       |  1000 |  8000 |     3   (0)| 00:00:01 |
    |*  4 |   SORT UNIQUE         |          |    10 |   130 |     5  (40)| 00:00:01 |
    |   5 |    VIEW               | VW_NSO_1 |    10 |   130 |     4  (25)| 00:00:01 |
    |   6 |     HASH GROUP BY     |          |    10 |    80 |     4  (25)| 00:00:01 |
    |   7 |      TABLE ACCESS FULL| T1       |  1000 |  8000 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       4 - access("SALARY"<="AVG(SALARY)")
           filter("SALARY"<="AVG(SALARY)")On 11.1.0.7 we see a null aware antijoin. Let's take a peek inside the 10053 trace files to see the transformed SQL statements (slightly reformatted):
    10.2.0.4:
    ******* UNPARSED QUERY IS *******
    SELECT /*+ */
      "SYS_ALIAS_1"."DEPT_ID" "DEPT_ID"
    FROM
      "TESTUSER"."T1" "SYS_ALIAS_1"
    WHERE
      NOT EXISTS (
        SELECT /*+ */
          0
        FROM
          "TESTUSER"."T1" "T1"
        GROUP BY
          "T1"."DEPT_ID"
        HAVING
          LNNVL(AVG("T1"."SALARY")<"SYS_ALIAS_1"."SALARY"))11.1.0.7:
    Final query after transformations:******* UNPARSED QUERY IS *******
    SELECT
      "T1"."DEPT_ID" "DEPT_ID"
    FROM
      (SELECT
        AVG("T1"."SALARY") "AVG(SALARY)"
      FROM
        "TESTUSER"."T1" "T1"
      GROUP BY
        "T1"."DEPT_ID") "VW_NSO_1",
      "TESTUSER"."T1" "T1"
    WHERE
      "T1"."SALARY"<="VW_NSO_1"."AVG(SALARY)"Just out of curiosity, what is the purpose of your SQL statement (I can see what it is doing, but why are you doing it)?
    Charles Hooper
    Co-author of "Expert Oracle Practices: Oracle Database Administration from the Oak Table"
    http://hoopercharles.wordpress.com/
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • *URGENT HELP REQUIRED* java.sql.SQLException: Invalid Oracle URL specifed

    Hi all,
    In the middle of the last week for my final year project and having to convert to an Oracle database due to compatibility problems with university Tomcat Server and MS Access. I'm having trouble connecting to the Oracle database and would appreciate some help please.
    Running on Windows 98 in the lab here, and the Oracle 9i, release 9.2.0.2.0, J2SDK1.4.0, Classes12.zip installed OK.
    Code for connection looks like this inside the constructor of my class:
    Class.forName("oracle.jdbc.driver.OracleDriver");
    cardSaleConnexion = DriverManager.getConnection("jdbc:oracle:[email protected]:1521:sid","user_name","pwdt");
    System.out.println("Connection Successful ");
    And I'm getting the following error when calling the constructor in a driver program:
    java.sql.SQLException: Invalid Oracle URL specified
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:188)
         at java.sql.DriverManager.getConnection(DriverManager.java:512)
         at java.sql.DriverManager.getConnection(DriverManager.java:171)
         at CardSale.<init>(CardSale.java:30)
         at Driver.main(Driver.java:11)
    Exception in thread "main"
    Please reply on a very urgent basis.
    Kind regards,
    Peter

    Try ojdbc14.jar as the JDBC driver instead of classes12.zip.
    Refer:
    http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html
    http://docs.sun.com/source/817-5603-10/index.html
    Database Driver
    This section describes the known database driver issues and associated solutions.
    ID      Summary
    4700531      On Solaris, an ORACLE JDBC driver error occurs.
         This new Java Database Connectivity (JDBC) driver is for Oracle (R) working with JDK1.4. The problem is caused by a combination of the Oracle 9.1 database and ojdbc14.jar. Applying the patch will fix the problem on Solaris 32-bit machine, running an Oracle 9.0.1.3 database.
         Solution
         Obtain and apply the patch to your server from the Oracle Web site for Bug 2199718. Perform the following steps:
         1.��Go to the Oracle web site.
         2.��Click the 'patches' button.
         3.��Type 2199718 in the patch number field.
         4.��Click the 32-bit Solaris OS patch.Go to Metalink.oracle.com.
         5.��Click patches.
         6.��Under patch number, enter 2199718.
         7.��Click the 32 bit Solaris OS patch.
    4707531      On Solaris, accessing an Oracle 9.1 database with an Oracle 9.2 Client may cause data corruption.
         If you use an Oracle (R) 9.2 client to access an Oracle 9.1 database, data corruption might occur when a number column follows a timestamp column.
         The problem might be caused by using the ojdbc14.jar file with an Oracle 9.1 database. Applying the patch might assist in addressing the situation on Solaris 32-bit machines, running an Oracle 9.1 database. This JDBC driver is for Oracle working with JDK1.4.
         Solution
         Obtain the patch that Oracle might make available from the Oracle web site for Bug 2199718 and apply it to your server.
    Regards,
    Pankaj D.

  • Problem in starting SQL*PLUS in oracle database 10g

    Hi
    Well I am facing one problem while starting SQL*PLUS in oracle database 10g
    ERROR - "Procedure entry point longjmp could not be located in dynamic link library orauts.dll"
    This has happened when I installed Oracle Database 11g on same machine and when I deinstalled Oracle 11g then SQL*PLUS is started...no error came
    Can anybody tell me the reason please...

    hi
    pls im having the same problem but in my own case i installed oracle apex using 11g.
    im env variable is:
    C:\Oracle\product\10.1.0\Client_1\bin;C:\Oracle\product\10.1.0\Client_1\jre\1.4.2\bin\client;C:\Oracle\product\10.1.0\Client_1\jre\1.4.2\bin;C:\app\Xty\product\11.2.0\dbhome_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\
    pls which is my apex_home so i can interchange it?
    i also have oracle 10g client installed

  • SQL Server to Oracle migration with SQL Server DTS

    I migrate database from SQL Server to Oracle with SQL Server DTS. the process is success. I can select table_name from user_tables or user_objects. I also can see the table from DBA Studio. But When I use desc to list the structure of table in SQLPLUS. it tell me object don't exist.
    What is wrong?
    Thanks

    use sp_help <tablename>

  • How to look at the SQL trace in Oracle

    Hi,
    How do we look for the SQL trace in Oracle?
    With SQL trace I mean all the SQL statements being executed in Oracle database ( including select ).
    Thanks........

    Thanks for a quick reply nbellam. I wonder if there is a way to find out the date and time when the sql was executed?

  • Query data from MS SQL db through Oracle ? By using JAVA ?

    Hi folks,
    I would like to sync our one table in oracle db with table in different system, stored in MS SQL database.
    What would be the easiest option for connection from Oracle to MS SQL db to be able to query data from MS SQL through some Oracle package?
    If possible, I would like to keep all "tricky steps" within Oracle database. I heard about option with Java, but so far we have no experience with java in Oracle.
    Our database: Oracle 11g Database Standard Edition One
    Many thanks,
    Tomas

    C:\Users\tomeo>dg4pwd HELIOS
    ORACLE Gateway Password Utility
    Constructing password file for Gateway SID HELIOS
    For user account SYSTEM
    OPW-00001: Unable to open password-file (RC=0)
    C:\Users\tomeo>

  • Error -While create a connection to Microsoft SQL Sever from Oracle SQL Dev

    Dear All,
    While I am trying to create a connection to Microsoft SQL Sever from Oracle SQL Developer. The following error: "Cannot connect to Microsoft SQL Server on localhost" has been occurred.
    Can anyone please guide me to solve this..
    Thanks in advance,
    Rider

    Hi,
    Issue not supported in sharepoint on-premise team.
    In addition, as this issue is related to Powerview, I suggest you create a new thread on for Powerview forum, more experts will assist you.
    https://social.technet.microsoft.com/Forums/en-US/home?forum=powerview
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Adding a field to an sql statement in Oracle Reports error ORA-00933

    We have been requested to add a field that already exists in the table referred to by the sql statement in Oracle Reports Builder. The report was set up by a consultant about 3 yrs ago and we don't really have much skill in this area. What is happening when I try to modify the SQL statement, either adding a field or deleting a field to the SELECT statement, causes an error message preventing the statement from being saved. The only way out of the error message is to click Cancel. The error message is
    ORA-00933:SQL command not properly ended
    ORDER BY Program ==> NAME
    Even adding or deleting a space anywhere in the SQL statement causes the error (not adding any new fields). A coworker found that if we comment out the ORDER BY, the statement will accept the new field in the SELECT section, however then we lose the order by functionality. I would like to add one additional field before the FROM. Not sure if any additional data are needed. Thank you.
    SELECT p.person_uid PIDM_KEY, p.id_number ID,
                   p.full_name_lfmi name,            
                    p.BIRTH_DATE, p.GENDER Sex,
                    Decode(a.residency,'D',p.Primary_ethnicity,'F')  Ethn,
                    a.academic_period TERM,        
                    CASE WHEN :p_group_by = 'PROGRAM' THEN a.program
                                 ELSE ' '
                    END AS Program,
                    a.COLLEGE, a.degree, a.major, ' ' rule,
                    a.STUDENT_POPULATION,a.STUDENT_LEVEL,    a.application_status Status,  a.application_status_date app_sts_dte,
                    ad.decision_date1 Last_Dec_Date,
                    ad.decision1||' '||ad.decision2||' '|| ad.decision3||' '|| ad.decision4||' '|| ad.decision5 Decisions,
                    /*  Deposit Date uses the last term entered in :p_term parameter string */
                    (SELECT MAX(deposit_effective_date) FROM usf_as_deposit WHERE account_uid = a.person_uid &term_clause group by account_uid)   AS "DEPOSIT DATE",     
                    ph.phone as PHONE,
                    CASE WHEN PS.FIRST_CONTACT IN ('NET','PAP','COM','COP') THEN PS.First_Contact
                     ELSE CASE WHEN ps.latest_contact IN ('NET','PAP','COM','COP') THEN PS.Latest_Contact
                                ELSE '  '
                                END
                    END AS FIRST_CONTACT,
                    DECODE(:p_address,'Y',REPLACE(adr.street1||' '||adr.street2||' '||adr.street3||' '||adr.city||','||adr.state||' '||adr.nation||' '||adr.zip,'  ',' '),' ') as  address, adr.nation, adr.state,
                    goremal_email_address email, a.residency, a.application_date, p.primary_ethnicity, c.cohort
    FROM MST_ADMISSIONS_APPLICATION A,
               MST_PERSON p,mst_pre_student PS,  Admissions_Cohort c, usf_v_phone_pr_ma ph,
               MST_admissions_decision_slot AD, usf_v_email, usf_v_address_dr_lr_ma_pr adr
    WHERE a.PERSON_UID = p.person_uid
            AND a.curriculum_priority  = 1
            AND a.person_uid = ps.person_uid
           AND a.person_uid = ad.person_Uid(+)
           AND a.person_uid = goremal_pidm(+)
           AND a.person_uid = adr.pidm(+)
           AND a.person_uid = ph.pidm(+)
           AND ph.rnum(+) = 1
           AND a.person_uid = c.person_uid(+)
           AND a.academic_period = c.academic_period(+)
      &Where_Clause
           /*    TAKE OUT FOLLOWING LINE AFTER DATA IS CLEANED UP  */
            AND NOT(p.id_number = '00000000'   OR SUBSTR(p.id_number,1,1) = 'B'  OR UPPER(p.full_name_lfmi)  LIKE '%TESTING%')
           AND  a.application_status_date >= NVL(:p_as_of_date,sysdate-8000)
           AND a.academic_period = ad.academic_period(+)
            AND a.application_number = ad.application_number(+)
            AND a.degree <> 'ND'    /*   AND a.college <> 'LW'                         --  Does not need non-degree and law students    */
           &Cohort_Clause 
    ORDER BY Program  &ORDER_CLAUSE

    Hi Denis,
    I tried your suggestion. The good thing is that adding the comma allowed me to be able to add a.campus to the select statement, unfortunately, another error message happened.
    ORA-00936: missing expression SELECT p . person_uid PIDM_KEY ,
    p . id_number , p . full_name_lfmi name , p . BIRTH_DATE , p . GENDER Sex ,
    Decode ( a . residency , 'D' , p . Primary_Ethnicity , 'F' ) Ethn , a . academic_period TERM ,
    CASE WHEN : P_group_by = 'PROGRAM THEN a I started over and tried only putting in the comma and get the same message even though I didn't add campus. After that, removed the comma which led to the ORA-00933 error message. So once again, I had to close the file without saving, in order for the report to run at all.

  • Migrating a table with BLOB field from SQL-Server to Oracle.

    Hi All,
    I'm trying to create a Class to migrate data from SQL-Server to Oracle, this table has a BLOB field.
    The Code:
    package br.com.infox;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.Statement;
    public class Migrador {
         public static void main(String[] args){
              try {
                   // Conex�o com o SQL Server
                   Class.forName("net.sourceforge.jtds.jdbc.Driver");
                   Connection conSQL = DriverManager.getConnection ("jdbc:jtds:sqlserver://10.10.2.9/protocolo","prot","suinf2002");
                   // Conex�o com o Oracle
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   Connection conORA = DriverManager.getConnection ("jdbc:oracle:thin:@10.10.2.2:1521:des","protocolo","protocolo");
                   Statement stSQL = conSQL.createStatement();
                   String querySQL = "SELECT * FROM DOC_INCORPORADO";
                   ResultSet rsSQL = stSQL.executeQuery(querySQL);
                   String queryORA = "INSERT INTO PROT_VITALICIAMENTO (NU_PROCESSO, ANO_PROCESSO, CD_USUARIO, DT_ENVIO," +
                             "DE_COMPLEMENTO, NM_ARQUIVO, ARQUIVO, NU_SEQ, CD_TIPO_ARQUIVO, MES, ANO) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
                   PreparedStatement psORA = conORA.prepareStatement(queryORA);
                   while (rsSQL.next()){
                        System.out.println("Linha: " + rsSQL.getRow());
                        psORA.setInt(1, rsSQL.getInt("nu_processo"));
                        psORA.setInt(2, rsSQL.getInt("ano_processo"));
                        psORA.setInt(3, rsSQL.getInt("cd_usuario"));
                        psORA.setDate(4, rsSQL.getDate("dt_incorporacao"));
                        psORA.setString(5, rsSQL.getString("complemento"));
                        psORA.setString(6, rsSQL.getString("nm_arquivo"));
                        psORA.setBinaryStream(7, rsSQL.getBinaryStream("arquivo"), (int)rsSQL.getBlob("arquivo").length());
                        psORA.setInt(8, rsSQL.getInt("num_seq"));
                        psORA.setInt(9, rsSQL.getInt("cd_tipo_arquivo"));
                        psORA.setInt(10, rsSQL.getInt("mes"));
                        psORA.setInt(11, rsSQL.getInt("ano"));
                        psORA.executeUpdate();
                   stSQL.close();
                   psORA.close();
                   conORA.close();
                   conSQL.close();
              } catch (Exception e){
                   e.printStackTrace();
    The ERROR:
    java.sql.SQLException: Exce��o de E/S: Connection reset
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
         at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3668)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1119)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2191)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2064)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2989)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:658)
         at br.com.infox.Migrador.main(Migrador.java:41)
    What's the problem of these Class?
    Thank's.

    Depending on the version of the database you have, you could use transportable tablespaces.
    http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96524/c04space.htm#9370

  • [0098]SQL*Plus encountered oracle error 100 while executing SQL Statement

    Hi,
    i'm trying to delete duplicate records from a table and running following script. this script is triggered from a unix script. it successfully deletes the records but in the last throws following error message,
    :[0098]SQL*Plus encountered oracle error 100 while executing SQL Statement:2:Investigation required:
    can anybody please help? below is the script.
    DECLARE
    --CURSOR FOR DUPLICATE ROWS
    CURSOR CUR_DUPLICATE_ROWS IS
    Select RMS_NOTE_ID, RMS_SUMMARY_NOTE_ID, count(*) cnt from PARTY_NOTE
    group by RMS_NOTE_ID,RMS_SUMMARY_NOTE_ID having count(*) > 1;
    var_date PARTY_NOTE.PARTY_NOTE_CREATED_DATE%TYPE;
    BEGIN
    FOR DUPLICATE_ROWS_REC IN CUR_DUPLICATE_ROWS
    LOOP
    delete from party_note
    where RMS_NOTE_ID= DUPLICATE_ROWS_REC.RMS_NOTE_ID
    and RMS_SUMMARY_NOTE_ID= DUPLICATE_ROWS_REC.RMS_SUMMARY_NOTE_ID
    and rowid not in (select max(rowid) from party_note
    where RMS_NOTE_ID= DUPLICATE_ROWS_REC.RMS_NOTE_ID and RMS_SUMMARY_NOTE_ID= DUPLICATE_ROWS_REC.RMS_SUMMARY_NOTE_ID);
    commit;
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE(SQLERRM);
    ROLLBACK;
    END;

    Try this:
    delete party_note
    where  rowid not in (select max(rowid)
                         from   party_note
                         group  by rms_note_id, rms_summary_note_id
    commit;No need for cursors and loops.
    And when that's completed, consider ALTERing the table to add a unique index (or even a primary key) so you'll never need to do this again.

  • Entity Framework - Code First - Migration - How to access SQL Server and Oracle using the same context?

    Hello,
    I use Entity Framework code first approach.
    My project is working fine with SQL Server. But, I want to access Oracle too. I want to switch SQL Server and Oracle in run time.
    I am able to access Oracle using "Oracle.ManagedDataAccess.EntityFramework.dl" in a new project.
    But, Is this possible to access SQL Server and Oracle in the same project.
    Thanks,
    Murugan

    This should be possible with a Code-First workflow.  In Code-First the database mapping layer is generated at runtime.
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Unable to connect SQL State=S1000 [Oracle][ODBC][Ora]ORA-12170:

    Hi all,
    I have an Windows XP OS with SP3.
    I have installed the Oracle 11g server.
    On trying to connect to the ODBC connection, i get the following error message:
    Unable to connect SQL State=S1000 [Oracle][ODBC][Ora]ORA-12170: TNS: Connect timeout occured
    On trying the tnsping,
    TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0 - Production on 09-OCT-2
    011 13:11:05
    Copyright (c) 1997, 2007, Oracle. All rights reserved.
    Used parameter files:
    E:\app\Gautam\product\11.1.0\db_1\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.
    5.207)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl))
    TNS-12535: TNS:operation timed out
    On trying to connect with SQL Developer, i get the following error:
    Status: Failure - Test failed: Io Exception: The Network Adapter could not establish the connection
    However i am able to connect to the same using SQL Plus
    Another issue that occurs is that the Oracle Enterprise Manager shows the following error after a while:
    Agent Connection to Instance
    Status Failed
    Details ORA-12505: TNS:listener does not currently know of SID given in connect descriptor (DBD ERROR: OCIServerAttach)
    The following services are all up during this point of time:
    OracleDBConsoleorcl
    OracleOraDb11g_home1TNSListener
    OracleServiceORCL
    Any help in this regard will be very useful as this is hindering the progress of my work.
    Thanks in advance for the help.
    - Gautam

    841683 wrote:
    Hi,
    I did try and delete my listener.ora and then create a new one..
    That did not solve my issue..
    What are the steps for configuring the listener again.
    Thanks for the response..
    - Gautamno listener.ora file is required.
    just do as below
    lsnrctl start

Maybe you are looking for