易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle表空间管理

--1查看表空间已经使用的百分比
select   a.tablespace_name,a.bytes/1024/1024
"Sum MB",(a.bytes-b.bytes)/1024/1024   "used MB",b.bytes/1024/1024
"free MB",round(((a.bytes-b.bytes)/a.bytes)*100,2) "percent_used"
from
(select tablespace_name,sum(bytes) bytes from dba_data_files group by tablespace_name)   a,
(select tablespace_name,sum(bytes) bytes,max(bytes) largest from dba_free_space group by tablespace_name)   b
where   a.tablespace_name=b.tablespace_name
order   by   ((a.bytes-b.bytes)/a.bytes)   desc
“Sum MB”表示表空间所有的数据文件总共在操作系统占用磁盘空间的大小
比如:test表空间有2个数据文件,datafile1为300MB,datafile2为400MB,那么test表空间的“Sum MB”就是700MB
“userd MB”表示表空间已经使用了多少
“free MB”表示表空间剩余多少
“percent_user”表示已经使用的百分比
--2比如从1中查看到MLOG_NORM_SPACE表空间已使用百分比达到90%以上,可以查看该表空间总共有几个数据文件,每个数据文件是否自动扩展,可以自动扩展的最大值。
select   file_name,tablespace_name,bytes/1024/1024 "bytes MB",maxbytes/1024/1024 "maxbytes MB"   from   dba_data_files
  where tablespace_name='MLOG_NORM_SPACE';
--3比如MLOG_NORM_SPACE表空间目前的大小为19GB,但最大每个数据文件只能为20GB,数据文件快要写满,可以增加表空间的数据文件
用操作系统UNIX、Linux中的df   -g命令(查看下可以使用的磁盘空间大小)
获取创建表空间的语句:
select   dbms_metadata.get_ddl('TABLESPACE','MLOG_NORM_SPACE')   from   dual;
--4确认磁盘空间足够,增加一个数据文件
alter   tablespace   MLOG_NORM_SPACE
add   datafile   '/oracle/oms/oradata/mlog/Mlog_Norm_data001.dbf'
size   10M   autoextend   on   maxsize   20G
--5验证已经增加的数据文件
select   file_name


相关文档:

Oracle日期函数集锦(二)

Oracle日期函数集锦(二)
二、常用时间函数
1.trunc(sysdate,'Q') 本季度第一天
SQL> select trunc(sysdate,'Q') from dual;
TRUNC(SYSDATE,'Q')
------------------
2007-4-1
2.trunc(sysdate,'D') 本周的第一天(周日)
SQL> select trunc(sysdate,'D')from dual;
TRUNC(SYSDATE,'D')
------------------
2 ......

Oracle 登录问题

昨天在整理文件夹的时候不小心将一个dbf数据文件移动了,今天登录plsql时却发现提示ora-01033:oracle initialization or shutdown in progress的错误,开始以sqlnet.ora的文件配置文件,但是改来改去还是登录不了。最后按照网友的提示将sqlnet.ora文件中的SQLNET.AUTHENTICATION_SERVICES= (NTS)改成了SQLNET.AUTHENTICATI ......

ORACLE中搜索字母数字混合的字符串

SQL> with tt as
  2  (
  3  select 'haha' string from dual union
  4  select '123' from dual union
  5  select 'haha12' from dual union
  6  select 'haha[]' from dual union
  7  select '12@@' from dual union
  8  select ......

oracle学习历程之存储过程

oracle学习历程之存储过程
(1) 存储过程通过参数传递,安全性高,可防止注入式攻击.
(2) 查询的语句在存储过程里,与程序不相关,如果以后要修改程序或者数据库,都不会出现连锁反应,增加系统可扩展性.
(3) 网站执行查询的时候,只需要传递简单的参数就可以了,无论是代码优化上还是查询优化上都可以做到高效.
(4) 允许模块 ......

oracle 11g的表空间加密

因为明摆着的缘故,10.2引出的TDE效能对列加密以后,招致相干目录丧失了对不等式的判断能力。
如次:
ENCRYPTIONDEMO@fmw//scripts> create table tde_table(id number encrypt no salt,na
me varchar二(30))
二 ;
Table created.
Elapsed: 00:00:00.11
ENCRYPTIONDEMO@fmw//scripts> begin
二 for i in 1..2 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号