본문 바로가기

Database

(237)
21 - [Oracle 19C] Dynamic Performance Views(v$ views) show con_name /* CON_NAME ------------------------------ CDB$ROOT */ --show pdbs alter pluggable database orclpdb open; /* */ alter session set container=orclpdb /* Session altered. */ show con_name /* CON_NAME ------------------------------ ORCLPDB */ select oracle_username, os_user_name, locked_mode, object_name, object_type from v$locked_object a,dba_objects b where a.object_id = b.object_id;..
20 - [Oracle 19C] Common users VS local users • A CDB common user is a database account that is created in the root container and is inherited by all PDBs in the CDB, including future PDBs • A common user can not have the same name as any local user across all the PDBs. • Oracle supplied administrative accounts such SYS user and system user are common user. • You can create common user , but you need user defined prefix C## , example C##KHA..
19 - [Oracle 19C] Oracle Data Dictionary • Oracle data dictionary is the metadata about the database . • The data dictionary is structured in tables and views. • Is maintained by oracle database server . • Is owned by SYS user. • Should never modified direct using SQL . CDB_ & DBA_ Restricted to DBA accounts Users that have : Sysdba privileg Select any dictionary privilege SELECT_CATALOG_ROLE role ALL_ & USER_ available to any user sho..
18 - [Oracle 19C] saving and running scripts sqlplus 에서 스크립트 저장 및 실행하는 방법 [oracle@test ~]$ sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Wed Nov 15 22:57:10 2023 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> select instance_name from v$instance; INSTANCE_NAME ---------------- orcl SQL> ..
17 - [Oracle 19C] unlock the HR schema To unlock the HR schema in the pluggable database SQL> startup; ORACLE instance started. Total System Global Area 1526723608 bytes Fixed Size 9135128 bytes Variable Size 889192448 bytes Database Buffers 620756992 bytes Redo Buffers 7639040 bytes Database mounted. Database opened. SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2..
16 - [Oracle 19C] connecting using tnsnames.ora 파일위치 : /u01/app/oracle/product/19/db_1/network/admin/tnsnames.ora # tnsnames.ora Network Configuration File: /u01/app/oracle/product/19/db_1/network/admin/tnsnames.ora # Generated by Oracle configuration tools. LISTENER_ORCL = (ADDRESS = (PROTOCOL = TCP)(HOST = test.com)(PORT = 1521)) ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = test.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDIC..
15 - [Oracle 19C] Easy connect method 오라클이 설치된 서버에서 접속하는 방법 # 다양한 방법/옵션으로 접속 SQL> conn sys/Manager123# as sysdba Connected. SQL> conn sys/Manager123#@test.com/orcl.com as sysdba Connected. SQL> conn sys/Manager123#@test.com/orclpdb.com as sysdba Connected. SQL> exit Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0 [oracle@test ~]$
14 - [Oracle 19C] Pluggable database - open, save [oracle@test ~]$ sqlplus / as sysdbaSQL*Plus: Release 19.0.0.0.0 - Production on Wed Nov 15 12:52:25 2023Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle. All rights reserved.Connected to an idle instance.SQL> startup;ORACLE instance started.Total System Global Area 1526723608 bytesFixed Size 9135128 bytesVariable Size 889192448 bytesDatabase Buffers 620756992 bytesRedo Buffers ..