2020. 1. 22. 12:21 오라클
dbcs dbcli 명령어 테스트
dbcli 명령은 root 사용자로 실행
dbcli 위치는 /opt/oracle/dcs/bin
dbcli 관련 로그는 /opt/oracle/dcs/log/ 이며 dcscli.log 및 dcs-agent.log 파일에 기록 (RMAN 백업및 설정작업도 기록되어 있다)
Virtaul Machine 에서는 안되는 명령어가 있다.
Database 삭제, 생성 테스트를 해 보고 싶었는데 create-database, delete-database 명령어 자체가 없다.
이런 작업들은 BM에서만 되는듯 하다.
참고 : OCI: How to Create Database Using dbcli (문서 ID 2447240.1)
* 아래부터는 dbcli 명령어 확인
- dbcli describe-component
- dbcli describe-component -j
DB 시스템의 서버, 스토리지 및 데이터베이스 홈 구성 요소 설치된 패치 버전과 사용 가능한 패치 버전을 표시한다.
System Version
---------------
19.4.3.0.0
Component Installed Version Available Version
---------------------------------------- -------------------- --------------------
GI 18.6.0.0.190416 18.9.0.0.200114
DB 12.2.0.1.190416 12.2.0.1.200114
{
"systemVersion" : "19.4.3.0.0",
"errorMsg" : null,
"systemComponents" : [ {
"componentType" : "GI",
"systemSubComponents" : [ {
"componentNames" : [ "OraGrid180" ],
"resourceIds" : [ null ],
"installedVersion" : "18.6.0.0.190416",
"availableVersion" : "18.9.0.0.200114"
} ]
}, {
"componentType" : "DB",
"systemSubComponents" : [ {
"componentNames" : [ "OraDB12201_home1" ],
"resourceIds" : [ "aa37600c-4810-4630-a69c-7cb9e7afa2b1" ],
"installedVersion" : "12.2.0.1.190416",
"availableVersion" : "12.2.0.1.200114"
} ]
} ]
}
- dbcli describe-system
DB 시스템에 대한 자세한 내용을 확인
DbSystem Information
----------------------------------------------------------------
ID: 09085fa0-8acc-4731-821d-7afdd104f5f0
Platform: Vmdb
Data Disk Count: 8
CPU Core Count: 1
Created: August 9, 2019 7:05:12 AM UTC
System Information
----------------------------------------------------------------
Name: dd5h22va
Domain Name: sub08060340410.myvcn.oraclevcn.com
Time Zone: UTC
DB Edition: EE
DNS Servers:
NTP Servers: 169.254.169.254
Disk Group Information
----------------------------------------------------------------
DG Name Redundancy Percentage
------------------------- ------------------------- ------------
Data External 100
Reco External 100
- dbcli describe-latestpatch
DB 시스템에 적용 가능한 최신 패치를 표시한다.
componentType availableVersion
--------------- --------------------
gi 12.2.0.1.200114
gi 12.1.0.2.200114
gi 18.9.0.0.200114
gi 19.6.0.0.200114
db 11.2.0.4.200114
db 12.2.0.1.200114
db 12.1.0.2.200114
db 18.9.0.0.200114
db 19.6.0.0.200114
- dbcli list-databases
DB 시스템의 모든 데이터베이스를 나열합니다.
ID DB Name DB Type DB Version CDB Class Shape Storage Status DbHomeID
---------------------------------------- ---------- -------- -------------------- ---------- -------- -------- ---------- ------------ ----------------------------------------
bf3b3e76-b356-4cb0-b3ee-728d1e0f2264 DBCS2 Si 12.2.0.1.190416 true Oltp ASM Configured aa37600c-4810-4630-a69c-7cb9e7afa2b1
- dbcli describe-database -in DBCS2
데이터베이스의 내용을 표시한다.
Database details
----------------------------------------------------------------
ID: bf3b3e76-b356-4cb0-b3ee-728d1e0f2264
Description: DBCS2
DB Name: DBCS2
DB Version: 12.2.0.1.190416
DB Type: Si
DB Edition: EE
DBID: 1025930743
Instance Only Database: false
CDB: true
PDB Name: PDB
PDB Admin User Name: pdbuser
Class: Oltp
Shape:
Storage: ASM
DB Redundancy:
CharacterSet: AL32UTF8
National CharacterSet: AL16UTF16
Language: AMERICAN
Territory: AMERICA
Home ID: aa37600c-4810-4630-a69c-7cb9e7afa2b1
Console Enabled: false
Level 0 Backup Day: Sunday
AutoBackup Enabled: false
BackupConfigId: a9be3371-c664-47b5-a9b2-bdb7928cdacd
Created: August 9, 2019 7:05:13 AM UTC
DB Domain Name: sub08060340410.myvcn.oraclevcn.com
- dbcli list-dbstorages
DB 시스템의 데이터베이스 스토리지를 나열한다.
ID Type DBUnique Name Status
---------------------------------------- ------ -------------------- ----------
f76177e9-69f8-4136-8d01-3582a795feaa Asm DBCS2_icn1bb Configured
- dbcli describe-dbstorage -i f76177e9-69f8-4136-8d01-3582a795feaa
특정 데이터베이스 스토리지 리소스에 대한 자세한 정보를 표시한다.
Database Storage details
----------------------------------------------------------------
ID: f76177e9-69f8-4136-8d01-3582a795feaa
DB Name: DBCS2
DBUnique Name: DBCS2_icn1bb
DB Resource ID: bf3b3e76-b356-4cb0-b3ee-728d1e0f2264
Storage Type: ASM
DATA:
Location: +DATA/DBCS2_icn1bb
Used Space: 4.76GB
Free Space: 245.87GB
REDO:
Location: +RECO/DBCS2_icn1bb
Used Space: 106.53GB
Free Space: 149.33GB
RECO:
Location: +RECO/DBCS2_icn1bb
Used Space: 106.53GB
Free Space: 149.33GB
State: ResourceState(status=Configured)
Created: August 9, 2019 7:05:13 AM UTC
UpdatedTime: August 9, 2019 7:31:48 AM UTC
- dbcli list-jobs
작업 ID, 상태 및 작업을 포함하는 작업 목록을 표시한다.
ID Description Created Status
---------------------------------------- --------------------------------------------------------------------------- ----------------------------------- ----------
84dd4c12-2663-4108-a275-7a9bb9147c17 Authentication key update for DCS_ADMIN August 9, 2019 7:02:22 AM UTC Success
2b55f226-7a80-4535-ab56-d53581be97a0 Provisioning service creation August 9, 2019 7:05:15 AM UTC Success
cf41198d-d971-4c16-bd24-7928693eced0 SSH keys update August 9, 2019 7:57:31 AM UTC Success
beb8b631-8a4a-4613-8ed3-e3de76507c26 SSH key delete August 9, 2019 7:59:14 AM UTC Success
12bc0f65-8548-4094-b0db-357b92d3ebd0 create object store:bAvQEfNSs316kM6cUzEN August 19, 2019 7:50:42 AM UTC Success
f3bf7ebe-5e58-49c6-868e-37895c00dc4a create backup config:bAvQEfNSs316kM6cUzEN_BC August 19, 2019 7:51:39 AM UTC Success
95492b6f-4fd1-4e61-9974-727c412c04f4 update database : DBCS2 August 19, 2019 7:53:19 AM UTC Success
52acaedc-8c18-4a03-a5f5-83998fe61f1f Create Longterm Backup with TAG-DBTLongterm1566200196399oro for Db:DBCS2 in OSS:bAvQEfNSs316kM6cUzEN August 19, 2019 7:57:25 AM UTC Success
90ecfb59-bfb8-436c-979b-aada00c8a7aa Delete Backup for Database name: DBCS2_icn1bb January 21, 2020 5:02:17 AM UTC Success
- dbcli describe-job -i 2b55f226-7a80-4535-ab56-d53581be97a0
특정 작업에 대한 세부 정보를 표시한다.
Task Name Start Time End Time Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Configuring HugePage For VMDB August 9, 2019 7:05:16 AM UTC August 9, 2019 7:05:16 AM UTC Success
Checking the ipAddress August 9, 2019 7:05:17 AM UTC August 9, 2019 7:05:17 AM UTC Success
Setting up Network August 9, 2019 7:05:17 AM UTC August 9, 2019 7:05:17 AM UTC Success
OS usergroup 'asmdba'creation August 9, 2019 7:05:17 AM UTC August 9, 2019 7:05:17 AM UTC Success
OS usergroup 'asmoper'creation August 9, 2019 7:05:17 AM UTC August 9, 2019 7:05:17 AM UTC Success
OS usergroup 'asmadmin'creation August 9, 2019 7:05:17 AM UTC August 9, 2019 7:05:17 AM UTC Success
OS usergroup 'dba'creation August 9, 2019 7:05:17 AM UTC August 9, 2019 7:05:18 AM UTC Success
OS usergroup 'dbaoper'creation August 9, 2019 7:05:18 AM UTC August 9, 2019 7:05:18 AM UTC Success
OS usergroup 'oinstall'creation August 9, 2019 7:05:18 AM UTC August 9, 2019 7:05:18 AM UTC Success
OS user 'grid'creation August 9, 2019 7:05:18 AM UTC August 9, 2019 7:05:18 AM UTC Success
OS user 'oracle'creation August 9, 2019 7:05:18 AM UTC August 9, 2019 7:05:18 AM UTC Success
SSH equivalance setup August 9, 2019 7:05:19 AM UTC August 9, 2019 7:05:19 AM UTC Success
Storage discovery August 9, 2019 7:05:20 AM UTC August 9, 2019 7:09:05 AM UTC Success
disk creation August 9, 2019 7:09:05 AM UTC August 9, 2019 7:09:46 AM UTC Success
Local disk creation August 9, 2019 7:09:46 AM UTC August 9, 2019 7:09:50 AM UTC Success
Updating Disk Affinity August 9, 2019 7:09:50 AM UTC August 9, 2019 7:09:50 AM UTC Success
Grid home creation August 9, 2019 7:09:50 AM UTC August 9, 2019 7:14:22 AM UTC Success
Creating GI home directories August 9, 2019 7:09:50 AM UTC August 9, 2019 7:09:50 AM UTC Success
Cloning Gi home August 9, 2019 7:09:50 AM UTC August 9, 2019 7:14:15 AM UTC Success
Updating GiHome version August 9, 2019 7:14:15 AM UTC August 9, 2019 7:14:22 AM UTC Success
Grid stack creation August 9, 2019 7:14:22 AM UTC August 9, 2019 7:30:04 AM UTC Success
Configuring GI August 9, 2019 7:14:22 AM UTC August 9, 2019 7:14:51 AM UTC Success
Running GI root scripts August 9, 2019 7:14:51 AM UTC August 9, 2019 7:25:24 AM UTC Success
Running GI config assistants August 9, 2019 7:25:26 AM UTC August 9, 2019 7:26:23 AM UTC Success
Disk group 'RECO'creation August 9, 2019 7:30:11 AM UTC August 9, 2019 7:30:27 AM UTC Success
Volume 'commonstore'creation August 9, 2019 7:30:27 AM UTC August 9, 2019 7:31:26 AM UTC Success
ACFS File system 'DATA'creation August 9, 2019 7:31:26 AM UTC August 9, 2019 7:31:48 AM UTC Success
Database home creation August 9, 2019 7:31:48 AM UTC August 9, 2019 7:38:08 AM UTC Success
Validating dbHome available space August 9, 2019 7:31:48 AM UTC August 9, 2019 7:31:48 AM UTC Success
Creating DbHome Directory August 9, 2019 7:31:48 AM UTC August 9, 2019 7:31:48 AM UTC Success
Extract DB clones August 9, 2019 7:31:48 AM UTC August 9, 2019 7:34:32 AM UTC Success
Clone Db home August 9, 2019 7:34:32 AM UTC August 9, 2019 7:37:06 AM UTC Success
Enable DB options August 9, 2019 7:37:06 AM UTC August 9, 2019 7:37:36 AM UTC Success
Run Root DB scripts August 9, 2019 7:37:36 AM UTC August 9, 2019 7:37:37 AM UTC Success
Database creation task August 9, 2019 7:38:08 AM UTC August 9, 2019 7:38:08 AM UTC Success
Database Creation August 9, 2019 7:38:08 AM UTC August 9, 2019 7:51:45 AM UTC Success
Change permission for xdb wallet files August 9, 2019 7:51:45 AM UTC August 9, 2019 7:51:45 AM UTC Success
Update Database Password Profile August 9, 2019 7:51:45 AM UTC August 9, 2019 7:51:48 AM UTC Success
Add Startup Trigger to Open all PDBS August 9, 2019 7:51:48 AM UTC August 9, 2019 7:51:50 AM UTC Success
Place SnapshotCtrlFile in sharedLoc August 9, 2019 7:51:50 AM UTC August 9, 2019 7:51:54 AM UTC Success
SqlPatch upgrade August 9, 2019 7:53:15 AM UTC August 9, 2019 7:54:34 AM UTC Success
Running Password Management Policy August 9, 2019 7:54:34 AM UTC August 9, 2019 7:54:36 AM UTC Success
Running dbms_stats init_package August 9, 2019 7:54:36 AM UTC August 9, 2019 7:54:40 AM UTC Success
updating the Database version August 9, 2019 7:54:40 AM UTC August 9, 2019 7:54:45 AM UTC Success
TDE configuration August 9, 2019 7:54:45 AM UTC August 9, 2019 7:56:10 AM UTC Success
Wallet creation August 9, 2019 7:54:46 AM UTC August 9, 2019 7:54:50 AM UTC Success
Opening wallet August 9, 2019 7:54:50 AM UTC August 9, 2019 7:54:51 AM UTC Success
Closing wallet August 9, 2019 7:54:56 AM UTC August 9, 2019 7:54:57 AM UTC Success
users tablespace creation August 9, 2019 7:56:10 AM UTC August 9, 2019 7:56:21 AM UTC Success
Network security configuration August 9, 2019 7:56:21 AM UTC August 9, 2019 7:56:21 AM UTC Success
Updating NetSec Rules August 9, 2019 7:56:21 AM UTC August 9, 2019 7:56:21 AM UTC Success