ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 日志文件一些相关命令

日志文件一些相关命令

原创 Linux操作系统 作者:hjgluguo 时间:2009-06-22 23:14:06 0 删除 编辑

SQL> ALTER DATABASE CLEAR logfile group 3;

SQL> SELECT group#, sequence#, members, bytes, status, archived FROM v$log;

SQL> SELECT * FROM v$logfile;

SQL> alter system set DB_CREATE_ONLINE_LOG_DEST_1 = '/home/oracle/disk3';

SQL> alter system set DB_CREATE_ONLINE_LOG_DEST_2 = '/home/oracle/disk6';

SQL> alter system set DB_CREATE_ONLINE_LOG_DEST_3 = '/home/oracle/disk9';

SQL> alter database add logfile;

SQL> alter database drop logfile group 4;

SQL> alter database add logfile ( '/home/oracle/disk3/huang/onlinelog/redo04a.log', '/home/oracle/disk6/huang/onlinelog/redo04b.log', '/home/oracle/disk9/huang/onlinelog/redo04c.log') SIZE 15M;

SQL> alter database add logfile ( '/home/oracle/disk3/huang/onlinelog/redo05a.log', '/home/oracle/disk6/huang/onlinelog/redo05b.log', '/home/oracle/disk9/huang/onlinelog/redo05c.log') SIZE 15M;

SQL> alter database drop logfile group 3;

SQL> alter database add logfile ( '/home/oracle/disk3/huang/onlinelog/redo03a.log', '/home/oracle/disk6/huang/onlinelog/redo03b.log', '/home/oracle/disk9/huang/onlinelog/redo03c.log') SIZE 15M;

SQL> alter database drop logfile group 2;

SQL> alter database add logfile ( '/home/oracle/disk3/huang/onlinelog/redo02a.log', '/home/oracle/disk6/huang/onlinelog/redo02b.log', '/home/oracle/disk9/huang/onlinelog/redo02c.log') SIZE 15M;

SQL> alter system switch logfile;
若第一组的状态(status)还是ACTIVE,再次执行下面命令,直到其状态为INACTIVE
SQL> alter system switch logfile;

SQL> alter database drop logfile group 1;

SQL> alter database add logfile ( '/home/oracle/disk3/huang/onlinelog/redo01a.log', '/home/oracle/disk6/huang/onlinelog/redo01b.log', '/home/oracle/disk9/huang/onlinelog/redo01c.log') SIZE 15M;

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7865774/viewspace-607206/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 移动控制文件的
请登录后发表评论 登录
全部评论

注册时间:2008-07-11

  • 博文量
    97
  • 访问量
    181526