今天在自己的环境中创建pfile报错了。
环境是:OS:11.2.0.2 RAC,,OS:RHEL 5.6
创建pfile,报ORA-01565这个是因为不能找到spfile。
[Oracle@11rac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Sun Oct 7 22:25:05 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> create pfile=’/tmp/123.ora’ from spfile;
create pfile=’/tmp/123.ora’ from spfile
*
ERROR at line 1:
ORA-01565: error in identifying file ‘?/dbs/spfile@.ora’
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
查看spfile文件位置
SQL> !srvctl config database -d power
Database unique name: power
Database name:
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +data/power/PARAMETERFILE/spfile.257.795051357
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: power
Database instances: power1,power2
Disk Groups: DATA,ARCH
Mount point paths:
Services: server1,server2
Type: RAC
Database is administrator managed
创建pfile到/tmp空间下面,/tmp空间一般是所有用户都有w权限的
SQL> create pfile=’/tmp/123.ora’ from spfile=’+data/power/PARAMETERFILE/spfile.257.795051357′;
create pfile=’/tmp/123.ora’ from spfile=’+data/power/PARAMETERFILE/spfile.257.795051357′
*
ERROR at line 1:
ORA-07391: sftopn: fopen error, unable to open text file.
查看错误解释
SQL> !oerr ora 07391
07391, 00000, “sftopn: fopen error, unable to open text file.”
// *Cause: Fopen library routine returned an error.
// *Action: Verify existence and permissions.
晕报了ORA-07391,这个是由于权限不对,换个目录正常
SQL> create pfile=’/home/oracle/123.ora’ from spfile=’+data/power/PARAMETERFILE/spfile.257.795051357′;
File created.
SQL> !ls -ld /tmp
drwxrwxrwt 14 root root 4096 Oct 7 22:32 /tmp