본문 바로가기

분류 전체보기

(657)
87 - [Oracle 19C] Segments, Extents, Blocks Segments, Extents, Blocks show user /* USER is "PDB10_ADMIN" */ show con_name /* CON_NAME ------------------------------ PDB10 */ create tablespace ts1; /* Tablespace TS1 created. */ # 오라클에서 자동으로 설정되는 옵션들은 아래와 같다 SELECT DBMS_METADATA.GET_DDL('TABLESPACE','TS1') FROM dual; /* CREATE TABLESPACE "TS1" DATAFILE SIZE 104857600 AUTOEXTEND ON NEXT */ /* CREATE TABLESPACE "TS1" DATAFILE SIZE 104857600 A..
86 - [Oracle 19C] Moving and Renaming Online Data Files Moving and Renaming Online Data Files show user /* USER is "PDB10_ADMIN" */ show con_name /* CON_NAME ------------------------------ PDB10 */ create tablespace t4 DATAFILE '/u01/app/oracle/oradata/ORCL/PDB10/t4_01.dbf' size 5m; /* Tablespace T4 created. [oracle@test PDB10]$ pwd /u01/app/oracle/oradata/ORCL/PDB10 [oracle@test PDB10]$ ll 합계 960900 drwxr-x--- 3 oracle oinstall 63 12월 11 17:07 ORCL ..
85 - [Oracle 19C] Alter tablespace and datafile Alter tablespace and datafile show user; /* USER is "PDB10_ADMIN" */ show con_name; /* CON_NAME ------------------------------ PDB10 */ [oracle@test datafile]$ pwd /u01/app/oracle/oradata/ORCL/PDB10/ORCL/0BD9769D27CD39DCE063E102A8C059FB/datafile [oracle@test datafile]$ ll 합계 102408 -rw-r----- 1 oracle oinstall 104865792 12월 11 16:05 o1_mf_t1_lqg7x03o_.dbf create tablespace t3; /* Tablespace T3 c..
84 - [Oracle 19C] Managing tablespace using SQL developer wizard CREATE SMALLFILE TABLESPACE TS2 DATAFILE '/u01/app/oracle/oradata/ORCL/PDB10/TS2_01.DBF' SIZE 104857600 AUTOEXTEND ON DEFAULT NOCOMPRESS ONLINE SEGMENT SPACE MANAGEMENT AUTO EXTENT MANAGEMENT LOCAL AUTOALLOCATE; CREATE SMALLFILE TABLESPACE TABLESPACE_TEST DATAFILE '/u01/app/oracle/oradata/ORCL/PDB10/ORCL/TABLESPACE_TEST_01.DBF' SIZE 104857600 AUTOEXTEND ON DEFAULT NOCOMPRESS ONLINE SEGMENT SPACE..
83 - [Oracle 19C] Create permanent tablespace - example Create permanent tablespace - example SHOW USER /* USER is "PDB10_ADMIN" */ SHOW CON_NAME /* CON_NAME ------------------------------ PDB10 */ create tablespace t1; /* 테이블 스페이스의 용도를 정하지 않으면 에러가 발생한다. Error starting at line : 15 in command - create tablespace t1 Error report - ORA-02199: missing DATAFILE/TEMPFILE clause 02199. 00000 - "missing DATAFILE/TEMPFILE clause" *Cause: A CREATE TABLESPACE ..
82 - [Oracle 19C] Helpful queries for tablespace SQL> conn pdb10_admin/Manager123#@pdb10 Connected. SQL> show user USER is "PDB10_ADMIN" SQL> show con_name CON_NAME ------------------------------ PDB10 SQL> select * from database_properties where property_name in ('GLOBAL_DB_NAME','DEFAULT_PERMANENT_TABLESPACE','DEFAULT_TEMP_TABLESPACE'); /* PROPERTY_NAME PROPERTY_VALUE DESCRIPTION ------------------------------ -------------------- ----------..
81 - [Oracle 19C] Grant PDB admin - example -- grant PDB admin -- create new PDB or choose any PDB to test SQL> show user USER is "SYS" SQL> show con_name CON_NAME ------------------------------ CDB$ROOT SQL> alter session set container=pdb10; Session altered. SQL> show con_name CON_NAME ------------------------------ PDB10 SQL> grant create session, dba to pdb10_admin; Grant succeeded. -- login as pdb10_admin [oracle@test ~]$ sqlplus pdb..
79 - [Oracle 19C] How table data is stored  If an entire row can be inserted into a single data block, then Oracle stores the row as one row piece.  if all of a row's data cannot be inserted into a single data block or if an update to an existing row causes the row to outgrow its data block, then Oracle stores the row using multiple row pieces  A data block usually contains only one row piece for each row.  When Oracle must store a r..