Oracle系统表查询
数据字典dict总是属于Oracle用户sys的。
1、用户:
select username from dba_users;
改口令
alter user spgroup identified by spgtest;
2、表空间:
select * from dba_data_files;
select * from dba_tablespaces;//表空间
select tablespace_name,sum(bytes), sum(blocks)
from dba_free_space group by tablespace_name;//空闲表空间
select * from dba_data_files
where tablespace_name=’RBS’;//表空间对应的数据文件
select * from dba_segments
where tablespace_name=’INDEXS’;
3、数据库对象:
select * from dba_objects;
CLUSTER、DATABASE LINK、FUNCTION、INDEX、LIBRARY、PACKAGE、PACKAGE BODY、
PROCEDURE、SEQUENCE、SYNONYM、TABLE、TRIGGER、TYPE、UNDEFINED、VIEW。
4、表:
select * from dba_tables;
analyze my_table compute statistics;->dba_tables后6列
select extent_id,bytes from dba_extents
where segment_name=’CUSTOMERS’ and segment_type=’TABLE’
order by extent_id;//表使用的extent的信息。segment_type=’ROLLBACK’查看回滚段的空间分配信息
列信息:
select distinct table_name
from user_tab_columns
where column_name=’SO_TYPE_ID’;
5、索引:
select * from dba_indexes;//索引,包括主键索引
select * from dba_ind_columns;//索引列
select i.index_name,i.uniqueness,c.column_name
from user_indexes i,user_ind_columns c
where i.inde
相关文档:
oracle表空间操作详解
1
2
3作者: 来源: 更新日期:2006-01-04
5
6
7建立表空间
8
9CREATE TABLESPACE data01
10DATAFILE '/ora ......
例:
create user his identified by his default tablespace users temporary tablespace temp;
grant connect,resource,dba to his;
create tablespace his
logging
datafile 'd:\oracle\product\10.2.0\oradata\zjxsh\his.ora' size 100M extent
management local segment space management auto;
exp his/ny@ny ......
<1>逻辑备份
不用去拷贝数据库的物理文件
备份逻辑上的结构
外部的工具:导出和导入的工具
DOS下的命令 cmd下执行
导出exp export缩写形式
查看帮助 exp help=y
使用参数文件导出
exp parfile=c:\ab ......
当我们用oracle的SQL*Plus工具输入sql语句的时候,SQL*Plus的默认设置总有些不合理的地方,此时我们通过以下一些方法改进:
1、可以运用SQL*Plus自身一些语句改变环境参数。
SQL> set linesize 900 ; /* 更改显示的宽度, 设置成900后, 一行数据就不会分两行显示了 */
&nb ......
硬件环境:hp rx2660*2+hp eva4400
软件环境:hpux 11.23,oracle 10g for hpux,oracle clusterware,mc/serviguard 11.18
1.安装HPUX
2.打补丁,参照文档即可,或打到magepatch dec.12.07以后也可以
3.安装mc/sg+SGeRAC(hp MC/Serviceguard为配合oracle rac所使用的模块)
4.规划存储
lock vg:1G
rac:100G
5.修改内 ......