ORACLE常用SQL
表:
select * from cat;
select * from tab;
select table_name from user_tables;
视图:
select text from user_views where view_name=upper('&view_name');
索引:
select index_name,table_owner,table_name,tablespace_name,status from user_indexes order by table_name;
触发器:
select trigger_name,trigger_type,table_owner,table_name,status from user_triggers;
快照:
select owner,name,master,table_name,last_refresh,next from user_snapshots order by owner,next;
同义词:
select * from syn;
序列:
select * from seq;
数据库链路:
select * from user_db_links;
约束限制:
select TABLE_NAME,CONSTRAINT_NAME,SEARCH_CONDITION,STATUS
from user_constraints WHERE TABLE_name=upper('&TABLE_Name');
本用户读取其他用户对象的权限:
select * from user_tab_privs;
本用户所拥有的系统权限:
select * from user_sys_privs;
用户:
select * from all_users order by user_id;
表空间剩余自由空间情况:
select tablespace_name,sum(bytes) 总字节数,max(bytes),count(*) from dba_free_space group by tablespace_name;
数据字典:
select table_name from dict order by table_name;
锁及资源信息:
select * from v$lock;不包括DDL锁
数据库字符集:
select name,value$ from props$ where name='NLS_CHARACTERSET';
inin.ora参数:
select name,value from v$parameter order by name;
SQL 共享池:
select sql _text from v$sqlarea;
数据库:
select * from v$database
控制文件:
select * from V$controlfile;
重做日志文件信息:
select * from V$logfile;
来自控制文件中的日志文件信息:
select * from V$log;
来自控制文件中的数据文件信息:
select * from V$datafile;
NLS参数当前值:
select * from V$nls_parameters;
ORACLE 版本信息:
select * from v$version;
描述后台进程:
select * from v$bgprocess;
查看版本信息:
select * from product_component_version;
Oracle -常用监控SQL
1.监控事例的等待:
&nb
相关文档:
什么是合并多行字符串(连接字符串)呢,例如:
SQL> desc test;
Name Type Nullable Default Comments
------- ------------ -------- ------- --------
COUNTRY VARCHAR2(20) Y &nb ......
进入sql*plus需要输入用户名、口令和主机标志符
system/manager
sys/change_on_intall
scott/tiger
internal/oracle
以上为初始密码
主机字符串空或者是@+你的服务名,在本地登陆不需要本地服务名。
下面就介绍一下一些常用的sql*plus命令:
首先查看当前使用的数据库实例:
select name from V$database;
切换两个 ......
TO_DATE格式(以时间:2007-11-02 13:45:25为例)
Year:
yy two digits 两位年 显示值:07
yyy three digits 三位年 ......
CentOS 5.2下Oracle 10G 安装详解
2009-01-16 14:38
CentOS 必需的安装包
* GNOME Desktop Environment
* Editors
* Graphical Internet
* Text-based Internet
* Development Libraries
* Development Tools
* Legacy Software Development
* Server Configuration Tools
* Administration Tools
* Base
* Le ......
Partition outer join is a new mechanism in 10g to "invent" data to fill the gaps in non-contiguous results. In 10g there are many methods to deal with such a problem (including the awe-inspiring, but equally terrifying, MODEL clause). In older versions of Oracle, "data-densification" was not as simp ......