oracle 表空间_Oracle技术教程_Oracle_数据库
来源:百度文库 编辑:神马文学网 时间:2024/06/03 16:09:20
查看表空间的信息1)从控制文件中得到的所有表空间的名称
SQL> select * from V$tablespace;
TS# NAME INC BIG FLA ENC
---------- ------------------------------ --- --- --- ---
0 SYSTEM YES NO YES
1 UNDOTBS1 YES NO YES
2 SYSAUX YES NO YES
4 USERS YES NO YES
3 TEMP NO NO YES
6 EXAMPLE YES NO YES
已选择6行。
2)查看所有的(或者用户可以访问的)表空间
SQL> select * from dba_tablespaces;
SQL> select * from user_tablespaces;
3)查看所有的(或者用户可以访问的)表空间内的空闲区间的信息
SQL> select * from dba_free_space;
SQL> select * from user_free_space;
SQL> desc dba_free_space;
名称 是否为空? 类型
----------------------------------------- -------- -----------------
TABLESPACE_NAME VARCHAR2(30)
FILE_ID NUMBER
BLOCK_ID NUMBER
BYTES NUMBER
BLOCKS NUMBER
RELATIVE_FNO NUMBER
dba_free_space 各字段的定义如下:(以下是oracle官方网的定义) DBA_FREE_SPACE
DBA_FREE_SPACE describes the free extents in all tablespaces in the database.
Related View
USER_FREE_SPACE describes the free extents in the tablespaces accessible to the current user.
Column Datatype NULL Description
TABLESPACE_NAME VARCHAR2(30) Name of the tablespace containing the extent
FILE_ID NUMBER File identifier number of the file containing the extent
BLOCK_ID NUMBER Starting block number of the extent
BYTES NUMBER Size of the extent (in bytes)
BLOCKS NUMBER Size of the extent (in Oracle blocks)
RELATIVE_FNO NUMBER Relative file number of the file containing the extent
4)查看所有数据文件(临时文件)的信息
SQL> select * from V$datafile;
SQL> select * from V$tempfile;
5)查看所有属于表空间的数据(或临时)文件
SQL> select * from dba_data_files;
SQL> select * from dba_temp_files;
6)查看临时文件的使用/剩余空间
SQL> select * from V$temp_space_header;
TABLESPACE_NAME FILE_ID BYTES_USED BLOCKS_USED BYTES_FREE
------------------------------ ---------- ---------- ----------- ----------
BLOCKS_FREE RELATIVE_FNO
----------- ------------
TEMP 1 19922944 2432 1048576
128 1
7)相看用户的默认和临时表空间
SQL> select * from dba_users;
8)查看所有用户的表空间配额
SQL> select * from dba_ts_quotas;
TABLESPACE_NAME USERNAME BYTES MAX_BYTES BLOCKS MAX_BLOCKS DRO
------------------------------ ------------------------------ ---------- ---------- ---------- ---------- ---
SYSAUX DMSYS 262144 209715200 32 25600 NO
SYSAUX &n
文章出处:http://www.diybl.com/course/7_databases/oracle/oraclejs/2008727/134187.html
SQL> select * from V$tablespace;
TS# NAME INC BIG FLA ENC
---------- ------------------------------ --- --- --- ---
0 SYSTEM YES NO YES
1 UNDOTBS1 YES NO YES
2 SYSAUX YES NO YES
4 USERS YES NO YES
3 TEMP NO NO YES
6 EXAMPLE YES NO YES
已选择6行。
2)查看所有的(或者用户可以访问的)表空间
SQL> select * from dba_tablespaces;
SQL> select * from user_tablespaces;
3)查看所有的(或者用户可以访问的)表空间内的空闲区间的信息
SQL> select * from dba_free_space;
SQL> select * from user_free_space;
SQL> desc dba_free_space;
名称 是否为空? 类型
----------------------------------------- -------- -----------------
TABLESPACE_NAME VARCHAR2(30)
FILE_ID NUMBER
BLOCK_ID NUMBER
BYTES NUMBER
BLOCKS NUMBER
RELATIVE_FNO NUMBER
dba_free_space 各字段的定义如下:(以下是oracle官方网的定义) DBA_FREE_SPACE
DBA_FREE_SPACE describes the free extents in all tablespaces in the database.
Related View
USER_FREE_SPACE describes the free extents in the tablespaces accessible to the current user.
Column Datatype NULL Description
TABLESPACE_NAME VARCHAR2(30) Name of the tablespace containing the extent
FILE_ID NUMBER File identifier number of the file containing the extent
BLOCK_ID NUMBER Starting block number of the extent
BYTES NUMBER Size of the extent (in bytes)
BLOCKS NUMBER Size of the extent (in Oracle blocks)
RELATIVE_FNO NUMBER Relative file number of the file containing the extent
4)查看所有数据文件(临时文件)的信息
SQL> select * from V$datafile;
SQL> select * from V$tempfile;
5)查看所有属于表空间的数据(或临时)文件
SQL> select * from dba_data_files;
SQL> select * from dba_temp_files;
6)查看临时文件的使用/剩余空间
SQL> select * from V$temp_space_header;
TABLESPACE_NAME FILE_ID BYTES_USED BLOCKS_USED BYTES_FREE
------------------------------ ---------- ---------- ----------- ----------
BLOCKS_FREE RELATIVE_FNO
----------- ------------
TEMP 1 19922944 2432 1048576
128 1
7)相看用户的默认和临时表空间
SQL> select * from dba_users;
8)查看所有用户的表空间配额
SQL> select * from dba_ts_quotas;
TABLESPACE_NAME USERNAME BYTES MAX_BYTES BLOCKS MAX_BLOCKS DRO
------------------------------ ------------------------------ ---------- ---------- ---------- ---------- ---
SYSAUX DMSYS 262144 209715200 32 25600 NO
SYSAUX &n
文章出处:http://www.diybl.com/course/7_databases/oracle/oraclejs/2008727/134187.html
oracle 表空间_Oracle技术教程_Oracle_数据库
移动Oracle数据库表空间文件。 - 塞外风 - 博客园
oracle创建表空间和用户授权 - - JavaEye技术网站
oracle数据库表空间文件收缩实例 - 47522341的专栏 - CSDN博客
oracle数据库表空间文件收缩实例 - 47522341的专栏 - CSDN博客
Linux宝库 - 正文 - Oracle的空间数据库管理技巧
Oracle 10g数据库的最大容量 - magic007的Oracle空间 - ITPU...
Oracle表空间设计理念
oracle创建表空间和用户授权 - - JavaEye技术网站111
Oracle分布事务中最先提交分布式的3个阶段,Oracle系列教程,Oracle技术教程...
Perl连接Oracle数据库
Oracle数据库常见问题答疑
杭州Oracle数据库课程
杭州Oracle数据库课程
Perl连接Oracle数据库
关于oracle数据库备份
oracle备份还原数据库
Oracle数据库基础心得
Oracle数据库常见问题答疑
Oracle数据库监听配置
卸载oracle数据库
Oracle数据库监听配置
Oracle数据库 透明网关
Oracle:pl/sql?异常处理之raise -数据库-技术中心-启天网