SQL> create tablespace test datafile '/backup/prod/test.dbf' size 2m;
create tablespace test datafile '/backup/prod/test.dbf' size 2m
*
ERROR at line 1:
ORA-01119: error in creating database file '/backup/prod/test.dbf'
ORA-27086: unable to lock file - already in use
Linux Error: 37: No locks available
Additional information: 10
后来改为/u01 *(rw,no_root_squash)就没有报该错误,RAC文档里推荐的是/u01 *(rw,sync,no_wdelay,insecure,insecure_locks,no_root_squash)。
2> 如果采用RMAN备份的话,一定要在备份模式下,即'alter database begin backup',如果直接backup as copy database format '/backup/prod/%U',在执行
dbren.sql脚本时,会出现以下错误:
SQL> @dbren.sql
SQL> declare
2 begin
3 dbms_dnfs.clonedb_renamefile('/prod/backup/data_D-PROD_I-289579616_TS-SYSAUX_FNO-2_08q553gd' , '/u01/app/oracle/oradata/orcl/ora_data_orcl0.dbf');
4 dbms_dnfs.clonedb_renamefile('/prod/backup/data_D-PROD_I-289579616_TS-SYSTEM_FNO-1_07q553dp' , '/u01/app/oracle/oradata/orcl/ora_data_orcl1.dbf');
5 dbms_dnfs.clonedb_renamefile('/prod/backup/data_D-PROD_I-289579616_TS-UNDOTBS1_FNO-3_09q553hj' , '/u01/app/oracle/oradata/orcl/ora_data_orcl2.dbf');
6 dbms_dnfs.clonedb_renamefile('/prod/backup/data_D-PROD_I-289579616_TS-USERS_FNO-4_0bq553i5' , '/u01/app/oracle/oradata/orcl/ora_data_orcl3.dbf');
7 end;
8 /
PL/SQL procedure successfully completed.
SQL> show errors;
No errors.
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/ora_data_orcl1.dbf'
3> 如果数据库启用了Direct NFS,在告警日志中会有如下信息:Oracle instance running with ODM: Oracle Direct NFS ODM Library Version 3.0。
同时,可查看v$dnfs_servers视图。
SQL> select * from v$dnfs_servers;
ID SVRNAME DIRNA MNTPORT NFSPORT WTMAX RTMAX
--- -------------------- ----- ---------- ---------- ---------- ------
1 node3.being.com /u01 44046 2049 32768 32768
注意:并不是启动了Direct NFS,该视图就会填充,可通过创建测试表空间来验证create tablespace test datafile '/backup/prod/test.dbf' size 2m,如果能创建成功,该视图也会被填充的。