반응형
테스트 하던 DB2의 라이센스 기간이 지나서 start가 되지 않는 상황이 발생.
삭제하고 재설치하는게 빠를거 같아서 삭제할때 썼던 스크립트를 정리하는 글을 작성해봅니다.
삭제는 세가지를 해야합니다.
1.인스턴스
2.DB엔진
3.유저
순서도 인스턴스 -> DB엔진 -> 유저 순으로 삭제하면 됩니다.
1.인스턴스 삭제
$./db2/db2test/bin/db2ilist
db2test
db2lds
--첫번째 인스턴스 삭제
$ ./db2/db2test/instance/db2idrop db2test
DBI1446I The db2idrop command is running.
DB2 installation is being initialized.
Total number of tasks to be performed: 2
Total estimated time for all tasks to be performed: 305 second(s)
Task #1 start
Description: Initializing instance list
Estimated time 5 second(s)
Task #1 end
Task #2 start
Description: Configuring DB2 instances
Estimated time 300 second(s)
Task #2 end
The execution completed successfully.
For more information see the DB2 installation log at
"/tmp/db2idrop.log.41222436".
DBI1070I Program db2idrop completed successfully
--2번쨰 인스턴스 삭제
$ ./db2/db2test/instance/db2idrop db2lds
DBI1446I The db2idrop command is running.
DB2 installation is being initialized.
Total number of tasks to be performed: 2
Total estimated time for all tasks to be performed: 305 second(s)
Task #1 start
Description: Initializing instance list
Estimated time 5 second(s)
Task #1 end
Task #2 start
Description: Configuring DB2 instances
Estimated time 300 second(s)
Task #2 end
The execution completed successfully.
For more information see the DB2 installation log at
"/tmp/db2idrop.log.37617996".
DBI1070I Program db2idrop completed successfully.
2.DB엔진 삭제
$ ./db2/db2test/install/db2_deinstall -a
DBI1016I Program db2_deinstall is performing uninstallation. Please
wait.
The execution completed with warnings.
For more information see the DB2 uninstallation log at
"/tmp/db2_deinstall.log.48627984".
3.유저 삭제
삭제해야할 유저목록
db2lds:!:227:203::/home/db2lds:/usr/bin/ksh
db2test:!:222:203::/home/db2test:/usr/bin/ksh
db2fenc1:*:223:204::/home/db2fenc1:/usr/bin/ksh
db2inst1:!:207:1::/db2/home/db2inst1:/usr/bin/ksh
dasusr1:*:224:205::/home/dasusr1:/usr/bin/ksh
삭제
userdel -r db2lds
userdel -r db2test
userdel -r db2fenc1
userdel -r db2inst1
userdel -r dasusr1
Deinstall 완료
반응형
'다른 DBMS > DB2' 카테고리의 다른 글
[DB2] Online 백업&복구 시나리오 테스트 (0) | 2023.03.16 |
---|---|
[DB2] 아카이브 모드 변경과 SQL1116N(database is in BACKUP PENDING state) 에러 해결 (0) | 2023.03.16 |
[DB2] 다른유저가 SYSADM_GROUP 권한을 가지면 DB 관리 권한이 있을까? (0) | 2022.12.10 |
[AIX7] DB2 11.1.4 설치하기 (0) | 2022.12.09 |
버전 확인하기 (0) | 2022.12.08 |
댓글