메뉴 건너뛰기

Korea Oracle User Group

Install/Configuration

ASM 에 spfile 등록 및 삭제 하기

우뽕 2020.07.27 15:30 조회 수 : 5228 추천:1

spfile 이 정상적으로 asm disk에 들어가야 하지만. 메뉴얼하게 db를 생성 하면 그리 되지 않습니다.

 

아래 절차대로 수행 해 보도록 하겠습니다.

 

메뉴얼하게 DB 추가 작업 - GRID 리소스에 DB 추가 작업  

에 이은 추가 된 내용 이므로 사전에 위의 내용 기반으로 보시면 이해가 쉬울듯 합니다.

 

--- SPFILE ASM 추가 작업 하기 
/***

[oracle@db19c1(DBRAC1):/db]srvctl config database  -db DBRAC
Database unique name: DBRAC
Database name: DBRAC
Oracle home: /db/app/product/dbhome
Oracle user: oracle
Spfile: +DATA_DG/DBRAC/PARAMETERFILE/spfile.268.1038311291
Password file: +DATA_DG/DBRAC/PASSWORD/pwddbrac.256.1038307069
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: 
Disk Groups: DATA_DG,FRA_DG
Mount point paths: 
Services: 
Type: RAC
Start concurrency: 
Stop concurrency: 
OSDBA group: dba
OSOPER group: dba
Database instances: DBRAC1,DBRAC2
Configured nodes: db19c1,db19c2
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services: 
Database is administrator managed
[oracle@db19c1(DBRAC1):/db]

**/


[oracle@db19c1(DBRAC1):/db]srvctl config database  -db DB_TEST
Database unique name: DB_TEST
Database name: 
Oracle home: /db/app/product/dbhome
Oracle user: oracle
Spfile: 
Password file: 
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: 
Disk Groups: DATA_DG
Mount point paths: 
Services: 
Type: RAC
Start concurrency: 
Stop concurrency: 
OSDBA group: dba
OSOPER group: dba
Database instances: DB_TEST1,DB_TEST2
Configured nodes: db19c1,db19c2
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services: 
Database is administrator managed
[oracle@db19c1(DBRAC1):/db]



-- initDB_TEST1.ora 
*.cluster_database=true
*.control_files='+DATA_DG/DB_TEST/CONTROLFILE/current.281.1046811189'#Oracle managed file
*.db_block_size=8192
*.db_create_file_dest='+DATA_DG'
*.db_name='DB_TEST'
*.db_recovery_file_dest='+FRA_DG'
*.db_recovery_file_dest_size=10240M
*.db_securefile='PREFERRED'
*.resource_manager_plan='DEFAULT_PLAN'
*.undo_management='auto'

## add 1Node, 2Node 
DB_TEST1.instance_number=1
DB_TEST2.instance_number=2
DB_TEST1.thread=1
DB_TEST2.thread=2
DB_TEST1.undo_tablespace='UNDOTBS1'
DB_TEST2.undo_tablespace='UNDOTBS2'


[oracle@db19c1(DBRAC1):/db]
[oracle@db19c1(DBRAC1):/db]export ORACLE_SID=DB_TEST1
[oracle@db19c1(DB_TEST1):/db]
[oracle@db19c1(DB_TEST1):/db]
[oracle@db19c1(DB_TEST1):/db]sqlplus
SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 27 11:51:41 2020
Version 19.7.0.0.0
Copyright (c) 1982, 2020, Oracle.  All rights reserved.
Enter user-name: /as sysdba
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.7.0.0.0

SQL> startup mount pfile='initDB_TEST1.ora';
ORACLE instance started.
Total System Global Area  327155264 bytes
Fixed Size                  8896064 bytes
Variable Size             264241152 bytes
Database Buffers           50331648 bytes
Redo Buffers                3686400 bytes
Database mounted.
SQL> 
SQL> alter database open;
Database altered.
SQL> 
SQL>        
SQL> quit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.7.0.0.0
[oracle@db19c1(DB_TEST1):/db/app/product/dbhome/dbs]
[oracle@db19c1(DB_TEST1):/db/app/product/dbhome/dbs]
[oracle@db19c1(DB_TEST1):/db/app/product/dbhome/dbs]scp initDB_TEST1.ora oracle@db19c2:/db/app/product/dbhome/dbs
initDB_TEST1.ora                                                                                                                     100%  534   847.5KB/s   00:00    
[oracle@db19c1(DB_TEST1):/db/app/product/dbhome/dbs]


