我有一段指令在sqlform30中运行,有时可以通过,有时不能通过,在sqlplus下没有问题,请问是什么原因?谢谢 请问是回推段的问题吗?如果是的话 如何解决?
该段指令是:
select count(*) into cl.nnn_nx from tj_dwj where dbwh in (select dbwh from tj_dml where bdbz=18 and rtrim(ltrim(fzh)) in (select rtrim(ltrim(zmh)) from tjzd_fx where lh='N')) and ch in (select ch from tj_fwj where fbwh in (select fbwh from tj_fml where bdbz=18 and (to_date(cfsn||cfsy||cfsr||cfss||cfsf,'yyyymmddhh24mi') between to_date(:global.year1||:global.month1||:global.day1||'18'||'01','yyyymmddhh24mi') and to_date (:global.year||:global.month||:global.day||'18'||'00','yyyymmddhh24mi')) and rtrim(ltrim(dzh)) in (select rtrim(ltrim(zmh)) from tjzd_fx where lh='X')) and nvl(zaz,0)>0 and nvl(rtrim(pm),'') not in (select rtrim(fyy_dm) from tjzd_fyy) and fxh='008' and fzh<>'LDZ')
回滚段的情况:
1 select segment_name, tablespace_name, r.status,
2 (initial_extent/1024) InitialExtent,(next_extent/1024) NextExtent,
3 max_extents, v.extents CurExtent
4 From dba_rollback_segs r, v$rollstat v
5 Where r.segment_id = v.usn(+)
6* order by segment_name
SQL> /SEGMENT_NAME TABLESPACE_NAME STATUS
------------------------------ ------------------------------ ----------------
INITIALEXTENT NEXTEXTENT MAX_EXTENTS CUREXTENT
------------- ---------- ----------- ----------
R01 RBS ONLINE
128 128 249 7R02 RBS ONLINE
128 128 249 14R03 RBS ONLINE
128 128 249 28
R04 RBS ONLINE
128 128 249 9RP01 RBSPUBLIC ONLINE
1024 1024 249 4RP02 RBSPUBLIC ONLINE
1024 1024 249 4
RP03 RBSPUBLIC ONLINE
1024 1024 249 4RP04 RBSPUBLIC ONLINE
1024 1024 249 4RP05 RBSPUBLIC ONLINE
1024 1024 249 4
RP06 RBSPUBLIC ONLINE
1024 1024 249 4RP07 RBSPUBLIC ONLINE
1024 1024 249 4RP08 RBSPUBLIC ONLINE
1024 1024 249 4
RP09 RBSPUBLIC ONLINE
1024 1024 249 3RP10 RBSPUBLIC ONLINE
1024 1024 249 4SYSTEM SYSTEM ONLINE
52 52 249 3表空间情况:
1 select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_size
2 from dba_tablespaces t, dba_data_files d
3 where t.tablespace_name = d.tablespace_name
4* group by t.tablespace_name
SQL> /TABLESPACE_NAME TS_SIZE
------------------------------ ----------
HYGL 800
LSGL 500
RBS 8
RBSPUBLIC 200
SYSTEM 100
TEMP 11
TEMP_HY 150
TEMP_XC 100
TOOLS 25
USERS 1
XCGL 800
该段指令是:
select count(*) into cl.nnn_nx from tj_dwj where dbwh in (select dbwh from tj_dml where bdbz=18 and rtrim(ltrim(fzh)) in (select rtrim(ltrim(zmh)) from tjzd_fx where lh='N')) and ch in (select ch from tj_fwj where fbwh in (select fbwh from tj_fml where bdbz=18 and (to_date(cfsn||cfsy||cfsr||cfss||cfsf,'yyyymmddhh24mi') between to_date(:global.year1||:global.month1||:global.day1||'18'||'01','yyyymmddhh24mi') and to_date (:global.year||:global.month||:global.day||'18'||'00','yyyymmddhh24mi')) and rtrim(ltrim(dzh)) in (select rtrim(ltrim(zmh)) from tjzd_fx where lh='X')) and nvl(zaz,0)>0 and nvl(rtrim(pm),'') not in (select rtrim(fyy_dm) from tjzd_fyy) and fxh='008' and fzh<>'LDZ')
回滚段的情况:
1 select segment_name, tablespace_name, r.status,
2 (initial_extent/1024) InitialExtent,(next_extent/1024) NextExtent,
3 max_extents, v.extents CurExtent
4 From dba_rollback_segs r, v$rollstat v
5 Where r.segment_id = v.usn(+)
6* order by segment_name
SQL> /SEGMENT_NAME TABLESPACE_NAME STATUS
------------------------------ ------------------------------ ----------------
INITIALEXTENT NEXTEXTENT MAX_EXTENTS CUREXTENT
------------- ---------- ----------- ----------
R01 RBS ONLINE
128 128 249 7R02 RBS ONLINE
128 128 249 14R03 RBS ONLINE
128 128 249 28
R04 RBS ONLINE
128 128 249 9RP01 RBSPUBLIC ONLINE
1024 1024 249 4RP02 RBSPUBLIC ONLINE
1024 1024 249 4
RP03 RBSPUBLIC ONLINE
1024 1024 249 4RP04 RBSPUBLIC ONLINE
1024 1024 249 4RP05 RBSPUBLIC ONLINE
1024 1024 249 4
RP06 RBSPUBLIC ONLINE
1024 1024 249 4RP07 RBSPUBLIC ONLINE
1024 1024 249 4RP08 RBSPUBLIC ONLINE
1024 1024 249 4
RP09 RBSPUBLIC ONLINE
1024 1024 249 3RP10 RBSPUBLIC ONLINE
1024 1024 249 4SYSTEM SYSTEM ONLINE
52 52 249 3表空间情况:
1 select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_size
2 from dba_tablespaces t, dba_data_files d
3 where t.tablespace_name = d.tablespace_name
4* group by t.tablespace_name
SQL> /TABLESPACE_NAME TS_SIZE
------------------------------ ----------
HYGL 800
LSGL 500
RBS 8
RBSPUBLIC 200
SYSTEM 100
TEMP 11
TEMP_HY 150
TEMP_XC 100
TOOLS 25
USERS 1
XCGL 800
既输入哪些数据作为参数时,可能会发生问题。