728x90

 

RHEL 8 에서 생기는 에러 

 

[oracle@rac1-:$export CV_ASSUME_DISTID=OL7
[oracle@rac1-:]$./gridSetup.sh 

 

728x90
728x90

RAC 수동 삭제 시

deconfig deinstall 없이 rm으로 GRID HOME 삭제할 경우 

 

OS root 권한 및 /etc 등 이하 파일 및 디렉토리를 삭제해야 재 설치가 가능함

 

systemctl stop oracle-tfa.service
rm -rf $ORACLE_HOME
rm -rf $ORACLE_BASE
rm -rf /etc/oraInst.loc 
rm -rf /etc/oratab
rm -rf /usr/bin/orachk
rm -rf /usr/bin/tfactl
rm -rf /etc/oracle
rm -rf /var/tmp/.oracle
rm -rf /var/opt/oracle
rm -rf /opt/ORCLfmap
rm -rf /opt/oracle
rm -rf /opt/oracle.ahf
728x90

'ORACLE' 카테고리의 다른 글

[ORACLE] RAC 삭제  (0) 2022.05.23
[ORACLE] INS-08101  (0) 2022.05.23
[ORCLE] dbca script 생성 명령어 - silent  (1) 2022.05.11
[ORACLE] 공통계정 생성 시 c## 제거 설정  (0) 2022.05.11
[ORACLE] LOB 생성, 조회  (0) 2022.05.11
728x90

dbca -silent -generateScripts -templateName /oracle/app/oracle/product/19.3.0/assistants/dbca/templates/New_Database.dbt -gdbName orcl -sid orcl -characterSet AL32UTF8 -scriptDest /home/oracle/script

728x90

'ORACLE' 카테고리의 다른 글

[ORACLE] INS-08101  (0) 2022.05.23
[ORACLE] RAC 수동 삭제 (rm)  (0) 2022.05.23
[ORACLE] 공통계정 생성 시 c## 제거 설정  (0) 2022.05.11
[ORACLE] LOB 생성, 조회  (0) 2022.05.11
[ORACLE] 특정 스키마의 PK, UK 없는 table 조회  (0) 2022.05.11
728x90

-- 세션만 변경

alter session set "_oracle_script"=TRUE;

-- spfile 변경

alter system set "_oracle_script"=TRUE scope=spfile;

 

-- 해당 파라미터 조회

col ksppsttvl for a10 
col ksppinm for a20 
select ksppinm, ksppstvl 
from x$ksppi x, x$ksppcv y 
where x.indx = y.indx  
and x.ksppinm like '%_oracle%'; 
728x90
728x90
-- BLOB, CLOB 생성
create tablespace test datafile '/oracle/base/oradata/ORCL/test.dbf' size 100M autoextend on;
create user test identified by test default tablespace test temporary tablespace temp;
 
grant dba to test;
 
create table clob (
name varchar2(20) primary key not null,
age number(10),
character CLOB);
 
create table blob (
name varchar2(20) primary key not null,
age number(10),
character BLOB);
 
insert into clob values
('AAA', 26, 'ABCDEFGHIG1ABCDEFGHIG2ABCDEFGHIG3');
 
insert into clob values
('BBB', 27, EMPTY_CLOB());
 
insert into blob values
('AAA', 26, null);
 
-- table 구조 조회
 
desc <테이블명>
 
-- lob table 조회
select owner, table_name from dba_lobs;
 
-- LOB table count(*)
set line 300
col OWNER for a20
col OBJECT_TYPE for a5
select owner, object_type, count(*) from dba_objects
where object_type = 'LOB'
group by owner,object_type
order by owner,object_type ;
 
 

 

728x90
728x90
select TABLE_NAME from dba_tables
where OWNER = 'TEST' and TABLE_NAME
NOT IN (
SELECT A.TABLE_NAME
FROM USER_CONS_COLUMNS A
INNER JOIN USER_CONSTRAINTS B
ON A.CONSTRAINT_NAME = B.CONSTRAINT_NAME
WHERE B.CONSTRAINT_TYPE IN ('P','U')
and COLUMN_NAME like '%%');

 

728x90

'ORACLE' 카테고리의 다른 글

[ORACLE] 공통계정 생성 시 c## 제거 설정  (0) 2022.05.11
[ORACLE] LOB 생성, 조회  (0) 2022.05.11
[ORACLE] PK, UK table 조회  (0) 2022.05.11
[ORACLE] SE to EE 버전업 테스트  (2) 2022.05.11
[ORACLE] Archive log format  (0) 2022.05.11
728x90
-- PK, UK table list
set line 300
col OWNER for a20
col TABLE_NAME for a30
col COLUMN_NAME for a30
SELECT A.OWNER, A.TABLE_NAME, A.COLUMN_NAME
FROM USER_CONS_COLUMNS A
INNER JOIN USER_CONSTRAINTS B
ON A.CONSTRAINT_NAME = B.CONSTRAINT_NAME
WHERE (B.CONSTRAINT_TYPE = 'P' or B.CONSTRAINT_TYPE = 'U') and COLUMN_NAME like '%%' ;
728x90

'ORACLE' 카테고리의 다른 글

[ORACLE] LOB 생성, 조회  (0) 2022.05.11
[ORACLE] 특정 스키마의 PK, UK 없는 table 조회  (0) 2022.05.11
[ORACLE] SE to EE 버전업 테스트  (2) 2022.05.11
[ORACLE] Archive log format  (0) 2022.05.11
[ORACLE] HA start/stop Script (Linux)  (0) 2022.05.11
728x90
1.version 확인
C:\Users\Administrator>sqlplus / as sysdba
 
SQL*Plus: Release 19.0.0.0.0 - Production on Thu Dec 10 18:12:02 2020
Version 19.3.0.0.0
 
Copyright (c) 1982, 2019, Oracle.  All rights reserved.
 
Connected to:
Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
 
SQL>
2.oracle service 중지
 
3.backup
$ORACLE_HOME/database/
$ORACLE_HOME/network/admin/
data파일
archive파일

 

4.deinstall
5.version upgrand engine 설치
6.service 재등록
oradim -delete -sid ORCL
oradim -NEW -SID ORCL -INTPWD oracle -STARTMODE auto -PFILE 'C:\u01\base\product\19c\database\SPFILEORCL.ora'
 
7.$ORACLE_HOME 환경변수 변경
SQL> startup upgrade;
ORACLE instance started.
 
Total System Global Area 2516582224 bytes
Fixed Size                  9031504 bytes
Variable Size             536870912 bytes
Database Buffers         1962934272 bytes
Redo Buffers                7745536 bytes
Database mounted.
Database opened.
 
C:\u01\base\product\19c\rdbms\admin>sqlplus / as sysdba
 
SQL*Plus: Release 19.0.0.0.0 - Production on Thu Dec 10 20:50:34 2020
Version 19.3.0.0.0
 
Copyright (c) 1982, 2019, Oracle.  All rights reserved.
 
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
 
SQL> @catalog.sql
SQL> @catproc.sql
 
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
 
Total System Global Area 2516582224 bytes
Fixed Size                  9031504 bytes
Variable Size             536870912 bytes
Database Buffers         1962934272 bytes
Redo Buffers                7745536 bytes
Database mounted.
Database opened.
 
SQL> @utlrp.sql
 
 

 

728x90

'ORACLE' 카테고리의 다른 글

[ORACLE] 특정 스키마의 PK, UK 없는 table 조회  (0) 2022.05.11
[ORACLE] PK, UK table 조회  (0) 2022.05.11
[ORACLE] Archive log format  (0) 2022.05.11
[ORACLE] HA start/stop Script (Linux)  (0) 2022.05.11
[ORACLE] DB_NAME 변경  (0) 2022.05.11
728x90
%s log sequence number
%S log sequence number, zero filled
%t thread number
%T thread number, zero filled
%a activation ID
%d database ID
%r resetlogs ID that ensures unique names are constructed for the archived log files across multiple incarnations of the database

 

728x90

'ORACLE' 카테고리의 다른 글

[ORACLE] PK, UK table 조회  (0) 2022.05.11
[ORACLE] SE to EE 버전업 테스트  (2) 2022.05.11
[ORACLE] HA start/stop Script (Linux)  (0) 2022.05.11
[ORACLE] DB_NAME 변경  (0) 2022.05.11
[ORACLE] RMAN-03009, ORA-00245  (0) 2022.03.07
728x90
## START script
vi ora_start.sh
#!/bin/ksh
su - oracle << EOF
lsnrctl start listener
exit
EOF
su - oracle << EOF
export ORACLE_SID=PHARMS
sqlplus "/as sysdba" << EOF
startup
exit
EOF
 
## STOP  script
vi ora_stop.sh
#!/bin/ksh
su - oracle << EOF
lsnrctl stop listener
EOF
su - oracle << EOF
export ORACLE_SID=PHARMS
sqlplus "/as sysdba" << EOF
shutdown immediate
exit
EOF
-- 확인
# ps -ef | grep pmon
oracle    5094     1  0 01:34 ?        00:00:00 ora_pmon_ABCD
root      5165  2722  0 01:34 pts/1    00:00:00 grep pmon
 
# ps -ef | grep tns
root        29     2  0 Nov11 ?        00:00:00 [netns]
oracle    5068     1  0 01:34 ?        00:00:00 /u01/base/product/11.2.0.4/bin/tnslsnr listener -inherit
root      5167  2722  0 01:34 pts/1    00:00:00 grep tns

 

728x90

'ORACLE' 카테고리의 다른 글

[ORACLE] SE to EE 버전업 테스트  (2) 2022.05.11
[ORACLE] Archive log format  (0) 2022.05.11
[ORACLE] DB_NAME 변경  (0) 2022.05.11
[ORACLE] RMAN-03009, ORA-00245  (0) 2022.03.07
[ORACLE] INCREMENTAL BACKUP (Crontab)  (0) 2022.03.07

+ Recent posts