[oracle@db19c2(DB_TEST2):/db/app/product/dbhome/dbs]mv initDB_TEST1.ora initDB_TEST2.ora
mv: overwrite 'initDB_TEST2.ora'? y 
[oracle@db19c2(DB_TEST2):/db/app/product/dbhome/dbs]

[oracle@db19c2(DB_TEST2):/db/app/product/dbhome/dbs]more initDB_TEST2.ora
*.cluster_database=true
*.control_files='+DATA_DG/DB_TEST/CONTROLFILE/current.281.1046811189'#Oracle managed file
*.db_block_size=8192
*.db_create_file_dest='+DATA_DG'
*.db_name='DB_TEST'
*.db_recovery_file_dest='+FRA_DG'
*.db_recovery_file_dest_size=10240M
*.db_securefile='PREFERRED'
*.resource_manager_plan='DEFAULT_PLAN'
*.undo_management='auto'

## add 1Node, 2Node 
DB_TEST1.instance_number=1
DB_TEST2.instance_number=2
DB_TEST1.thread=1
DB_TEST2.thread=2
DB_TEST1.undo_tablespace='UNDOTBS1'
DB_TEST2.undo_tablespace='UNDOTBS2'
[oracle@db19c2(DB_TEST2):/db/app/product/dbhome/dbs]
[oracle@db19c2(DB_TEST2):/db/app/product/dbhome/dbs]
[oracle@db19c2(DB_TEST2):/db/app/product/dbhome/dbs]sqlplus
SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 27 13:53:39 2020
Version 19.7.0.0.0
Copyright (c) 1982, 2020, Oracle.  All rights reserved.
Enter user-name: /as sysdba
Connected to an idle instance.
SQL> startup mount pfile='initDB_TEST2.ora';
ORACLE instance started.
Total System Global Area  327155264 bytes
Fixed Size                  8896064 bytes
Variable Size             264241152 bytes
Database Buffers           50331648 bytes
Redo Buffers                3686400 bytes
Database mounted.
SQL> 
SQL> 
SQL> alter database open;

Database altered.
SQL> 



[oracle@db19c1(DB_TEST1):/db/app/product/dbhome/dbs]srvctl config database -db DB_TEST | grep Spfile
Spfile: 
[oracle@db19c1(DB_TEST1):/db/app/product/dbhome/dbs]
[oracle@db19c1(DB_TEST1):/db/app/product/dbhome/dbs]sqlplus
SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 27 13:59:26 2020
Version 19.7.0.0.0
Copyright (c) 1982, 2020, Oracle.  All rights reserved.
Enter user-name: /as sysdba
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.7.0.0.0

SQL> create spfile='+DATA_DG' from pfile='/db/app/product/dbhome/dbs/initDB_TEST1.ora';
File created.
SQL> quit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.7.0.0.0
[oracle@db19c1(DB_TEST1):/db/app/product/dbhome/dbs]srvctl config database -db DB_TEST | grep Spfile
Spfile: +DATA_DG/DB_TEST/PARAMETERFILE/spfile.279.1046872779
[oracle@db19c1(DB_TEST1):/db/app/product/dbhome/dbs]

[oracle@db19c2(DB_TEST2):/db/app/product/dbhome/dbs]srvctl config database -db DB_TEST | grep Spfile
Spfile: +DATA_DG/DB_TEST/PARAMETERFILE/spfile.279.1046872779
[oracle@db19c2(DB_TEST2):/db/app/product/dbhome/dbs]


-- SPFILE 삭제 방법 ( ASM DISK 그룹에서 삭제 )
[oracle@db19c1(DB_TEST1):/db/app/product/dbhome/dbs]srvctl config database -db DB_TEST
Database unique name: DB_TEST
Database name: 
Oracle home: /db/app/product/dbhome
Oracle user: oracle
Spfile: +DATA_DG/DB_TEST/PARAMETERFILE/spfile.279.1046865319
Password file: 
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: 
Disk Groups: DATA_DG
Mount point paths: 
Services: 
Type: RAC
Start concurrency: 
Stop concurrency: 
OSDBA group: dba
OSOPER group: dba
Database instances: DB_TEST1,DB_TEST2
Configured nodes: db19c1,db19c2
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services: 
Database is administrator managed
[oracle@db19c1(DB_TEST1):/db/app/product/dbhome/dbs]
[oracle@db19c1(DB_TEST1):/db/app/product/dbhome/dbs]srvctl modify database -db DB_TEST -p ''
[oracle@db19c1(DB_TEST1):/db/app/product/dbhome/dbs]
[oracle@db19c1(DB_TEST1):/db/app/product/dbhome/dbs]srvctl config database -db DB_TEST | grep Spfile
Spfile: 
[oracle@db19c1(DB_TEST1):/db/app/product/dbhome/dbs]asmcmd
ASMCMD> ls -lart
State    Type    Rebal  Name
MOUNTED  EXTERN  N      OCRVOT_DG/
MOUNTED  EXTERN  N      MGMT_DG/
MOUNTED  EXTERN  N      FRA_DG/
MOUNTED  EXTERN  N      DATA_DG/
ASMCMD> cd DATA_DG
ASMCMD> ls -lart
Type  Redund  Striped  Time  Sys  Name
                             N    DBRAC/
                             Y    DB_TEST/
