Spfile & pfile
Once we install oracle 10g is it going to use the spfile.ora or the initORACLESID.ora file? This is in case you just install it what if you have it already installed and you want to know what is it using? So, I can accordingly change the initialization file parameters.
Any help any clue would be appreciated.
I was trying to add the audit trial initialization parameter to the initoracle.ora file manually and the spfileoracle.ora automatically. Because I didn't know for sure which file the oracle was using. Later, when I shutdown the database and startup it up, It told me that I’m connected to an idle instance and could not find the initoracle.ora file. Therefore, I gave it this command:
SQL> startup pfile='F: \oracle\product\10.1.0\Db_1\database\INITORACLE.ora'
It told me it cannot find it there. I'm quite sure it was there and nobody has deleted it. Later I tried the following:
SQL> startup pfile='F: \oracle\product\10.1.0\Db_1\database\SPFILEORACLE.ora'
It worked. Later, when I tried to log on again. It told me it could not find the initoracle.ora and couldn't find the spfileoracle.ora either. When I checked its location I couldn't find it. It is really mind-boggling, they were there yesterday and today they are not......
Unfortunately I have no backup for either the Spfile and pfile.I know this is bad.
Could you kindly help me with that, I need to start me database.
Any help would be appreciated.
Similar Messages
-
Verify steps is correct - about spfile & pfile
hi guys,
let say i need to modify log_archive_format to a valid value and my database cannot startup. The step i need to take is
SQL> conn sys as sysdba
Enter password:
Connected.
SQL>
SQL>
SQL> create pfile from spfile;
File created.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup pfile;
SP2-0714: invalid combination of STARTUP options
SQL> startup pfile
SP2-0714: invalid combination of STARTUP options
SQL> startup pfile='C:\oraclexe\app\oracle\product\11.2.0\server\database\initXE.ora';
ORACLE instance started.
Total System Global Area 535662592 bytes
Fixed Size 1384760 bytes
Variable Size 243273416 bytes
Database Buffers 285212672 bytes
Redo Buffers 5791744 bytes
Database mounted.
Database opened.
SQL>
SQL>
SQL> show user
USER is "SYS"
SQL>
SQL>
SQL> show parameter spfile;
NAME TYPE VALUE
spfile string
File created.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 535662592 bytes
Fixed Size 1384760 bytes
Variable Size 243273416 bytes
Database Buffers 285212672 bytes
Redo Buffers 5791744 bytes
Database mounted.
Database opened.
SQL>
SQL>
SQL> show parameter spfile;
NAME TYPE VALUE
spfile string C:\ORACLEXE\APP\ORACLE\PRODUCT
\11.2.0\SERVER\DATABASE\SPFILE
XE.ORA
SQL>the step to restart the database again after the database was startup using the pfile was to allow the database to use spfile back. Is that correct?
And not too sure why the below won't work until i specify the full path.
>
SQL> startup pfile;
SP2-0714: invalid combination of STARTUP options
SQL> startup pfile
SP2-0714: invalid combination of STARTUP options
SQL> startup pfile='C:\oraclexe\app\oracle\product\11.2.0\server\database\initXE.ora';
ORACLE instance started.Andy Klock wrote:
You have me stumped. It didn't look like you did anything at all. Typically if you get into a state when the spfile has values that don't allow you to startup the instance, you create a pfile from the spfile, which you did. Then you correct the pfile. (vi initXE.ora) which I don't see. Then you execute create spfile from pfile='&corrected_pfile', then startup the instance with the fixed spfile.
As for the pfile parameter, you have to specify the file. That's the way it's always been. If you don't specify anything (i.e. startup) it will first default to the spfile (9i and above) then to the initORACLESID.ora, otherwise it doesn't know where to look.
Good luck.oops....i accidently copied the wrong demo.. .
it should be :
SQL> conn sys as sysdba
Enter password:
Connected.
SQL>
SQL>
SQL> create pfile from spfile;
File created.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
-- MODIFY THE pFILE, THEN
SQL> startup pfile;
SP2-0714: invalid combination of STARTUP options
SQL> startup pfile
SP2-0714: invalid combination of STARTUP options
SQL> startup pfile='C:\oraclexe\app\oracle\product\11.2.0\server\database\initXE.ora';
ORACLE instance started.
Total System Global Area 535662592 bytes
Fixed Size 1384760 bytes
Variable Size 243273416 bytes
Database Buffers 285212672 bytes
Redo Buffers 5791744 bytes
Database mounted.
Database opened.
SQL>
SQL>
SQL> show user
USER is "SYS"
SQL>
SQL>
SQL> show parameter spfile;
NAME TYPE VALUE
spfile string
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 535662592 bytes
Fixed Size 1384760 bytes
Variable Size 243273416 bytes
Database Buffers 285212672 bytes
Redo Buffers 5791744 bytes
Database mounted.
Database opened.
SQL>
SQL>
SQL> show parameter spfile;
NAME TYPE VALUE
spfile string C:\ORACLEXE\APP\ORACLE\PRODUCT
\11.2.0\SERVER\DATABASE\SPFILE
XE.ORA
SQL> -
Hi Guru's
how to know database is using pfile or spfile?????????????
THanksselect decode(count(*), 1, 'spfile', 'pfile' )
from v$spparameter
where rownum=1
and isspecified='TRUE'
OR
SELECT DECODE(value, NULL, 'PFILE', 'SPFILE') "Init File Type"
FROM sys.v_$parameter WHERE name = 'spfile';
Regards
Girish Sharma -
ASM pfile lost in Oracle RAC 11gr2
Hello Gurus,
I am new to Oracle RAC 11gr2 and facing some issues. our spfile/pfile for asm instance is lost and I am not able to startup the asm instance.
Environment is as below:
RAC 2 nodes
Oracle RAC 11gr2
Enterprise Linux Server release 5.5 (Carthage)
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/db_1/dbs/init+ASM1.ora'
Is there any way to recover the spfile/pfile ?
Also getting following error while try to connect " sqlplus / as sysasm"
$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.1.0 Production on Sun Mar 27 11:26:02 2011
Copyright (c) 1982, 2009, Oracle. All rights reserved.
ERROR:
ORA-01031: insufficient privileges
Enter user-name:
Thanks and Regards,Hi,
Do we need to Set variable ORACLE_HOME properly (Grid Home) while starting RDBMS instance?
e.g ORACLE_HOME=/u01/app/11.2.0/grid*I recommend you set ORACLE_HOME properly for each Oracle Installation when you use SQLPLUS.
i.e: cat /etc/oratab
orcl:/u01/app/oracle/product/11.2.0/db_1
db10g:/u01/app/oracle/product/10.2.0/db_1
+ASM1:/u01/app/11.2.0/gridAlso you can startup/shutdown our database with SQLPLUS using ORACLE NET*, but it must be configured properly.
My recommendation <s>is always</s> use SRVCTL and CRSCTL to manage to your environment. Track all the process of initialization processes through the logs using ADRCI utility (only 11.1 or later).
When use SRVCTL or CRSCTL to manage I recomend you use (GRID HOME).
SQL> alter database open;
alter database open
ERROR at line 1:
ORA-16038: log 3 sequence# 1067 cannot be archived
ORA-19809: limit exceeded for recovery files
ORA-00312: online log 3 thread 2: '+FRA/yyy/onlinelog/group_3.259.738489481'
SQL>I give to you three options:
1° - Add more asmdisk on Diskgroup +FRA
2° - Make backup of all archivelog using RMAN and option delete input (i.e backup archivelog delete all input;)
3° - If this database is for TEST ONLY and you not need backup or recovery of then you can delete all archivelog using RMAN (i.e delete archivelog all;)
I recommend you create routine of backups of the database and archivelog to prevent this area becomes exhausted.
If you need the database in archivelog but it is only to test then create routine to delete archivelogs periodically.
If you dont need the database in archivelog, then just disable it.
Regards,
Levi Pereira -
Is there a way to recover the spfile if I remove the spfile?
Hi,
Is there a way to recover the spfile if I remove the spfile?
I did a rman full db backup.
thanks.You can user RMAN to recover your spfile, see Note 372996.1 Using RMAN to Restore and Recover a Database When the Repository and Spfile/Init.ora Files Are Also Lost, RMAN is able to startup the instance even when there is no spfile/pfile, then you can recover your spfile from your last backup.
RMAN> startup nomount;
connected to target database (not started)
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/10.2.0/db_1/dbs/initorcl.ora'
starting Oracle instance without parameter file for retrival of spfile
Oracle instance started
Total System Global Area 159383552 bytes
Fixed Size 1266344 bytes
Variable Size 54529368 bytes
Database Buffers 100663296 bytes
Redo Buffers 2924544 bytes
RMAN> set dbid=1176145568;
executing command: SET DBID
RMAN> restore spfile from autobackup recovery area '/u01/app/oracle/flash_recovery_area';
Starting restore at 05/11/2008 10:49:53
using channel ORA_DISK_1
recovery area destination: /u01/app/oracle/flash_recovery_area
database name (or database unique name) used for search: ORCL
channel ORA_DISK_1: autobackup found in the recovery area
channel ORA_DISK_1: autobackup found: /u01/app/oracle/flash_recovery_area/ORCL/autobackup/2008_11_02/o1_mf_s_669748005_4jw93oyk_.bkp
channel ORA_DISK_1: SPFILE restore from autobackup complete
Finished restore at 05/11/2008 10:49:57The non-default parameters you set in your spfile are also listed in the alert.log so you can copy these values and create a pfile, then an spfile.
Starting up ORACLE RDBMS Version: 10.2.0.4.0.
System parameters with non-default values:
processes = 150
nls_territory = AMERICA
sga_target = 205520896
control_files = /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/dbca/orcl/tempControl.ctl
db_block_size = 8192
compatible = 10.2.0.3.0
log_archive_format = %t_%s_%r.dbf
db_file_multiblock_read_count= 16
db_create_file_dest = /u02/oradata
db_recovery_file_dest = /u01/app/oracle/flash_recovery_area
db_recovery_file_dest_size= 4294967296
undo_management = AUTO
undo_tablespace = UNDOTBS1
remote_login_passwordfile= EXCLUSIVE
db_domain = oracle.com
dispatchers = (PROTOCOL=TCP) (SERVICE=orclXDB)
job_queue_processes = 10
background_dump_dest = /u01/app/oracle/admin/orcl/bdump
user_dump_dest = /u01/app/oracle/admin/orcl/udump
core_dump_dest = /u01/app/oracle/admin/orcl/cdump
audit_file_dest = /u01/app/oracle/admin/orcl/adump
db_name = seeddata
db_unique_name = orcl
open_cursors = 300
pga_aggregate_target = 67108864
PMON started with pid=2, OS id=12906HTH
Enrique
PS. If your problem was solved, consider marking the question as answered -
Hi
I want to take back up of password file and spfile/pfile how?
I am working in oracle 10g under solaris environment
thanks
rajBoth the parameter (either pfile or spfile) and the password file should not be a big deal when backing them up, just copy them to a backup location.
If you are using recovery manager make sure the controflile backup parameter is configured so you can ensure the spfile can be backed up by rman. If you are currently using pfile, you must manually backup this.
In case you loose the password file, this can easily be rebuilt by means of the orapwd utlity. And in case you loose the pfile this can be rebuilt after the information of the non-default instance parameters, listed at your alertSID.log file.
Another way to backup the spfile is by means of the sql command:
CREATE PFILE [pfileSpec] FROM SPFILE [spfileSpec];
This will create a text parameter file you can save anywhere you are allowed to.
~ Madrid -
We recently upgraded one of our RAC clusters from 10g Rac to 11G RAC GI . We are not using ASM curretnly ( we use Veritas Cluster File system), but after upgrading to 11g RAC GI, ASM instances are created on both nodes eventhough we use Veritas Cluster File System. I am trying to locate SPFILE/PFILE for ASM instances, but couldn't locate in $CRS_HOME/dbs. My question is, where exactly SPFILE/PFILE resides for ASM isntances.
oracle@host01# crsctl stat res ora.asm -p
NAME=ora.asm
TYPE=ora.asm.type
ACL=owner:oracle:rwx,pgrp:dba:rwx,other::r--
ACTION_FAILURE_TEMPLATE=
ACTION_SCRIPT=
AGENT_FILENAME=%CRS_HOME%/bin/oraagent%CRS_EXE_SUFFIX%
ALIAS_NAME=ora.%CRS_CSS_NODENAME%.ASM%CRS_CSS_NODENUMBER_PLUS1%.asm
AUTO_START=never
CHECK_INTERVAL=60
CHECK_TIMEOUT=30
DEFAULT_TEMPLATE=PROPERTY(RESOURCE_CLASS=asm) ELEMENT(INSTANCE_NAME= %GEN_USR_ORA_INST_NAME%)
DEGREE=1
DESCRIPTION=Oracle ASM resource
ENABLED=1
GEN_USR_ORA_INST_NAME=
GEN_USR_ORA_INST_NAME@SERVERNAME(host01)=+ASM1
GEN_USR_ORA_INST_NAME@SERVERNAME(host02)=+ASM2
LOAD=1
LOGGING_LEVEL=1
NLS_LANG=
NOT_RESTARTING_TEMPLATE=
OFFLINE_CHECK_INTERVAL=0
PROFILE_CHANGE_TEMPLATE=
RESTART_ATTEMPTS=5
SCRIPT_TIMEOUT=60
START_DEPENDENCIES=weak(ora.LISTENER.lsnr)
START_TIMEOUT=900
STATE_CHANGE_TEMPLATE=
STOP_DEPENDENCIES=
STOP_TIMEOUT=600
TYPE_VERSION=1.2
UPTIME_THRESHOLD=1d
USR_ORA_ENV=
USR_ORA_INST_NAME=+ASM%CRS_CSS_NODENUMBER_PLUS1%
USR_ORA_OPEN_MODE=mount
USR_ORA_OPI=false
USR_ORA_STOP_MODE=immediate
VERSION=11.2.0.2.0
oracle@host01# -
ALTER SYSTEM SET SGA_TARGET = 0 scope=spfile; not working
SQL> ALTER SYSTEM SET SGA_TARGET = 0 scope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area 2121256960 bytes
Fixed Size 2243280 bytes
Variable Size 1140852016 bytes
Database Buffers 973078528 bytes
Redo Buffers 5083136 bytes
Database mounted.
Database opened.
SQL> show parameters sga
NAME TYPE VALUE
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 2032M
sga_target big integer 0
SQL> create pfile=#/home/oracle/per03pfile' from spfile;
pfile has
*.sga_max_size=0
*.sga_target=0
and
instance1.__sga_target=2130706432
instance2.__sga_target=2130706432
tried ALTER SYSTEM SET SGA_TARGET = 0 scope=spfile sid='*'; aswell ...
oracle v11.2.0.2
GI 11.2.0.2
linux 64 bitChinar wrote:
user9198889 wrote:
SQL> ALTER SYSTEM SET SGA_TARGET = 0 scope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area 2121256960 bytes
Fixed Size 2243280 bytes
Variable Size 1140852016 bytes
Database Buffers 973078528 bytes
Redo Buffers 5083136 bytes
Database mounted.
Database opened.
SQL> show parameters sga
NAME TYPE VALUE
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 2032M
sga_target big integer 0
SQL> create pfile=#/home/oracle/per03pfile' from spfile;
pfile has
*.sga_max_size=0
*.sga_target=0
and
instance1.__sga_target=2130706432
instance2.__sga_target=2130706432
tried ALTER SYSTEM SET SGA_TARGET = 0 scope=spfile sid='*'; aswell ...
oracle v11.2.0.2
GI 11.2.0.2
linux 64 bitWhile SGA_MA_SIZE <> 0 then it seems SHARED MEMORY constructed according this setting.So it is not recommended to avoid automatic shared memory management.But if you decide this then you have to identify SHARED_PLOOL_SIZE,DB_CACHE_SIZE(in additionally LOG_BUFFER and LARGE_POOL) parameter manually and
ALTER SYSTEM SET SGA_TARGET=o scope=spfile and ALTER SYSTEM SET SGA_MAX_SIZE=o scope=spfile and restart database again.SQL> alter system set sga_max_size=0 scope=spfile sid='instance1';
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
SQL> show parameters sga
NAME TYPE VALUE
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 2032M
sga_target big integer 0
SQL>
has it got todo with AMM being enabbled? -
Is SPFILE a replacement or an extension of init.ora ?
As far as I know there are two parameter files:
SPFILE and INIT.ORA
Is the first a replacement or an extenison of the second?
What are the differences of both?
Are both required?
PeterSpfile (server parameter file) is a dynamic file. It can be changed while the database is up and running whereas Pfile (or simply Parameter file) is a static file and it order to make changes into it. You would have to close your databasde, make the changes in that file and then bring up the database again to bring those the change or changes into effect.
So by using the spfile you can make the changes easily (change the parameters easily). You dont have to close your database everytime.
Simple isnt it ? :)
Please read
http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/start.htm#sthref512
Peter I would advice you to first search before asking such basic questions. They have been asked many times before
http://forums.oracle.com/forums/search.jspa?threadID=&q=SPFILE+pfile+&objID=c84&dateRange=all&userID=&numResults=15
This has also been mentioned in the Forums Etiquette in case you missed it :)
Edited by: Amy De Caj on Jul 19, 2009 6:19 AM
Edited by: Amy De Caj on Jul 19, 2009 6:25 AM -
Why is Pfile not in RMAN - backup
RMAN backups spfile together with controlfile. Why doesn't it support backing up pfile? Is is possible to configure it as to backup pfile too?
Thx.
Aliq.
Message was edited by:
user547746pfiles are obsolete, and you should stop using them.Incorrect ,obsolete means not usable but one can use it and one using it,you can say its not recommended,on the basis of human readable pfile you created spfile .
Before spfile , pfile commented parameter mess the DBA when and what for used this parameter ,though DBA used comments by providing date and if it happens to change 20 times then he has to make comments 20 times ,with the invent of spfile you can save yours own pfile with dated version within filename i.e (initORCL15042008.ora) and then create the spfile from this pfile ,now you can maitnin yours pfile history easily as before.You can track when and what was changed.You can revert back to yours current instance as old one by creating spfile from oldpfile.
To OP
spfile is for single source of server parameters which is fact, thats why RMAN take spfile backup rather pfile.
You can also change some dynamic parameter during instance working ,you can change it in the spfile as well within instance memory.
Khurram -
Hi guyes..
I have 2-node rac system on windows 2003 ..my spfile location is on both nodes...
SQL> show parameter spfile
NAME TYPE VALUE
spfile string +DATA/jicracdb/spfilejicracdb.ora
But I create pfile from spfile..
sql>create pfile from spfile;
....its created..but before in initjicracdb1.ora file I have like this...
SPFILE='+DATA/jicracdb/spfilejicracdb.ora'
But when I create It replaced all contents like...
jicracdb2.__shared_pool_size=7969177600
jicracdb1.__streams_pool_size=33554432
jicracdb2.__streams_pool_size=33554432
*._optim_peek_user_binds=FALSE
*.audit_file_dest='C:\oracle\product\10.2.0/admin/jicracdb/adump'
*.background_dump_dest='C:\oracle\product\10.2.0/admin/jicracdb/bdump'
*.cluster_database_instances=2
*.cluster_database=true
*.compatible='10.2.0.3.0'
.....Like these...
So my dubt is ..is it give problem...when I restart the RAC database ...JIC wrote:
Hi guyes..
I have 2-node rac system on windows 2003 ..my spfile location is on both nodes...
SQL> show parameter spfile
NAME TYPE VALUE
spfile string +DATA/jicracdb/spfilejicracdb.ora
But I create pfile from spfile..
sql>create pfile from spfile;
....its created..but before in initjicracdb1.ora file I have like this...
SPFILE='+DATA/jicracdb/spfilejicracdb.ora'
But when I create It replaced all contents like...
jicracdb2.__shared_pool_size=7969177600
jicracdb1.__streams_pool_size=33554432
jicracdb2.__streams_pool_size=33554432
*._optim_peek_user_binds=FALSE
*.audit_file_dest='C:\oracle\product\10.2.0/admin/jicracdb/adump'
*.background_dump_dest='C:\oracle\product\10.2.0/admin/jicracdb/bdump'
*.cluster_database_instances=2
*.cluster_database=true
*.compatible='10.2.0.3.0'
.....Like these...
So my dubt is ..is it give problem...when I restart the RAC database ...Yes .. You must resolve this problem by editing the pfile initjicracdb1.ora with only the following entry "SPFILE='+DATA/jicracdb/spfilejicracdb.ora'" (spfile must be in shared storage) and create or copy this pfile to another location.
http://download.oracle.com/docs/cd/E11882_01/install.112/e17214/params.htm#RILIN702
When you create a pfile from spfile or spfile from pfile and not specified SPFILE name Oracle will use default location (on Windows %ORACLE_HOME%/database)
So if you do not want to create spfile/pfile in its default location the name should be specified.
Like this..
CREATE SPFILE='/u01/oracle/dbs/test_spfile.ora'
FROM PFILE='/u01/oracle/dbs/test_init.ora';http://download.oracle.com/docs/cd/E11882_01/server.112/e17120/create006.htm#i1010013
When you start the database instance (through the sqlplus or dstart), it attempts to read the initialization parameters from an SPFILE in a platform-specific default location. If it finds no SPFILE, it searches for a text initialization parameter file.
In the platform-specific default location, Oracle Database locates your initialization parameter file by examining file names in the following order:
1.spfileORACLE_SID.ora
2.spfile.ora
3.initORACLE_SID.ora
http://download.oracle.com/docs/cd/E11882_01/server.112/e17120/start001.htm#ADMIN12826
In RAC envoriment
If your environment is configured properly Oracle Clusterware already have information about path of SPFILE (i.e'+DATA/jicracdb/spfilejicracdb.ora') then he don't use default location to start database.
Regards,
Levi Pereira -
Hi All
I am new to RAC and am finding my feet in this new waters.. I have actually set up one 10.2.0.3 RAC instance with ASM.. it was great... but in the process, all the datafiles were created in one asm diskgroup dg1 as i specified.. but the dbca never asked me about spfile..... I thought it would place in the shared OCFS
%ORACLE_HOME%\dbs. But instead one sp file is created in the second disk group I had another disk group created.. dg2 .. show parameter pfile shows me the location as +dg2/orcl1/spfileorcl.ora
I started the db on one node with startup no mount pfile=<pfile i created from above spfile> .. and then later created spfile from this pfile.. shut down.. next time when I start the database with srvctl start database -d orcl.. its picking the spfile from the diskgroup... how can I guide the srvctl to start picking the spfile from the oracle_home/dbs ?
thanks
Chandra.Hi Simar
The procedure you've explained is helpful.. but I am having the reverse jot...
I have an spfile and the oracle_home is shared!! I have two asm disk groups.. dg1 and dg2. on dg1 all my data files control files online log files are placed..
dg 2 is the location for the backup and mysteriously... the dbca has placed the spfile on this disk group as well. Now I need to destroy this dg2 so that I can create 2 more dg's ... but I am worried because this dg also has the sp file..
now if I create another spfile/pfile in oracle_home/dbs, how do I tell to srvctl to pick this file under oracle_home/dbs instead of the spfile which is created in the dg2? if srvctl is not the helpful, the how can start up my rac databases.. using the spfile/pfile which I have created under oracle_home/dbs?
In stand alone, the oracle will always look for pfile/spfile under oracle_home/dbs.. and we use sqlplus .... but in RAC we start up databases with srvctl command line and there is no option for specifying spfile/pfile to srvctl..
could you please help me fix this?
Regards!
sarat. -
DataGuard Standby 環境で db が open できない.
DataGuard Standby 環境で db が open できなくて困っています。
詳しい方いれば、原因と対処方法を教えていただきたいと思います。
create した spfile が正確に読み込まれていないことが原因のようなのですが。。
なぜ読み込めないのかが分からない状態です。
pfile を読み込んだ起動は可能ですが、spfile を読み込んだ起動の前提条件とは、
何なのでしょうか。単に整合性が取れていないだけなのか、それとも、、。
[grid@osaka1 shell]$ asmcmd
ASMCMD> ls
DATA/
FRA/
ASMCMD> cd data
ASMCMD> ls
ASM/
WEST/
ASMCMD> ls -l
Type Redund Striped Time Sys Name
Y ASM/
N WEST/
ASMCMD>
ASMCMD> cd west
ASMCMD> ls
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
spfilewest.ora
ASMCMD> ls -l
Type Redund Striped Time Sys Name
N CONTROLFILE/
N DATAFILE/
N ONLINELOG/
N PARAMETERFILE/
N TEMPFILE/
N spfilewest.ora => +DATA/WEST/PARAMETERFILE/spfile.257.824236121
ASMCMD> pwd
+data/west
ASMCMD>
ASMCMD> cd para*
ASMCMD> ls -l
Type Redund Striped Time Sys Name
PARAMETERFILE MIRROR COARSE AUG 23 18:00:00 Y spfile.257.824236121
ASMCMD>
ASMCMD> pwd
+data/west/PARAMETERFILE
ASMCMD> quit
[grid@osaka1 shell]$
[oracle@osaka1 dbs]$ more initHPYMUSIC.ora
SPFILE='+DATA/west/spfilewest.ora'
[oracle@osaka1 dbs]$
よろしくお願い致します。
ps.
ORA-12154 は整合性の問題であるので、それを合わせれば消えると思っています。
そもそも RAC を前提としていたのですが、それを standalone に置き換えて検証始めた結果、
こうなってしまっています。
open できない原因が ORA-12154 だったりして。。
■ プライマリの場合
○ open するほうは、シンプルに以下だけで open することが確認できる。
が、db_name を変更した関係で
「ORA-12154: TNS: 指定された接続識別子を解決できませんでした」
が出続けている。
ORA-12154 は db が open できない原因とは無関係かもしれない。
srvctl stop database -d east -f
srvctl start database -d east -o open
srvctl config database -d east
srvctl status database -d east
○ 参考出力
set linesize 500 pages 0
col value for a90
col name for a50
select name, value
from v$parameter
where name in ('db_name','db_unique_name','log_archive_config', 'log_archive_dest_1','log_archive_dest_2',
'log_archive_dest_state_1','log_archive_dest_state_2', 'remote_login_passwordfile',
'log_archive_format','log_archive_max_processes','fal_server','db_file_name_convert',
'log_file_name_convert', 'standby_file_management');
SQL>
db_file_name_convert
log_file_name_convert
log_archive_dest_1
log_archive_dest_2 SERVICE=HPYMUSIC SYNC NOAFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=west
log_archive_dest_state_1 enable
log_archive_dest_state_2 enable
fal_server
log_archive_config
log_archive_format %t_%s_%r.dbf
log_archive_max_processes 4
standby_file_management AUTO
remote_login_passwordfile EXCLUSIVE
db_name HPYMUSIC
db_unique_name HPYMUSIC ← ▼ db_name だけを変更したつもりが db_unique_name も変更されていた
14行が選択されました。
[oracle@tokyo1 shell]$ srvctl stop database -d east -f
[oracle@tokyo1 shell]$ /u01/app/11.2.0/grid/bin/crsctl status resource -t
NAME TARGET STATE SERVER STATE_DETAILS
Cluster Resources
ora.east.db
1 OFFLINE OFFLINE Instance Shutdown
[oracle@tokyo1 shell]$ srvctl start database -d east -o open
[oracle@tokyo1 shell]$ /u01/app/11.2.0/grid/bin/crsctl status resource -t
NAME TARGET STATE SERVER STATE_DETAILS
Local Resources
ora.DATA.dg
ONLINE ONLINE tokyo1
ora.FRA.dg
ONLINE ONLINE tokyo1
ora.LISTENER.lsnr
ONLINE ONLINE tokyo1
ora.asm
ONLINE ONLINE tokyo1 Started
Cluster Resources
ora.cssd
1 ONLINE ONLINE tokyo1
ora.diskmon
1 ONLINE ONLINE tokyo1
ora.east.db
1 ONLINE ONLINE tokyo1 Open ← ▼
[oracle@tokyo1 shell]$
[oracle@tokyo1 shell]$ srvctl config database -d east
一意のデータベース名: east
データベース名: east
Oracleホーム: /u01/app/oracle/product/11.2.0/dbhome_1
Oracleユーザー: grid
spfile: +DATA/east/spfileeast.ora
ドメイン:
開始オプション: open
停止オプション: immediate
データベース・ロール: PRIMARY
管理ポリシー: AUTOMATIC
ディスク・グループ: DATA,FRA
サービス:
[oracle@tokyo1 shell]$ srvctl status database -d east
データベースは実行中です。
Fri Aug 23 19:44:10 2013
Error 12154 received logging on to the standby
Errors in file /u01/app/oracle/diag/rdbms/hpymusic/HPYMUSIC/trace/HPYMUSIC_arc2_7579.trc:
ORA-12154: TNS: 指定された接続識別子を解決できませんでした
PING[ARC2]: Heartbeat failed to connect to standby 'HPYMUSIC'. Error is 12154.
[oracle@tokyo1 dbs]$ pwd
/u01/app/oracle/product/11.2.0/dbhome_1/dbs
[oracle@tokyo1 dbs]$
[oracle@tokyo1 dbs]$
[oracle@tokyo1 dbs]$ more 2013.08.23_east_pfile.txt
HPYMUSIC.__db_cache_size=301989888
HPYMUSIC.__java_pool_size=4194304
HPYMUSIC.__large_pool_size=8388608
HPYMUSIC.__pga_aggregate_target=339738624
HPYMUSIC.__sga_target=503316480
HPYMUSIC.__shared_io_pool_size=0
HPYMUSIC.__shared_pool_size=176160768
HPYMUSIC.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/east/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='+DATA/east/controlfile/current.270.823277705','+FRA/east/controlfile/current.
260.823277707'
*.db_block_checking='TRUE'
*.db_block_checksum='TRUE'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_domain=''
*.db_name='HPYMUSIC'
*.db_recovery_file_dest='+FRA'
*.db_recovery_file_dest_size=3038773248
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=HPYMUSICXDB)'
*.log_archive_format='%t_%s_%r.dbf'
*.memory_target=842006528
*.nls_language='JAPANESE'
*.nls_territory='JAPAN'
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.standby_file_management='AUTO'
*.undo_tablespace='UNDOTBS1'
Fri Aug 23 19:49:38 2013
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 3
Using LOG_ARCHIVE_DEST_1 parameter default value as USE_DB_RECOVERY_FILE_DEST
ARCH: Warning; less destinations available than specified
by LOG_ARCHIVE_MIN_SUCCEED_DEST init.ora parameter
Autotune of undo retention is turned on.
IMODE=BR
ILAT =27
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options.
Using parameter settings in server-side spfile /u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileHPYMUSIC.ora
System parameters with non-default values:
processes = 150
nls_language = "JAPANESE"
nls_territory = "JAPAN"
memory_target = 804M
control_files = "+DATA/east/controlfile/current.270.823277705"
control_files = "+FRA/east/controlfile/current.260.823277707"
db_block_checksum = "TRUE"
db_block_size = 8192
compatible = "11.2.0.0.0"
log_archive_dest_2 = "SERVICE=HPYMUSIC SYNC NOAFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=west"
log_archive_format = "%t_%s_%r.dbf"
db_create_file_dest = "+DATA"
db_recovery_file_dest = "+FRA"
db_recovery_file_dest_size= 2898M
standby_file_management = "AUTO"
undo_tablespace = "UNDOTBS1"
db_block_checking = "TRUE"
remote_login_passwordfile= "EXCLUSIVE"
db_domain = ""
dispatchers = "(PROTOCOL=TCP) (SERVICE=HPYMUSICXDB)"
audit_file_dest = "/u01/app/oracle/admin/east/adump"
audit_trail = "DB"
db_name = "HPYMUSIC"
open_cursors = 300
diagnostic_dest = "/u01/app/oracle"
Fri Aug 23 19:49:39 2013
PMON started with pid=2, OS id=8442
Fri Aug 23 19:49:39 2013
VKTM started with pid=3, OS id=8444 at elevated priority
VKTM running at (10)millisec precision with DBRM quantum (100)ms
Fri Aug 23 19:49:39 2013
GEN0 started with pid=4, OS id=8448
Fri Aug 23 19:49:39 2013
DIAG started with pid=5, OS id=8450
Fri Aug 23 19:49:39 2013
DBRM started with pid=6, OS id=8452
Fri Aug 23 19:49:39 2013
PSP0 started with pid=7, OS id=8454
Fri Aug 23 19:49:39 2013
DIA0 started with pid=8, OS id=8456
Fri Aug 23 19:49:39 2013
MMAN started with pid=9, OS id=8458
Fri Aug 23 19:49:39 2013
DBW0 started with pid=10, OS id=8460
Fri Aug 23 19:49:39 2013
LGWR started with pid=11, OS id=8462
Fri Aug 23 19:49:39 2013
CKPT started with pid=12, OS id=8464
Fri Aug 23 19:49:39 2013
SMON started with pid=13, OS id=8466
Fri Aug 23 19:49:39 2013
RECO started with pid=14, OS id=8468
Fri Aug 23 19:49:39 2013
RBAL started with pid=15, OS id=8470
Fri Aug 23 19:49:39 2013
ASMB started with pid=16, OS id=8472
Fri Aug 23 19:49:39 2013
MMON started with pid=17, OS id=8474
Fri Aug 23 19:49:39 2013
MMNL started with pid=18, OS id=8478
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
NOTE: initiating MARK startup
starting up 1 shared server(s) ...
Starting background process MARK
Fri Aug 23 19:49:39 2013
MARK started with pid=20, OS id=8482
NOTE: MARK has subscribed
ORACLE_BASE not set in environment. It is recommended
that ORACLE_BASE be set in the environment
Reusing ORACLE_BASE from an earlier startup = /u01/app/oracle
Fri Aug 23 19:49:39 2013
ALTER DATABASE MOUNT
NOTE: Loaded library: System
SUCCESS: diskgroup DATA was mounted
ERROR: failed to establish dependency between database HPYMUSIC and diskgroup resource ora.DATA.dg
SUCCESS: diskgroup FRA was mounted
ERROR: failed to establish dependency between database HPYMUSIC and diskgroup resource ora.FRA.dg
Fri Aug 23 19:49:46 2013
NSS2 started with pid=24, OS id=8572
Successful mount of redo thread 1, with mount id 2951868947
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: ALTER DATABASE MOUNT
ALTER DATABASE OPEN
LGWR: STARTING ARCH PROCESSES
Fri Aug 23 19:49:47 2013
ARC0 started with pid=26, OS id=8574
ARC0: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC0: STARTING ARCH PROCESSES
Fri Aug 23 19:49:48 2013
ARC1 started with pid=27, OS id=8576
Fri Aug 23 19:49:48 2013
ARC2 started with pid=28, OS id=8578
ARC1: Archival started
ARC2: Archival started
ARC1: Becoming the 'no FAL' ARCH
ARC1: Becoming the 'no SRL' ARCH
ARC2: Becoming the heartbeat ARCH
Fri Aug 23 19:49:48 2013
ARC3 started with pid=29, OS id=8580
LGWR: Setting 'active' archival for destination LOG_ARCHIVE_DEST_2
ARC3: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
Error 12154 received logging on to the standby
Fri Aug 23 19:49:51 2013
Errors in file /u01/app/oracle/diag/rdbms/hpymusic/HPYMUSIC/trace/HPYMUSIC_lgwr_8462.trc:
ORA-12154: TNS: ?????????????????????
Error 12154 for archive log file 2 to 'HPYMUSIC'
LGWR: Failed to archive log 2 thread 1 sequence 8 (12154)
Thread 1 advanced to log sequence 8 (thread open)
Thread 1 opened at log sequence 8
Current log# 2 seq# 8 mem# 0: +DATA/hpymusic/onlinelog/group_2.272.824213887
Current log# 2 seq# 8 mem# 1: +FRA/hpymusic/onlinelog/group_2.262.824213889
Successful open of redo thread 1
Fri Aug 23 19:49:51 2013
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Fri Aug 23 19:49:51 2013
SMON: enabling cache recovery
Error 12154 received logging on to the standby
Errors in file /u01/app/oracle/diag/rdbms/hpymusic/HPYMUSIC/trace/HPYMUSIC_arc2_8578.trc:
ORA-12154: TNS: 指定された接続識別子を解決できませんでした
PING[ARC2]: Heartbeat failed to connect to standby 'HPYMUSIC'. Error is 12154.
Archived Log entry 7 added for thread 1 sequence 7 ID 0xaff1210d dest 1:
Error 12154 received logging on to the standby
Errors in file /u01/app/oracle/diag/rdbms/hpymusic/HPYMUSIC/trace/HPYMUSIC_arc3_8580.trc:
ORA-12154: TNS: 指定された接続識別子を解決できませんでした
FAL[server, ARC3]: Error 12154 creating remote archivelog file 'HPYMUSIC'
FAL[server, ARC3]: FAL archive failed, see trace file.
Errors in file /u01/app/oracle/diag/rdbms/hpymusic/HPYMUSIC/trace/HPYMUSIC_arc3_8580.trc:
ORA-16055: FALリクエストが拒否されました。
ARCH: FAL archive failed. Archiver continuing
ORACLE Instance HPYMUSIC - Archival Error. Archiver continuing.
Successfully onlined Undo Tablespace 2.
Verifying file header compatibility for 11g tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
Database Characterset is AL32UTF8
No Resource Manager plan active
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
Fri Aug 23 19:49:55 2013
QMNC started with pid=32, OS id=8590
Completed: ALTER DATABASE OPEN
Fri Aug 23 19:49:59 2013
Starting background process CJQ0
Fri Aug 23 19:49:59 2013
CJQ0 started with pid=33, OS id=8609
Fri Aug 23 19:49:59 2013
db_recovery_file_dest_size of 2898 MB is 6.38% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
[root@tokyo1 app]#
[root@tokyo1 app]# more /u01/app/oracle/diag/rdbms/hpymusic/HPYMUSIC/trace/HPYMUSIC_arc2_8578.trc
Trace file /u01/app/oracle/diag/rdbms/hpymusic/HPYMUSIC/trace/HPYMUSIC_arc2_8578.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1
System name: Linux
Node name: tokyo1.oracle11g.jp
Release: 2.6.18-348.12.1.el5
Version: #1 SMP Wed Jul 10 05:28:41 EDT 2013
Machine: x86_64
Instance name: HPYMUSIC
Redo thread mounted by this instance: 1
Oracle process number: 28
Unix process pid: 8578, image: [email protected] (ARC2)
*** 2013-08-23 19:49:51.707
*** SESSION ID:(15.1) 2013-08-23 19:49:51.707
*** CLIENT ID:() 2013-08-23 19:49:51.707
*** SERVICE NAME:() 2013-08-23 19:49:51.707
*** MODULE NAME:() 2013-08-23 19:49:51.707
*** ACTION NAME:() 2013-08-23 19:49:51.707
Redo shipping client performing standby login
OCIServerAttach failed -1
.. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS: 指定された接続識別子を解決できませんでした
OCIServerAttach failed -1
.. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS: 指定された接続識別子を解決できませんでした
OCIServerAttach failed -1
.. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS: 指定された接続識別子を解決できませんでした
*** 2013-08-23 19:49:51.972 4132 krsh.c
Error 12154 received logging on to the standby
*** 2013-08-23 19:49:51.972 869 krsu.c
Error 12154 connecting to destination LOG_ARCHIVE_DEST_2 standby host 'HPYMUSIC'
Error 12154 attaching to destination LOG_ARCHIVE_DEST_2 standby host 'HPYMUSIC'
ORA-12154: TNS: 指定された接続識別子を解決できませんでした
*** 2013-08-23 19:49:51.973 4132 krsh.c
PING[ARC2]: Heartbeat failed to connect to standby 'HPYMUSIC'. Error is 12154.
*** 2013-08-23 19:49:51.973 2747 krsi.c
krsi_dst_fail: dest:2 err:12154 force:0 blast:1
*** 2013-08-23 19:50:49.816
Redo shipping client performing standby login
OCIServerAttach failed -1
.. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS: 指定された接続識別子を解決できませんでした
OCIServerAttach failed -1
.. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS: 指定された接続識別子を解決できませんでした
OCIServerAttach failed -1
.. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS: 指定された接続識別子を解決できませんでした
*** 2013-08-23 19:50:50.070 4132 krsh.c
Error 12154 received logging on to the standby
*** 2013-08-23 19:50:50.070 869 krsu.c
Error 12154 connecting to destination LOG_ARCHIVE_DEST_2 standby host 'HPYMUSIC'
Error 12154 attaching to destination LOG_ARCHIVE_DEST_2 standby host 'HPYMUSIC'
ORA-12154: TNS: 指定された接続識別子を解決できませんでした
*** 2013-08-23 19:50:50.070 4132 krsh.c
PING[ARC2]: Heartbeat failed to connect to standby 'HPYMUSIC'. Error is 12154.
*** 2013-08-23 19:50:50.070 2747 krsi.c
krsi_dst_fail: dest:2 err:12154 force:0 blast:1
*** 2013-08-23 19:51:51.147
Redo shipping client performing standby login
OCIServerAttach failed -1
.. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS: 指定された接続識別子を解決できませんでした
OCIServerAttach failed -1
.. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS: 指定された接続識別子を解決できませんでした
OCIServerAttach failed -1
.. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS: 指定された接続識別子を解決できませんでした
*** 2013-08-23 19:51:51.403 4132 krsh.c
Error 12154 received logging on to the standby
*** 2013-08-23 19:51:51.403 869 krsu.c
Error 12154 connecting to destination LOG_ARCHIVE_DEST_2 standby host 'HPYMUSIC'
Error 12154 attaching to destination LOG_ARCHIVE_DEST_2 standby host 'HPYMUSIC'
ORA-12154: TNS: 指定された接続識別子を解決できませんでした
*** 2013-08-23 19:51:51.403 4132 krsh.c
PING[ARC2]: Heartbeat failed to connect to standby 'HPYMUSIC'. Error is 12154.
*** 2013-08-23 19:51:51.403 2747 krsi.c
krsi_dst_fail: dest:2 err:12154 force:0 blast:1
[root@tokyo1 app]#
[grid@tokyo1 shell]$ ./grid_info_east-x.sh
+ export ORACLE_SID=+ASM
+ ORACLE_SID=+ASM
+ LOGDIR=/home/grid/log
+ PRIMARYDB=east_DGMGRL
+ STANDBYDB=
+ PASSWORD=dataguard
+ mkdir -p /home/grid/log
++ date +%y%m%d,%H%M%S
+ echo 'asm info,130823,195709'
+ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.1.0 Production on 金 8月 23 19:57:09 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Automatic Storage Management option
に接続されました。
SQL> SQL>
SYSDATE
13-08-23
SQL> SQL> SQL>
NAME TYPE VALUE
asm_diskgroups string FRA
asm_diskstring string /dev/sd*1
asm_power_limit integer 1
asm_preferred_read_failure_groups string
audit_file_dest string /u01/app/11.2.0/grid/rdbms/audit
audit_sys_operations boolean FALSE
audit_syslog_level string
background_core_dump string partial
background_dump_dest string /u01/app/grid/diag/asm/+asm/+ASM/trace
cluster_database boolean FALSE
cluster_database_instances integer 1
cluster_interconnects string
core_dump_dest string /u01/app/grid/diag/asm/+asm/+ASM/cdump
db_cache_size big integer 0
db_ultra_safe string OFF
db_unique_name string +ASM
diagnostic_dest string /u01/app/grid
event string
file_mapping boolean FALSE
filesystemio_options string none
ifile file
instance_name string +ASM
instance_number integer 1
instance_type string asm
large_pool_size big integer 12M
ldap_directory_sysauth string no
listener_networks string
local_listener string
lock_name_space string
lock_sga boolean FALSE
max_dump_file_size string unlimited
memory_max_target big integer 272M
memory_target big integer 272M
nls_calendar string
nls_comp string BINARY
nls_currency string
nls_date_format string
nls_date_language string
nls_dual_currency string
nls_iso_currency string
nls_language string AMERICAN
nls_length_semantics string BYTE
nls_nchar_conv_excp string FALSE
nls_numeric_characters string
nls_sort string
nls_territory string AMERICA
nls_time_format string
nls_time_tz_format string
nls_timestamp_format string
nls_timestamp_tz_format string
os_authent_prefix string ops$
os_roles boolean FALSE
pga_aggregate_target big integer 0
processes integer 100
remote_listener string
remote_login_passwordfile string EXCLUSIVE
remote_os_authent boolean FALSE
remote_os_roles boolean FALSE
service_names string +ASM
sessions integer 172
sga_max_size big integer 272M
sga_target big integer 0
shadow_core_dump string partial
shared_pool_reserved_size big integer 6081740
shared_pool_size big integer 0
sort_area_size integer 65536
spfile string +DATA/asm/asmparameterfile/registry.253.823204697
sql_trace boolean FALSE
statistics_level string TYPICAL
timed_os_statistics integer 0
timed_statistics boolean TRUE
trace_enabled boolean TRUE
user_dump_dest string /u01/app/grid/diag/asm/+asm/+ASM/trace
workarea_size_policy string AUTO
++ date +%y%m%d,%H%M%S
+ echo 'asmcmd info,130823,195709'
+ asmcmd ls -l
State Type Rebal Name
MOUNTED NORMAL N DATA/
MOUNTED NORMAL N FRA/
+ asmcmd ls -l 'data/asm/*'
Type Redund Striped Time Sys Name
ASMPARAMETERFILE MIRROR COARSE AUG 11 19:00:00 Y REGISTRY.253.823204697
+ asmcmd ls -l 'data/east/*'
Type Redund Striped Time Sys Name
+data/east/CONTROLFILE/:
CONTROLFILE HIGH FINE AUG 12 15:00:00 Y Current.260.823276231
CONTROLFILE HIGH FINE AUG 23 19:00:00 Y Current.270.823277705
+data/east/DATAFILE/:
DATAFILE MIRROR COARSE AUG 12 15:00:00 Y SYSAUX.257.823276133
DATAFILE MIRROR COARSE AUG 23 19:00:00 Y SYSAUX.267.823277615
DATAFILE MIRROR COARSE AUG 12 15:00:00 Y SYSTEM.256.823276131
DATAFILE MIRROR COARSE AUG 23 19:00:00 Y SYSTEM.266.823277615
DATAFILE MIRROR COARSE AUG 12 15:00:00 Y UNDOTBS1.258.823276133
DATAFILE MIRROR COARSE AUG 23 19:00:00 Y UNDOTBS1.268.823277615
DATAFILE MIRROR COARSE AUG 12 15:00:00 Y USERS.259.823276133
DATAFILE MIRROR COARSE AUG 23 19:00:00 Y USERS.269.823277615
+data/east/ONLINELOG/:
ONLINELOG MIRROR COARSE AUG 12 15:00:00 Y group_1.261.823276235
ONLINELOG MIRROR COARSE AUG 12 15:00:00 Y group_2.262.823276241
ONLINELOG MIRROR COARSE AUG 12 15:00:00 Y group_3.263.823276247
+data/east/PARAMETERFILE/:
PARAMETERFILE MIRROR COARSE AUG 23 12:00:00 Y spfile.265.823277967
+data/east/TEMPFILE/:
TEMPFILE MIRROR COARSE AUG 12 15:00:00 Y TEMP.264.823276263
TEMPFILE MIRROR COARSE AUG 23 19:00:00 Y TEMP.274.823277733
N spfileeast.ora => +DATA/EAST/PARAMETERFILE/spfile.265.823277967
+ asmcmd ls -l 'fra/east/*'
Type Redund Striped Time Sys Name
+fra/east/ARCHIVELOG/:
Y 2013_08_12/
Y 2013_08_15/
Y 2013_08_19/
Y 2013_08_22/
Y 2013_08_23/
+fra/east/CONTROLFILE/:
CONTROLFILE HIGH FINE AUG 12 15:00:00 Y Current.256.823276231
CONTROLFILE HIGH FINE AUG 23 19:00:00 Y Current.260.823277707
+fra/east/ONLINELOG/:
ONLINELOG MIRROR COARSE AUG 12 15:00:00 Y group_1.257.823276237
ONLINELOG MIRROR COARSE AUG 23 19:00:00 Y group_10.272.823535727
ONLINELOG MIRROR COARSE AUG 23 19:00:00 Y group_11.273.823535737
ONLINELOG MIRROR COARSE AUG 23 19:00:00 Y group_12.274.823535745
ONLINELOG MIRROR COARSE AUG 23 19:00:00 Y group_13.275.823535757
ONLINELOG MIRROR COARSE AUG 23 19:00:00 Y group_14.276.823535763
ONLINELOG MIRROR COARSE AUG 23 19:00:00 Y group_15.277.823535771
ONLINELOG MIRROR COARSE AUG 12 15:00:00 Y group_2.258.823276245
ONLINELOG MIRROR COARSE AUG 12 15:00:00 Y group_3.259.823276251
ONLINELOG MIRROR COARSE AUG 23 19:00:00 Y group_7.269.823535685
ONLINELOG MIRROR COARSE AUG 23 19:00:00 Y group_8.270.823535695
ONLINELOG MIRROR COARSE AUG 23 19:00:00 Y group_9.271.823535703
+fra/east/STANDBYLOG/:
N standby_group_07.log => +FRA/EAST/ONLINELOG/group_7.269.823535685
N standby_group_08.log => +FRA/EAST/ONLINELOG/group_8.270.823535695
N standby_group_09.log => +FRA/EAST/ONLINELOG/group_9.271.823535703
N standby_group_10.log => +FRA/EAST/ONLINELOG/group_10.272.823535727
N standby_group_11.log => +FRA/EAST/ONLINELOG/group_11.273.823535737
N standby_group_12.log => +FRA/EAST/ONLINELOG/group_12.274.823535745
N standby_group_13.log => +FRA/EAST/ONLINELOG/group_13.275.823535757
N standby_group_14.log => +FRA/EAST/ONLINELOG/group_14.276.823535763
N standby_group_15.log => +FRA/EAST/ONLINELOG/group_15.277.823535771
+ asmcmd find +data 'group*'
+data/EAST/ONLINELOG/group_1.261.823276235
+data/EAST/ONLINELOG/group_2.262.823276241
+data/EAST/ONLINELOG/group_3.263.823276247
+data/HPYMUSIC/ONLINELOG/group_1.271.824213881
+data/HPYMUSIC/ONLINELOG/group_2.272.824213887
+data/HPYMUSIC/ONLINELOG/group_3.273.824213895
+ asmcmd find +data 'spf*'
+data/EAST/PARAMETERFILE/spfile.265.823277967
+data/EAST/spfileeast.ora
+ asmcmd ls -l data/east/CONTROLFILE
Type Redund Striped Time Sys Name
CONTROLFILE HIGH FINE AUG 12 15:00:00 Y Current.260.823276231
CONTROLFILE HIGH FINE AUG 23 19:00:00 Y Current.270.823277705
+ asmcmd find +fra 'group*'
+fra/EAST/ONLINELOG/group_1.257.823276237
+fra/EAST/ONLINELOG/group_10.272.823535727
+fra/EAST/ONLINELOG/group_11.273.823535737
+fra/EAST/ONLINELOG/group_12.274.823535745
+fra/EAST/ONLINELOG/group_13.275.823535757
+fra/EAST/ONLINELOG/group_14.276.823535763
+fra/EAST/ONLINELOG/group_15.277.823535771
+fra/EAST/ONLINELOG/group_2.258.823276245
+fra/EAST/ONLINELOG/group_3.259.823276251
+fra/EAST/ONLINELOG/group_7.269.823535685
+fra/EAST/ONLINELOG/group_8.270.823535695
+fra/EAST/ONLINELOG/group_9.271.823535703
+fra/HPYMUSIC/ONLINELOG/group_1.261.824213883
+fra/HPYMUSIC/ONLINELOG/group_2.262.824213889
+fra/HPYMUSIC/ONLINELOG/group_3.263.824213897
+ asmcmd find +fra 'spf*'
+ asmcmd ls -l fra/east/CONTROLFILE
Type Redund Striped Time Sys Name
CONTROLFILE HIGH FINE AUG 12 15:00:00 Y Current.256.823276231
CONTROLFILE HIGH FINE AUG 23 19:00:00 Y Current.260.823277707
++ date +%y%m%d,%H%M%S
+ echo END,130823,195712
[grid@tokyo1 shell]$
■ 以下、スタンバイ側 ■ ■ ■ ■ ■ ■ ■
export ORACLE_SID=HPYMUSIC
sqlplus / as sysdba
startup nomount pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/pfile_for_standby_HPYMUSIC.txt'
create spfile='+data/west/spfilewest.ora' from pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/pfile_for_standby_HPYMUSIC.txt';
srvctl stop database -d west -f
srvctl start database -d west -o open
srvctl start database -d west -o mount
srvctl start database -d west
startup mount pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/pfile_for_standby_HPYMUSIC.txt'
srvctl start database -d west -o open
srvctl config database -d west
srvctl status database -d west
alter database recover managed standby database disconnect from session;
select name, database_role, open_mode from gv$database;
srvctl modify database -d west -s open
○ spfile を作成する
export ORACLE_SID=HPYMUSIC
sqlplus / as sysdba
startup nomount pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/pfile_for_standby_HPYMUSIC.txt'
create spfile='+data/west/spfilewest.ora' from pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/pfile_for_standby_HPYMUSIC.txt';
○ 落とす
srvctl stop database -d west -f
○ open したいが起動しない( Mounted (Closed) 状態で起動することもある)。
srvctl start database -d west -o open
PRCR-1079 : リソースora.west.dbの起動に失敗しました
CRS-2674: Start of 'ora.west.db' on 'osaka1' failed
○ open したいが起動しない( Mounted (Closed) 状態で起動することもある)。
srvctl start database -d west -o mount
PRCR-1079 : リソースora.west.dbの起動に失敗しました
CRS-2674: Start of 'ora.west.db' on 'osaka1' failed
○ open したいが起動しない( Mounted (Closed) 状態で起動することもある)。
srvctl start database -d west
PRCR-1079 : リソースora.west.dbの起動に失敗しました
CRS-2674: Start of 'ora.west.db' on 'osaka1' failed
○ 起動するがエラーあり( alert_HPYMUSIC.log )
startup mount pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/pfile_for_standby_HPYMUSIC.txt'
[oracle@osaka1 dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 金 8月 23 19:05:35 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
アイドル・インスタンスに接続しました。
SQL> startup mount pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/pfile_for_standby_HPYMUSIC.txt'
ORACLEインスタンスが起動しました。
Total System Global Area 839282688 bytes
Fixed Size 2217992 bytes
Variable Size 515901432 bytes
Database Buffers 314572800 bytes
Redo Buffers 6590464 bytes
データベースがマウントされました。
Error 12154 received logging on to the standby
FAL[client, ARC3]: Error 12154 connecting to HPYMUSIC for fetching gap sequence
Errors in file /u01/app/oracle/diag/rdbms/west/HPYMUSIC/trace/HPYMUSIC_arc3_25690.trc:
ORA-12154: TNS: 指定された接続識別子を解決できませんでした
Errors in file /u01/app/oracle/diag/rdbms/west/HPYMUSIC/trace/HPYMUSIC_arc3_25690.trc:
ORA-12154: TNS: 指定された接続識別子を解決できませんでした
○ open にならず Mounted (Closed) としかなってくれない。
srvctl start database -d west -o open
[oracle@osaka1 dbs]$ srvctl start database -d west -o open
[oracle@osaka1 dbs]$ /u01/app/11.2.0/grid/bin/crsctl status resource -t
NAME TARGET STATE SERVER STATE_DETAILS
Local Resources
ora.DATA.dg
ONLINE ONLINE osaka1
ora.FRA.dg
ONLINE ONLINE osaka1
ora.LISTENER.lsnr
ONLINE ONLINE osaka1
ora.asm
ONLINE ONLINE osaka1 Started
Cluster Resources
ora.cssd
1 ONLINE ONLINE osaka1
ora.diskmon
1 ONLINE ONLINE osaka1
ora.west.db
1 ONLINE INTERMEDIATE osaka1 Mounted (Closed)
○
srvctl config database -d west
srvctl status database -d west
[oracle@osaka1 dbs]$ srvctl config database -d west
一意のデータベース名: west
データベース名: HPYMUSIC
Oracleホーム: /u01/app/oracle/product/11.2.0/dbhome_1
Oracleユーザー: grid
spfile: +data/west/spfilewest.ora
ドメイン:
開始オプション: open
停止オプション: immediate
データベース・ロール: physical_standby
管理ポリシー: AUTOMATIC
ディスク・グループ: DATA,FRA
サービス:
[oracle@osaka1 dbs]$ srvctl status database -d west
データベースは実行中です。
○ mrp プロセスが起動するが、Read Only ではない。
alter database recover managed standby database disconnect from session;
select name, database_role, open_mode from gv$database;
[oracle@osaka1 dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 金 8月 23 19:33:08 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
に接続されました。
SQL>
SQL> alter database recover managed standby database disconnect from session;
データベースが変更されました。
SQL> select name, database_role, open_mode from gv$database;
NAME DATABASE_ROLE
OPEN_MODE
HPYMUSIC PHYSICAL STANDBY
MOUNTED
[root@osaka1 app]# ps -ef |egrep -i mrp
oracle 26269 1 0 19:33 ? 00:00:00 ora_mrp0_HPYMUSIC
○ modify しても open にならない。
srvctl modify database -d west -s open
[oracle@osaka1 dbs]$ srvctl modify database -d west -s open
[oracle@osaka1 dbs]$ /u01/app/11.2.0/grid/bin/crsctl status resource -t
NAME TARGET STATE SERVER STATE_DETAILS
Local Resources
ora.DATA.dg
ONLINE ONLINE osaka1
ora.FRA.dg
ONLINE ONLINE osaka1
ora.LISTENER.lsnr
ONLINE ONLINE osaka1
ora.asm
ONLINE ONLINE osaka1 Started
Cluster Resources
ora.cssd
1 ONLINE ONLINE osaka1
ora.diskmon
1 ONLINE ONLINE osaka1
ora.west.db
1 ONLINE INTERMEDIATE osaka1 Mounted (Closed)standby 側に、アーカイブログファイルを少し適用すれば open できそうに感じます。
これを解決するためには、以下のエラーを解決するのがよいと思います。
・ORA-12154: TNS: 指定された接続識別子を解決できませんでした
両ノードの tnsnames.ora を確認させて貰えますか?
この推測が間違えていたら再検討しましょう。 -
hi All,
i am trying to follow through the steps.
I will be porting the data from the old box into a new box ( windows 12.1.0.2.0)
I run the pre- tools script -> preupgrd.sql
it give me error or some warning to fix before doing the upgrade.
My question is , before i port over the data via a cold backup, should i first change the compatability to 11.0.0 from 10.2.0.5.0 (source db) then do a cold backup then port over the data to the new box then do the upgrade steps?
of course i can change the init.ora process to 300. As for the rest of the warning, i am not too sure is it necessary for me to do it since i will moving to a new box. Warning likes, EM database control, etc
[Update parameters]
[Update Oracle Database 10.2.0.5.0 init.ora or spfile]
--> If Target Oracle is 32-bit, refer here for Update Parameters:
WARNING: --> "processes" needs to be increased to at least 300
--> If Target Oracle is 64-bit, refer here for Update Parameters:
WARNING: --> "sga_target" needs to be increased to at least 624951296
WARNING: --> "processes" needs to be increased to at least 300
[Renamed Parameters]
[No Renamed Parameters in use]
[Obsolete/Deprecated Parameters]
--> background_dump_dest 11.1 DESUPPORTED replaced by "diagnostic_dest"
--> user_dump_dest 11.1 DESUPPORTED replaced by "diagnostic_dest"
[Changes required in Oracle Database init.ora or spfile]
[Component List]
--> Oracle Catalog Views [upgrade] VALID
--> Oracle Packages and Types [upgrade] VALID
--> JServer JAVA Virtual Machine [upgrade] VALID
--> Oracle XDK for Java [upgrade] VALID
--> Oracle Workspace Manager [upgrade] VALID
--> OLAP Analytic Workspace [upgrade] VALID
--> Oracle Enterprise Manager Repository [upgrade] VALID
--> Oracle Text [upgrade] VALID
--> Oracle XML Database [upgrade] VALID
--> Oracle Java Packages [upgrade] VALID
--> Oracle Multimedia [upgrade] VALID
--> Oracle Spatial [upgrade] VALID
--> Data Mining [upgrade] VALID
--> Expression Filter [upgrade] VALID
--> Rule Manager [upgrade] VALID
--> Oracle OLAP API [upgrade] VALID
[Tablespaces]
--> SYSTEM tablespace is adequate for the upgrade.
minimum required size: 1122 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
minimum required size: 400 MB
--> SYSAUX tablespace is adequate for the upgrade.
minimum required size: 619 MB
--> TEMP tablespace is adequate for the upgrade.
minimum required size: 60 MB
--> EXAMPLE tablespace is adequate for the upgrade.
minimum required size: 78 MB
[No adjustments recommended]
[Pre-Upgrade Checks]
WARNING: --> Process Count may be too low
Database has a maximum process count of 150 which is lower than the
default value of 300 for this release.
You should update your processes value prior to the upgrade
to a value of at least 300.
For example:
ALTER SYSTEM SET PROCESSES=300 SCOPE=SPFILE
or update your init.ora file.
ERROR: --> Compatible set too low
"compatible" currently set at 10.2.0.5.0 and must
be set to at least 11.0.0 prior to upgrading the database.
Do not make this change until you are ready to upgrade
because a downgrade back to 10.2 is not possible once compatible
has been raised.
Update your init.ora or spfile to make this change.
WARNING: --> Enterprise Manager Database Control repository found in the database
In Oracle Database 12c, Database Control is removed during
the upgrade. To save time during the Upgrade, this action
can be done prior to upgrading using the following steps after
copying rdbms/admin/emremove.sql from the new Oracle home
- Stop EM Database Control:
$> emctl stop dbconsole
- Connect to the Database using the SYS account AS SYSDBA:
SET ECHO ON;
SET SERVEROUTPUT ON;
@emremove.sql
Without the set echo and serveroutput commands you will not
be able to follow the progress of the script.
WARNING: --> "DMSYS" schema exists in the database
The DMSYS schema (Oracle Data Mining) will be removed
from the database during the database upgrade.
All data in DMSYS will be preserved under the SYS schema.
Refer to the Oracle Data Mining User's Guide for details.
WARNING: --> Database contains INVALID objects prior to upgrade
The list of invalid SYS/SYSTEM objects was written to
registry$sys_inv_objs.
The list of non-SYS/SYSTEM objects was written to
registry$nonsys_inv_objs unless there were over 5000.
Use utluiobj.sql after the upgrade to identify any new invalid
objects due to the upgrade.
INFORMATION: --> OLAP Catalog(AMD) exists in database
Starting with Oracle Database 12c, OLAP Catalog component is desupported.
If you are not using the OLAP Catalog component and want
to remove it, then execute the
ORACLE_HOME/olap/admin/catnoamd.sql script before or
after the upgrade.
INFORMATION: --> Older Timezone in use
Database is using a time zone file older than version 18.
After the upgrade, it is recommended that DBMS_DST package
be used to upgrade the 10.2.0.5.0 database time zone version
to the latest version which comes with the new release.
Please refer to My Oracle Support note number 1509653.1 for details.
WARNING: --> Existing schemas with network ACLs exist
Database contains schemas with objects dependent on network packages.
Refer to the Upgrade Guide for instructions to configure Network ACLs.
INFORMATION: --> There are existing Oracle components that will NOT be
upgraded by the database upgrade script. Typically, such components
have their own upgrade scripts, are deprecated, or obsolete.
Those components are: OLAP CatalogNot something I've done before but it seems that setting the parameter to 11.0.0 is a pre-requisite.
http://docs.oracle.com/database/121/UPGRD/intro.htm#BHCJHGFA
A full backup isn't neccessary specifically for this upgrade. Just port your data over, change the compatibile parameter on the spfile/pfile on your target upgrade host and upgrade away.
Your source will be your backup so I would be inclined not to change things on there.
You can ignore some of the warning like EM dbcontrol as it states you can do it manually prior to the upgrade to save time, otherwise it will be done as part of the upgrade process anyway.
Other warnings like. OLAP and the timezone file (timezone is a recommendation) you will need to pay attention to and action, as well as the network ACL warning:
http://docs.oracle.com/database/121/UPGRD/preup.htm#BABEDAFB
http://docs.oracle.com/database/121/UPGRD/preup.htm#BABJGCIC -
Multiplex control files in Oracle 10g...
Hi ,
the Oracle documentation , in one of its books points out....:
'Once the disk drive is repaired, the damaged control file can be restored using the intact copy of the control file from the other disk and the instance can be restarted'.
Is it achievable automatically.... or using some kind of sql commands and which , if any.....?????
Regards,
Simonthere's a parameter called
control_files
in your spfile/pfile whichever you use.
You can just multiply as many control files as you wish at OS level (copy) and list them in the parameter, then start your database.
Maybe you are looking for
-
How to install new version of jvm in Oracle?
We are using Oracle 9i which is internally using jvm ver 1.2.2. It has a bug 'ByteCode Verifier', so we need to replace the jvm's ver with 1.2.2_011. Can someone help me figuring out how we can uninstall the old version of jvm and install the new ver
-
When I try turning on my iPod touch the apple comes on and then flashes off
Why is my iPod turn on with the apple and then flashing off
-
How much is it to repair a smashed ipod screen 4th generation?
.
-
Talk to me like I'm 5: Where are my Pages documents?
My gadgets and versions: iMac 10.9.5 Mavericks, running Pages 5.2.2 iOS on phone and iPad 8.1.2, running Pages 2.5.2. I was using Pages in iOS 7 on my iPhone 4 and iPad and had no problem seeing all my documents on all my gadgets. When iOS 8 arrived
-
I got a free download of an album and it's in my iTunes on my computer but when I sync to my iPod Touch, it doesn't appear in the iPod's library. I do have it set to update the complete library when syncing. I also bought an album yesterday through t