zoukankan      html  css  js  c++  java
  • 11g Rac开启归档

    SQL> select name,log_mode from v$database;
    
    NAME	  LOG_MODE
    --------- ------------
    DEVRAC	  NOARCHIVELOG
    
    SQL> select file_name from dba_data_files;
    
    FILE_NAME
    --------------------------------------------------------------------------------
    +DATA/devrac/datafile/users.259.818444617
    +DATA/devrac/datafile/undotbs1.258.818444617
    +DATA/devrac/datafile/sysaux.257.818444617
    +DATA/devrac/datafile/system.256.818444617
    
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup mount;
    ORACLE instance started.
    
    Total System Global Area 1.6034E+10 bytes
    Fixed Size		    2244192 bytes
    Variable Size		 6341788064 bytes
    Database Buffers	 9663676416 bytes
    Redo Buffers		   26505216 bytes
    Database mounted.
    SQL> alter system set LOG_ARCHIVE_DEST_1= "LOCATION=+DATA/devrac";
    
    System altered.
    
    SQL> alter database open;
    
    Database altered.
    
    SQL> archive log list;
    Database log mode	       No Archive Mode
    Automatic archival	       Disabled
    Archive destination	       +DATA/devrac
    Oldest online log sequence     10328
    Current log sequence	       10330
    SQL> alter database archivelog;
    alter database archivelog
    *
    ERROR at line 1:
    ORA-01126: database must be mounted in this instance and not open in any
    instance
    
    
    SQL> alter database archivelog;
    alter database archivelog
    *
    ERROR at line 1:
    ORA-01126: database must be mounted in this instance and not open in any
    instance
    
    
    SQL> alter database archivelog;
    alter database archivelog
    *
    ERROR at line 1:
    ORA-01126: database must be mounted in this instance and not open in any
    instance
    
    
    SQL> shutdown abort;
    ORACLE instance shut down.
    SQL> startup mount;
    ORACLE instance started.
    
    Total System Global Area 1.6034E+10 bytes
    Fixed Size		    2244192 bytes
    Variable Size		 6341788064 bytes
    Database Buffers	 9663676416 bytes
    Redo Buffers		   26505216 bytes
    Database mounted.
    SQL> alter database archivelog;
    alter database archivelog
    *
    ERROR at line 1:
    ORA-00265: instance recovery required, cannot set ARCHIVELOG mode
    
    
    SQL> alter database open;
    
    Database altered.
    
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup mount;
    ORACLE instance started.
    
    Total System Global Area 1.6034E+10 bytes
    Fixed Size		    2244192 bytes
    Variable Size		 6341788064 bytes
    Database Buffers	 9663676416 bytes
    Redo Buffers		   26505216 bytes
    Database mounted.
    SQL> alter database archivelog;
    
    Database altered.
    
    SQL> alter database open;
    
    Database altered.
    
    
    2.asm拷贝数据
    ASMCMD> cp +DATA/devrac/datafile/undotbs1.258.818444617 test.dbf
    copying +DATA/devrac/datafile/undotbs1.258.818444617 -> +DATA/DEVRAC/ARCHIVELOG/2014_07_15/test.dbf
    
    ASMCMD> cp test.dbf test1.dbf
    copying +DATA/DEVRAC/ARCHIVELOG/2014_07_15/test.dbf -> +DATA/DEVRAC/ARCHIVELOG/2014_07_15/test1.dbf
    ASMCMD> cp test.dbf test2.dbf
    copying +DATA/DEVRAC/ARCHIVELOG/2014_07_15/test.dbf -> +DATA/DEVRAC/ARCHIVELOG/2014_07_15/test2.dbf
    ASMCMD-8016: copy source->'+DATA/DEVRAC/ARCHIVELOG/2014_07_15/test.dbf' and target->'+DATA/DEVRAC/ARCHIVELOG/2014_07_15/test2.dbf' failed
    ORA-19505: failed to identify file "+DATA/DEVRAC/ARCHIVELOG/2014_07_15/test2.dbf"
    ORA-17502: ksfdcre:4 Failed to create file +DATA/DEVRAC/ARCHIVELOG/2014_07_15/test2.dbf
    ORA-15041: diskgroup "DATA" space exhausted
    ORA-06512: at "SYS.X$DBMS_DISKGROUP", line 413
    ORA-06512: at line 3 (DBD ERROR: OCIStmtExecute)
    
    空间不足报错信息
    

  • 相关阅读:
    CentOS7安装MySQL报错,解决Failed to start mysqld.service: Unit not found
    已知root用户密码并登录,修改mysql用户名密码方法
    修改完Apache的配置文件,重启Apache后,仍无法打开网页
    设置Apache(httpd)和Nginx 开机自启动
    Apache的网站,使用Nginx进行反向代理(1个IP绑定多个域名,对应多个网站)解决方案
    启动mysql遇到问题Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    linux下启动mysql提示:Timeout error occurred trying to start MySQL Daemon
    在线上Linux下,PHP扩展安装(使用yum安装)
    在Linux下 MySQL错误 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 解决办法【很管用】
    mysql 如何删除数据库中所有的表
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13352205.html
Copyright © 2011-2022 走看看