Oracle初学者必知的100个问题
http://tech.ddvip.com 2007年01月22日 社区交流
本文详细介绍Oracle初学者必知的100个问题
9. 请问如何分辨某个用户是从哪台机器登陆ORACLE的?
SELECT machine , terminal FROM V$SESSION;
10. 用什么语句查询字段呢?
desc table_name 可以查询表的结构
select field_name,... from ... 可以查询字段的值
select * from all_tables where table_name like '%'
select * from all_tab_columns where table_name='??'
11. 怎样得到触发器、过程、函数的创建脚本?
desc user_source
user_triggers
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 ;
责编:豆豆技术应用
- Oracle 10g 教程
- Oracle 故障处理
- Oracle 存储过程
- Oracle 备份恢复
- Oracle 性能调优
- Oracle 9i 教程
- Oracle 11g 教程
- Oracle 启动
- Oracle 命令
- Oracle 数据库管理
- Oracle 时间
- Oracle 密码
- Oracle 用户
- Oracle 常见错误
- Oracle 建数据表
- Oracle 索引
- Oracle 数据库连接
- Oracle 锁
- Oracle RAC 专题
- Oracle exp/imp 命令
- Oracle 表空间
- Oracle 查询
- Oracle 函数
- Oracle PL/SQL 专题
- 更多Oracle 专题>>>