본문 바로가기
  • Welcome
DB

오라클 Oracle ORA-12505, ORA-27101, ORA-01034, ORA-00119, ORA-00132 오류 해결

by Ben romantic balik 2024. 7. 26.
반응형

Sql Developer 에서 DB USER 에 접속하려고 하는데,

1. ORA-12505, TNS:listener 오류

Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

라는 오류가 떴다. 

 

보아하니 tnsname.ora 와 listener.ora을 수정하고 cmd 에서 리스너를 재시작 하라고 한다.

 

1-1. tnsname.ora 와 listener.ora 을 수정하고 

cmd 창을 '관리자 권한'으로 열어서 아래 명령어를 입력했다.

lsnrctl stop
lsnrctl start

 

그래도 DB 에 접속하려고 보니 아래와 같은 새로운 오류가 생겼다.

2. ORA-27101: shared memory realm does not exist

ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist

 

 

 

2-1. cmd 창을 '관리자 권한'으로 열고 데이터베이스에 접속하기위하여 아래 명령어를 입력한다.

sqlplus sys/비밀번호@orcl as sysdba

 * 보통은 sqlplus / as sysdba 로 명령을 쳐서 sqlplus 에 접속하지만,

나의 경우에는 DB 가 여러개가 있어서 꼭 위에처럼 @orcl 을 명시해줘야 해당 DB 에 접속이 가능했다.

 

2-2. 이후 데이터베이스 상태를 확인하기위해서 아래의 명령어를 입력한다.

select status from v$instance;


그리고 또 다시 만난 새로운 오류는 이것이다.

3. ora-01034: ORACLE not available 오류

ora-01034: ORACLE not available

 

다시 2-1로 데이터베이스에 접속하고

sqlplus sys/비밀번호@orcl as sysdba

3-2. startup 명령어를 입력했다.

 

4. ORA-00119 오류 발생, ORA-00132오류 발생!

 

ORA-00119: invalid specification for system parameter LOCAL_LISTENER ORA-00132: syntax error or unresolved network name 'LISTENER_ORCL'

 

4-1. tnsnames.ora 파일에 아래와 같이 LISTENER_ORCL 을 추가해준다.

LISTENER_ORCL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))

4-2. 다시 관리자권한으로 데이터베이스에 접속한다.

sqlplus sys/비밀번호@orcl as sysdba

4-3. STARTUP 명령어를 실행한다.

갑자기!! 실행이 됐다. (아래와 같이 오류안나면 정상 실행 된것!)

ORACLE instance started.

Total System Global Area  123456789 bytes
Fixed Size                  1234567 bytes
Variable Size              12345678 bytes
Database Buffers           12345678 bytes
Redo Buffers                1234567 bytes
Database mounted.
Database opened.

 

 

SQL Developer 에서 해당 DB USER 에 접속해보니 접속이 된다!

오류 해결

 

 

 

아래 블로그들을 참고하였다.

https://blog.naver.com/rookieangel/140123979566

 

ORA-12505 오류

DB 접속 실패 : java.sql.SQLException: Listener refused the connection with the following erro...

blog.naver.com

 

https://lotuus.tistory.com/21

 

[오라클 DB 11g]ORA-01034, ORA-01078, LRM-00109 오류 해결!

​ 지우고 설치하고를 몇번 반복중.. 역시나 똑같이 오류가 나서 일단 무시하고 설치는 완료 ​ ​ sqlplus에서 sys로 접속하면 "휴지 인스턴스에 접속되었습니다" 라고 뜨고 ​ "휴지 인스턴스에

lotuus.tistory.com

https://blog.naver.com/lcoguss/159802724

 

ORA-00119, ORA-00132 해결방법

SQL> startup  ORA-00119 : invalid specification for system parameter LOCAL_...

blog.naver.com

 

반응형