Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7933286
  • 博文数量: 124
  • 博客积分: 2880
  • 博客等级: 少校
  • 技术积分: 873
  • 用 户 组: 普通用户
  • 注册时间: 2009-09-16 17:08
文章分类

全部博文(124)

文章存档

2011年(28)

2010年(60)

2009年(36)

我的朋友

分类: Oracle

2011-10-27 11:25:54

Oracle DBA命令参考——alter database(2011-04-08 16:07:01)
var $tag='杂谈'; var $tag_code='30438dc8fd1e00fd0dcad2380c28f6a1'; var $r_quote_bligid='530fe7580100tv07'; var $worldcup='0'; var $worldcupball='0'; 标签: 杂谈 分类: Oracle知识

alter database:修改数据文件
alter database datafile 4 offline;
alter database datafile '/opt/oracle/datafile/users01.dbf' offline;
alter database datafile '/opt/oracle/datafile/users01.dbf' resize 100M;
alter database datafile '/opt/oracle/datafile/users01.dbf' autoextend on next 100M maxsize 1000M;
alter database datafile 4 end backup;

 

alter database:修改临时文件(tempfile)
alter database tempfile 4 resize 100M;
alter database tempfile 4 autoextend on next 100M maxsize 1000M;
alter database tempfile 4 drop including datafiles;
alter database tempfile 4 offline;

 

alter database:归档日志(archivelog)模式命令
alter database archivelog;
alter database noarchivelog;
alter database force logging;
alter database clear logfile '/opt/oracle/logfiles/redo01.rdo';
alter database clear unarchived logfile '/opt/oracle/logfiles/redo01.rdo';
alter database add supplemental log data;
alter database add supplemental log data (primary key,unique);
alter database drop supplemental log data;

 

alter database:控制文件操作
alter database backup controlfile to trace;
alter database backup controlfile to trace as '/opt/oracle/logfile_backup/backup_logfile.trc' reuse resetlogs;
alter database backup controlfile to '/opt/oracle/logfile_backup/backup_logfile.ctl';

 

alter database:创建数据文件
alter database create datafile '/opt/oracle/datafile/users01.dbf' as '/opt/oracle/datafile/users01.dbf';
alter database create datafile 4 as '/opt/oracle/datafile/users01.dbf';
alter database create datafile '/opt/oracle/datafile/users01.dbf' as new;

 

alter database:数据文件脱机/联机
参见“alter database:修改数据库文件”

 

alter database:日志文件命令
alter database add logfile group 2 ('/opt/oracle/logfiles/redo02a.rdo','/opt/oracle/logfile/redo02b.rdo') size 300M reuse;
alter database add logfile member '/opt/oracle/logfiles/redo02c.rdo' to gourp 2
alter database add logfile thread 3 group 2 ('/opt/oracle/logfiles/redo02a.rdo','/opt/oracle/logfiles/redo02b.rdo') size 300M reuse;
alter database drop logfile group 3
alter database drop logfile member '/opt/oracle/logfiles/redo02b.rdo';

 

alter database:安装和打开数据库
alter database mount;
alter database open;

 

alter database:移动或重命名数据库文件或联机重做日志
注意:数据库必须已经安装才能重命名或移动联机重做日志。数据库必须已经安装或数据文件处于脱机状态时,才能移动数据库中的数据文件。
alter database rename file '/ora/datafile/oldfile.dbf' to '/ora/datafile/newfile.dbf';

 

alter database:以只读方式打开数据库
alter database open read only;

 

alter database:使用resetlogs打开数据
alter database open resetlogs;

 

alter database:恢复数据库
对数据库的恢复,建议使用recover命令代替。

阅读(1547) | 评论(0) | 转发(0) |
0

上一篇:maven点滴

下一篇:MySQL资源

给主人留下些什么吧!~~