oracle rac中文名添加到本地路径解决办法(ORA-01157)
故障模拟(生产环境勿测试)
在第二个节点上查询出现错误
关闭库,复制文件
关闭库,再次复制文件至asm
mount库
修改文件路径
关闭库
数据库已经正常
节点2查看
故障模拟(生产环境勿测试)
点击(此处)折叠或打开
-
[grid@rac1-213-11 ~]# su - oracle
-
[grid@rac1-213-11 ~]$ sqlplus / as sysdba
- SQL>alter table netdata add datafile '测试DATA'
在第二个节点上查询出现错误
点击(此处)折叠或打开
-
[oracle@rac2-213-12 trace]$ sqlplus / as sysdba
-
SQL*Plus: Release 11.2.0.4.0 Production on Sun Jul 1 22:07:21 2018
-
Copyright (c) 1982, 2013, Oracle. All rights reserved.
-
Connected to:
-
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
-
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
-
Data Mining and Real Application Testing options
-
SQL> select file_name from dba_data_files;
-
ERROR:
-
ORA-01157: cannot identify/lock data file 9 - see DBWR trace file
-
ORA-01110: data file 9: '/u01/app/oracle/product/11.2.0/db_1/dbs/测试DATA'
-
-
SQL> select file_name from dba_data_files;
-
ERROR:
-
ORA-01157: cannot identify/lock data file 9 - see DBWR trace file
- ORA-01110: data file 9: '/u01/app/oracle/product/11.2.0/db_1/dbs/娴????ìDATA'
点击(此处)折叠或打开
-
--grd
-
[grid@rac1-213-11 ~]$ srvctl stop database -d devdb
-
-
-
--oracle
-
[oracle@rac1-213-11 dbs]$ cp "测试DATA" netdata05.dbf
-
-
-
mount 库
-
--grid
-
[grid@rac1-213-11 ~]$ srvctl start database -d devdb -o mount
-
--oracle
-
[oracle@rac1-213-11 ~]$ sqlplus / as sysdba
-
-
-
SQL*Plus: Release 11.2.0.4.0 Production on Sun Jul 1 22:39:54 2018
-
Copyright (c) 1982, 2013, Oracle. All rights reserved.
-
-
Connected to:
-
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
-
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
-
Data Mining and Real Application Testing options
-
-
-
SQL> alter database rename file '/u01/app/oracle/product/11.2.0/db_1/dbs/测试DATA' to '/u01/app/oracle/product/11.2.0/db_1/dbs/netdata05.dbf';
-
- Database altered.
关闭库,再次复制文件至asm
点击(此处)折叠或打开
-
[grid@rac1-213-11 ~]$ srvctl stop database -d devdb
-
ASMCMD> cp /u01/app/oracle/product/11.2.0/db_1/dbs/netdata05.dbf .
-
copying /u01/app/oracle/product/11.2.0/db_1/dbs/netdata05.dbf -> +DATA1/DEVDB/DATAFILE/netdata05.dbf
- ASMCMD> quit
mount库
点击(此处)折叠或打开
- [grid@rac1-213-11 ~]$ srvctl start database -d devdb -o mount
修改文件路径
点击(此处)折叠或打开
- SQL> alter database rename file '/u01/app/oracle/product/11.2.0/db_1/dbs/netdata05.dbf' to '+DATA1/DEVDB/DATAFILE/netdata05.dbf';
-
SQL>Database altered.
关闭库
点击(此处)折叠或打开
-
[grid@rac1-213-11 ~]$ srvctl stop database -d devdb
-
启动库
- [grid@rac1-213-11 ~]$ srvctl start database -d devdb
数据库已经正常
点击(此处)折叠或打开
-
[oracle@rac1-213-11 ~]$ sqlplus / as sysdba
-
SQL*Plus: Release 11.2.0.4.0 Production on Sun Jul 1 22:49:49 2018
-
Copyright (c) 1982, 2013, Oracle. All rights reserved.
-
Connected to:
-
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
-
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
-
Data Mining and Real Application Testing options
-
SQL> select open_mode from v$database;
-
OPEN_MODE
-
--------------------
- READ WRITE
节点2查看
点击(此处)折叠或打开
-
[oracle@rac2-213-12 trace]$ sqlplus / as sysdba
-
-
SQL*Plus: Release 11.2.0.4.0 Production on Sun Jul 1 22:07:21 2018
-
-
Copyright (c) 1982, 2013, Oracle. All rights reserved
-
-
Connected to:
-
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
-
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
-
Data Mining and Real Application Testing options
-
-
-
-
-
SQL> /
-
-
-
FILE_NAME
-
--------------------------------------------------------------------------------
-
+DATA1/devdb/datafile/users.269.937046643
-
+DATA1/devdb/datafile/undotbs1.276.937046643
-
+DATA1/devdb/datafile/sysaux.277.937046643
-
+DATA1/devdb/datafile/system.268.937046635
-
+DATA1/devdb/datafile/undotbs2.267.937047083
-
+DATA1/devdb/datafile/netdata.284.937049537
-
+DATA1/devdb/datafile/netdata02.dbf
-
+DATA1/devdb/datafile/netdata03.dbf
- +DATA1/devdb/datafile/netdata05.dbf
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24486203/viewspace-2157171/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24486203/viewspace-2157171/