标签:inf arch 参数 rename arc imm 保留 iat archive
SQL> alter database datafile 8 offline; alter database datafile 8 offline * ERROR at line 1: ORA-01145: offline immediate disallowed unless media recovery enabled
SQL> archive log list; Database log mode No Archive Mode --<<<<<非归档 Automatic archival Disabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 517 Current log sequence 519 SQL> ALTER DATABASE MOVE DATAFILE ‘/refresh/home/app/oracle/oradata/orcl/users01.dbf‘ to ‘/refresh/home/app/oracle/oradata/orcl/users02.dbf‘ ; Database altered.
SQL> ALTER DATABASE MOVE DATAFILE ‘/refresh/home/app/oracle/oradata/orcl/users02.dbf‘ to ‘/refresh/home/app/oracle/oradata/orcl/users01.dbf‘ keep; --<<keep 原有数据文件 Database altered. SQL> host ls -l /refresh/home/app/oracle/oradata/orcl/user* -rw-r----- 1 oracle oracle 352591872 Dec 17 07:19 /refresh/home/app/oracle/oradata/orcl/users01.dbf -rw-r----- 1 oracle oracle 352591872 Dec 17 07:19 /refresh/home/app/oracle/oradata/orcl/users02.dbf
SQL> ALTER DATABASE MOVE DATAFILE ‘/refresh/home/app/oracle/oradata/orcl/users01.dbf‘ to ‘/refresh/home/app/oracle/oradata/orcl/users02.dbf‘ ; ALTER DATABASE MOVE DATAFILE ‘/refresh/home/app/oracle/oradata/orcl/users01.dbf‘ to ‘/refresh/home/app/oracle/oradata/orcl/users02.dbf‘ * ERROR at line 1: ORA-01119: error in creating database file ‘/refresh/home/app/oracle/oradata/orcl/users02.dbf‘ ORA-27038: created file already exists Additional information: 1 SQL> ALTER DATABASE MOVE DATAFILE ‘/refresh/home/app/oracle/oradata/orcl/users01.dbf‘ to ‘/refresh/home/app/oracle/oradata/orcl/users02.dbf‘ reuse ; Database altered. SQL> host ls -l /refresh/home/app/oracle/oradata/orcl/user* -rw-r----- 1 oracle oracle 352591872 Dec 17 07:23 /refresh/home/app/oracle/oradata/orcl/users02.dbf 没有使用keep ,user01.dbf已经删除了。
ALTER DATABASE MOVE DATAFILE ‘/u01/oracle/rbdb1/user1.dbf‘ TO ‘+DG1/data/orcl/datafile/user1.dbf‘; ALTER DATABASE MOVE DATAFILE ‘+DG1/data/orcl/datafile/user1.dbf‘ TO ‘+DG2/data/orcl/datafile/user1.dbf‘;
标签:inf arch 参数 rename arc imm 保留 iat archive
原文地址:https://www.cnblogs.com/zylong-sys/p/12015940.html