重新创建undotbs
1 SQL>startuo mount2 SQL>alter system set undo_management=manual scope=spfile;3 SQL>shutdown4 SQL>startup mount;5 SQL> alter database datafile '/home/oracle/oracle/oradata/star/undotbs01.dbf' off...
rownum
在oracle中,按特定条件查询前N条记录,用个rownum就搞定了。select * from emp where rownum<=5而且书中也告诫,不能对rownum用">",这也就意味着,如果你想用select * from emp where rownum>5则是失败的rownum背后...
oracle回收站基本应用
oracle 10G有一个好功能,就是recycle,这个东西可以帮助我们找回删除掉得table,就像windows的回收站一样,而且比windows的回收站更高级,就是当表空间不够时,oracle会自动去清理回收站查看回收站: show rec...
释放undo表空间
1 查看undo表空间使用情况 select tablespace_name,bytes/1024/1024 from dba_data_files where tablespace_name='UNDOTBS1.DBF';2 创建新的undo表空间 create undo tablespace xxx;3 更改参数文件&nbs...
oracle 表空间利用率
表空间使用select d.tablespace_name,(d.bytes-f.bytes)/1024/1024 used from (select tablespace_name,sum(bytes) bytes from dba_free_space group by tablespace_name) f,(select tablespace_name,sum(bytes) byt...