프린트 하기

OS 환경 : Oracle Linux 9.6 (64bit)

 

DB 환경 : Oracle AI Database 19.27, 23.26.1.0.0

 

에러 : Validating glogin.sql file content

오라클 19c에서 26ai로 autoupgrade를 이용해 업그레이드 하던 도중 발생한 에러

참고 : 오라클 19c to 26ai Autoupgrade Refreshable Pluggable Database 이용 업그레이드 ( https://positivemh.tistory.com/1336 )

 

 

autoupgrade 배포 수행(타겟 db에서 수행)

1
2
3
4
5
6
7
8
9
10
$ java -jar autoupgrade.jar -config ORA19DBFS.cfg -mode deploy
AutoUpgrade 25.6.251016 launched with default internal options
Processing config file ...
Creating new AutoUpgrade keystore
AutoUpgrade keystore was successfully created
 
There were conditions found preventing AutoUpgrade from successfully running
 
*Validating glogin.sql file content
/app/oracle/product/26ai/sqlplus/admin/glogin.sql produces errors when not connected to DB, ORA19DBFS

glogin 관련 에러 발생함

 

 

해결 방법 : glogin.sql에서 alter 구문 주석 처리 또는 제거

glogin.sql에서 alter 구문 주석 처리 또는 제거

glogin.sql 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$ cat /app/oracle/product/26ai/sqlplus/admin/glogin.sql
--
-- Copyright (c) 1988, 2005, Oracle.  All Rights Reserved.
--
-- NAME
--   glogin.sql
--
-- DESCRIPTION
--   SQL*Plus global login "site profile" file
--
--   Add any SQL*Plus commands here that are to be executed when a
--   user starts SQL*Plus, or uses the SQL*Plus CONNECT command.
--
-- USAGE
--   This script is automatically run
--
set lines 200 pages 1000 hist on
alter session set nls_date_format='yyyy/mm/dd hh24:mi:ss';

테스트를 위해 넣어둔 nls_date_format 설정이 들어있음

 

 

해당부분 삭제 또는 주석처리

1
2
3
$ vi /app/oracle/product/26ai/sqlplus/admin/glogin.sql
set lines 200 pages 1000 hist on
--alter session set nls_date_format='yyyy/mm/dd hh24:mi:ss';

 

 

autoupgrade 배포 수행(타겟 db에서 수행)

1
2
$ cd /home/oracle
$ java -jar autoupgrade.jar -config ORA19DBFS.cfg -mode deploy

정상적으로 수행됨

 

 

원인 : $ORACLE_HOME/sqlplus/admin/glogin.sql에 alter 구문이 포함되어 있어 발생한 문제

autoupgrade시 내부 쿼리가 돌아야하는데 glogin.sql에 있는 alter 구문이 먼저 수행되어 문제가 발생하는듯함

 

 

참조 : 

https://positivemh.tistory.com/1336
https://positivemh.tistory.com/1337