ORACLE应用常见傻瓜问题45问及解答
来源:优易学  2011-11-20 11:18:04   【优易学:中国教育考试门户网】   资料下载   IT书店

12. 怎样计算一个表占用的空间的大小? 

select owner,table_name, 

num_rows, 

blocks*aaa/1024/1024 'size m', 

empty_blocks, 

last_analyzed 

from dba_tables 

where table_name=’xxx’; 

here: aaa is the value of db_block_size ; 

xxx is the table name you want to check 

 

13. 如何查看最大会话数? 

select * from v$parameter where name like ’proc%’; 

sql> 

sql> show parameter processes 

name type value 

------------------------------------ ------- ------------------------------ 

aq_tm_processes integer 1 

db_writer_processes integer 1 

job_queue_processes integer 4 

log_archive_max_processes integer 1 

processes integer 200 

这里为200个用户。 

select * from v$license; 

其中sessions_highwater纪录曾经到达的最大会话数 

 

14. 如何查看系统被锁的事务时间? 

select * from v$locked_object ; 

 

15. 如何以archivelog的方式运行oracle 

init.ora 

log_archive_start = true 

restart database 

 

16. 怎幺获取有哪些用户在使用数据库 

select username from v$session;

 

17. 数据表中的字段最大数是多少

表或视图中的最大列数为 1000 

 

18. 怎样查得数据库的sid ? 

select name from v$database; 

也可以直接查看 init.ora文件 

 

19. 如何在oracle服务器上通过sqlplus查看本机ip地址 ? 

select sys_context(’userenv’,’ip_address’) from dual; 

如果是登陆本机数据库,只能返回127.0.0.1

 

20. unix 下怎么调整数据库的时间? 

su -root 

date -u 08010000 

 

21. oracle table中如何抓取memo类型字段为空的资料记录

select remark from oms_flowrec where trim(’ ’ from remark) is not null ; 

 

22. 如何用bbb表的资料去更新aaa表的资料(有关联的字段

update aaa set bns_snm=(select bns_snm from bbb where aaa.dpt_no=bbb.dpt_no) where bbb.dpt_no is not null; 

 

23. p4计算机安装方法 

symcjit.dll改为sysmcjit.old 

 

24. 何查询server是不是ops? 

select * from v$option; 

如果parallel server=true则有ops 

 

25. 何查询每个用户的权限

select * from dba_sys_privs;

 

26. 如何将表移动表空间

alter table table_name move tablespace_name;

 

27. 如何将索引移动表空间

alter index index_name rebuild tablespace tablespace_name; 

 

28. linux,unix下如何激活dba studio? 

oemapp dbastudio 


29. 
如何解锁

alter system kill session ‘sid,serir#’; 

 

30. sqlplus下如何修改编辑器

define _editor=<编辑器的完整路经> -- 必须加上双引号来定义新的编辑器,也可以把这个写在$oracle_home/sqlplus/admin/glogin.sql里面使它永久有效。

上一页  [1] [2] [3] 下一页

责任编辑:虫虫

文章搜索:
 相关文章
热点资讯
热门课程培训