42. 如何查看各个表空间占用磁盘情况? SQL> col tablespace format a20 SQL> select b.file_id 文件ID号, b.tablespace_name 表空间名, b.bytes 字节数, (b.bytes-sum(nvl(a.bytes,0))) 已使用, sum(nvl(a.bytes,0)) 剩余空间, sum(nvl(a.bytes,0))/(b.bytes)*100 剩余百分比 from dba_free_space a,dba_data_files b where a.file_id=b.file_id group by b.tablespace_name,b.file_id,b.bytes order by b.file_id
50. 怎样修改oracel数据库的默认日期? alter session set nls_date_format='yyyymmddhh24miss'; OR 可以在init.ora中加上一行 nls_date_format='yyyymmddhh24miss'
51. 如何将小表放入keep池中? alter table xxx storage(buffer_pool keep);
52. 如何检查是否安装了某个patch? check that oraInventory
53. 如何使select语句使查询结果自动生成序号? select rownum,COL from table;
54. 如何知道数据裤中某个表所在的tablespace? select tablespace_name from user_tables where table_name='TEST'; select * from user_tables中有个字段TABLESPACE_NAME,(oracle); select * from dba_segments where …;
55. 怎幺可以快速做一个和原表一样的备份表? create table new_table as (select * from old_table);
55. 怎幺在sqlplus下修改procedure? select line,trim(text) t from user_source where name =’A’ order by line;
56. 怎样解除PROCEDURE被意外锁定? alter system kill session ,把那个session给杀掉,不过你要先查出她的session id