1.停止alter tablespace aa offline
2.commit or rollback

解决方案 »

  1.   

    oracle中的临时表不会自动删除,表中的数据会在事务或者会话结束后删除(取决于你建临时表时候设定为事务级或对话级)
      

  2.   

    在你创建user的时候会给他指定一个temporary tablespace.
    这个表空间是你在处理事务的时候用作排序的,你可以做一个试验,
    在你进行处理的时候有意识的查看你的用户对应的temporary tablespace的容量,你会发现,他几乎是直线上升的。但你的事务处理完毕的时候,他的容量又会恢复的原来大小。所以如果你的临时空间一直资源占用的的话,多数是你的事务处理还没有完成,如果你确信已经完成了的话,但他还是无法释放,结束你的事务,若还是不可以,重起你的系统。
      

  3.   

    我在应用程序中查询一个数据量(一百万条)的表,其中还要与其他三个表连接(其他三个表的数据量大约在每个表50万条数据),建立了连接索引,可是一到查询时,服务器CPU就达到100%,并且高具不下,(把所有的查询操作都停掉后,CPU还是100%)(重新启动Oracle服务、重新启动服务器都不行)大约在4-5个小时之后,服务器CPU自动降下来。而且创建的临时表空间达到100%,系统表空间和系统临时表空间都达到100%。请教各位高手,这是什么原因造成的?是不是没有创建一个会自动释放的临时表空间的缘故呀?
      

  4.   

    KingSunSha您好:代码如下:select distinct vehicle.VID, vehicle.VTYPEID, vehicle.FRAMENO, vehicle.ENGINENO,vehicle.GEARBOXNO,vehicle.ADORNCOLOR,voiturecolor.vcname,vehicletype.VTNAME from vehicle,repair,enterprise,police,vehicletype,voiturecolor 
    where vehicle.bodycolor=voiturecolor.vcno and vehicle.vstyle=vehicletype.vstyle and   repair.license=enterprise.license 
    and vehicle.vno=repair.vno  
    and police.polino=enterprise.master and vehicle.vid like '-1%'请帮忙!谢谢!
      

  5.   

    哇,不慢才怪呢???
    又是distinct,又是like,还这么多表,这么多连接,你在做什么呢?
      

  6.   

    vehicle-->vid,vehicletype-->vstyle,voirturecolor-->vcno,
    repair-->license,vehicle-->vid,police-->polino,表名-->字段建的索引!
      

  7.   

    那我该怎么办呢?
    而distinct是必须的,还有别的办法么?
      

  8.   

    select distinct a.VID, a.VTYPEID, a.FRAMENO, a.ENGINENO,a.GEARBOXNO,a.ADORNCOLOR,
    f.vcname,e.VTNAME 
    from vehicle a,
    repair b,
    enterprise c,
    police d,
    vehicletype e,
    voiturecolor f 
    where a.bodycolor=f.vcno 
    and a.vstyle=e.vstyle 
    and a.vno=b.vno  
    and b.license=c.license 
    and c.master =d.polino
    and a.vid like '-1%'
    整理了你的语句,发现,没有从b,c,d中选择任何东西,为什么要连接它
    起码。可以写成
    select distinct a.VID, a.VTYPEID, a.FRAMENO, a.ENGINENO,a.GEARBOXNO,a.ADORNCOLOR,
    f.vcname,e.VTNAME 
    from vehicle a,
    vehicletype e,
    voiturecolor f 
    where a.bodycolor=f.vcno 
    and a.vstyle=e.vstyle 
    and a.vid like '-1%'
      

  9.   

    select distinct a.VID,
           a.VTYPEID, 
           a.FRAMENO, 
          a.ENGINENO,
          a.GEARBOXNO,
          a.ADORNCOLOR,
          f.vcname,
          e.VTNAME 
    from vehicle a,repair b ,
         enterprise c,police d,
         vehicletype e,voiturecolor  f
    where a.bodycolor=f.vcno 
      and a.vstyle=e.vstyle and 
       b.license=c.license 
      and a.vno=b.vno  
      and d.polino=c.master 
      and a.vid like '-1%'表间关系如下:
    a-b,b-c,c-d,a-e,a-f你确定你的连接那些字段是pk吗?如果不是的话,出现笛卡集的机会很大。
      

  10.   

    KingSunSha(弱水三千) :  您好请问如何创建一个 事务级或对话级的临时表?
    他们之间有何区别呀?谢谢!
      

  11.   

    KingSunSha(弱水三千):
    请问如何创建一个事务级或对话级的临时表?
    他们之间的区别是什么?