ASMCMD> cd DB_TEST
ASMCMD> ls -lart
Type  Redund  Striped  Time  Sys  Name
                             Y    CONTROLFILE/
                             Y    DATAFILE/
                             Y    ONLINELOG/
                             Y    PARAMETERFILE/
                             Y    TEMPFILE/
ASMCMD> cd PARAMETERFILE
ASMCMD> ls
spfile.279.1046865319
ASMCMD> cd ..
ASMCMD> ls -lart
Type  Redund  Striped  Time  Sys  Name
                             Y    CONTROLFILE/
                             Y    DATAFILE/
                             Y    ONLINELOG/
                             Y    PARAMETERFILE/
                             Y    TEMPFILE/
ASMCMD> rm -fr PARAMETERFILE
ASMCMD> ls -lart
Type  Redund  Striped  Time  Sys  Name
                             Y    CONTROLFILE/
                             Y    DATAFILE/
                             Y    ONLINELOG/
                             Y    TEMPFILE/
ASMCMD> 

 

번호 제목 글쓴이 날짜 조회 수
40 패치 conflict(충돌) 검사 방법 [1] 우뽕 2023.04.04 684
39 오라클 21c RAC 설치 with Oracle Linux 8.2 - 5 (DBCA로 Database 생성) file 명품관 2021.12.02 758
38 오라클 21c RAC 설치 with Oracle Linux 8.2 - 4 (Database Software 설치) file 명품관 2021.12.02 1011
37 오라클 21c RAC 설치 with Oracle Linux 8.2 - 3 (사용할 Disk Group 생성) file 명품관 2021.12.02 564
36 오라클 21c RAC 설치 with Oracle Linux 8.2 - 2 (Grid Infrastructure) [1] file 명품관 2021.12.01 1140
35 오라클 21c RAC 설치 with Oracle Linux 8.2 - 1 (OS 및 스토리지 설정) 명품관 2021.12.01 3766
34 Oracle RAC RU rolling patching from 19.3 to 19.9.0.0.201020(Patch 31750108) [1] file 명품관 2020.12.08 6049
33 Oracle EM(Enterprise Manager) 13.4 설치 및 구성 - 2(EM 설치) file 명품관 2020.11.27 2860
32 Oracle Database 19c Patch Update(단일 인스턴스 오라클 DB 19.3 에서 19.9로 RU Update) 명품관 2020.11.24 40804
31 Oracle EM(Enterprise Manager) 13.4 설치 및 구성 - 1(Repository DB 설치) file 명품관 2020.11.23 1489
30 Oracle 19c RAC 설치 with Oracle Linux 8.2 - 5 (DBCA로 Database 생성) file 명품관 2020.11.19 3178
29 Oracle 19c RAC 설치 with Oracle Linux 8.2 - 4 (Database Software 설치) file 명품관 2020.11.19 1279
28 Oracle 19c RAC 설치 with Oracle Linux 8.2 - 3 (사용할 Disk Group 생성) file 명품관 2020.11.19 1826
27 Oracle 19c RAC 설치 with Oracle Linux 8.2 - 2 (Grid Infrastructure) file 명품관 2020.11.19 6056
26 Oracle 19c RAC 설치 with Oracle Linux 8.2 - 1 (OS 및 스토리지 설정) 명품관 2020.11.14 5991
25 ORA-27300, ORA-27301, ORA-27302 Error 와 함께 DB Shutdown - 작성중. Talros 2020.08.28 389
» ASM 에 spfile 등록 및 삭제 하기 우뽕 2020.07.27 5228
23 메뉴얼하게 DB 추가 작업 - GRID 리소스에 DB 추가 작업 우뽕 2020.07.27 1809
22 19c RAC - Manual Patch 적용방법 우뽕 2020.05.05 2545
21 19c RAC OJVM 패치작업 우뽕 2020.04.22 8984
위로