Download presentation
Presentation is loading. Please wait.
Published byOliver Edwards Modified over 9 years ago
1
G Copyright © 2006, Oracle. All rights reserved. Miscellaneous Topics
2
G-2 Copyright © 2006, Oracle. All rights reserved. Appendix Overview This appendix assists you to: Use bigfile tablespaces for very large databases (VLDB) Describe the row IDs for bigfile tablespaces Use temporary tablespace groups (TTG) for VLDB BFT ROWID TTG
3
G-3 Copyright © 2006, Oracle. All rights reserved. Bigfile Tablespaces: Overview A bigfile tablespace contains a single file. The maximum file size ranges from 8 TB through 128 TB. Tablespaces are logically equivalent to data files. Database Tablespace SMALLFILE Data file BIGFILE Data file
4
G-4 Copyright © 2006, Oracle. All rights reserved. Benefits of Bigfile Tablespaces Significantly increase the storage capacity Simplify data file management for large databases by making tablespaces the main units of disk space administration BFT 1 … 8 EB 4 billion blocks One-to-one mapping BFT n
5
G-5 Copyright © 2006, Oracle. All rights reserved. Bigfile Tablespace: Usage Model BFTs are supported only for locally managed tablespaces using Automatic Segment Space Management. Use BFTs with logical volume managers or Automatic Storage Management. OMF provides complete data file transparency. 800,00016 KB 400,0008 KB 200,0004 KB 100,0002 KB Recommended Maximum Number of Extents Database Block Size
6
G-6 Copyright © 2006, Oracle. All rights reserved. Bigfile Tablespace: Usage Model (notes only slide)
7
G-7 Copyright © 2006, Oracle. All rights reserved. Creating Bigfile Tablespaces
8
G-8 Copyright © 2006, Oracle. All rights reserved. SQL Statement Clauses Tablespace Smallfile Bigfile Data file K | M | G | T Database SMALLFILE | BIGFILE
9
G-9 Copyright © 2006, Oracle. All rights reserved. CREATE DATABASE SET DEFAULT BIGFILE TABLESPACE DATAFILE '/u0/data/system.dbf' SIZE 200M SYSAUX DATAFILE '/u0/data/sysaux.dbf' SIZE 300M SMALLFILE DEFAULT TEMPORARY TABLESPACE stemp_tbs TEMPFILE '/u3/data/stemp_tbs1.dbf' SIZE 60M SMALLFILE UNDO TABLESPACE sundo_tbs DATAFILE '/u2/data/sundo_tbs1.dbf' SIZE 100M; ALTER DATABASE SET DEFAULT BIGFILE TABLESPACE; CREATE BIGFILE UNDO TABLESPACE bundo_tbs DATAFILE '/u1/data/bundo_tbs.dbf' SIZE 1G; ALTER TABLESPACE users RESIZE 2G; ALTER TABLESPACE users AUTOEXTEND ON ; BFTs and SQL Statements: Examples 1 2 3 4 5
10
G-10 Copyright © 2006, Oracle. All rights reserved. Data Dictionary Additions To Support VLDB SELECT property_value FROM database_properties WHERE property_name='DEFAULT_TBS_TYPE'; SELECT tablespace_name, bigfile FROM DBA_TABLESPACES; SELECT name, bigfile FROM V$TABLESPACE;
11
G-11 Copyright © 2006, Oracle. All rights reserved. Extended ROWID Format and BFTs. OOOOOO FFF BBBBBB RRR Smallfile tablespaces Bigfile tablespaces OOOOOO LLL LLLLLL RRR Data object number Relative file number Data block number Row number Data object number Encoded block number Row number DBMS_ROWID.ROWID_BLOCK_NUMBER BFT >ROWID TTG
12
G-12 Copyright © 2006, Oracle. All rights reserved. Extended ROWID Format and BFTs (notes only slide).
13
G-13 Copyright © 2006, Oracle. All rights reserved. VLDB Support: DBMS_ROWID Package SELECT DBMS_ROWID.ROWID_RELATIVE_FNO(ROWID,'BIGFILE') FROM employees; ROWID_BLOCK_NUMBERROWID_RELATIVE_FNO ROWID_INFO TS_TYPE_IN
14
G-14 Copyright © 2006, Oracle. All rights reserved. Temporary Tablespace Group (TTG): Overview Groups multiple temporary tablespaces Characteristics: –At least one temporary tablespace –Same namespace as tablespaces –Created implicitly on first assignment –No explicit deletion Default tablespace EXAMPLE … Default temporary tablespace group TEMP Tablespace TEMP1 Tablespace TEMPn BFT ROWID >TTG
15
G-15 Copyright © 2006, Oracle. All rights reserved. Temporary Tablespace Group: Benefits Enables the use of multiple temporary tablespaces: For the same user in multiple sessions For slave processes in one parallel operation For configuration at database level Temporary tablespace group TEMP Tablespace TEMP1 Tablespace TEMP2 Tablespace TEMP3 Serial Parallel HR
16
G-16 Copyright © 2006, Oracle. All rights reserved. Creating and Maintaining Temporary Tablespace Groups
17
G-17 Copyright © 2006, Oracle. All rights reserved. Temporary Tablespace Group: SQL Examples CREATE TEMPORARY TABLESPACE temp1 TEMPFILE ' tmp1.f ' SIZE 100M TABLESPACE GROUP group1; CREATE TEMPORARY TABLESPACE temp2 TEMPFILE ' tmp2.f ' SIZE 200M TABLESPACE GROUP group2; CREATE TEMPORARY TABLESPACE temp3 TEMPFILE ' tmp3.f ' SIZE 50M TABLESPACE GROUP '' ; 1 2 3
18
G-18 Copyright © 2006, Oracle. All rights reserved. ALTER TABLESPACE temp3 TABLESPACE GROUP group2; ALTER TABLESPACE temp2 TABLESPACE GROUP '' ; ALTER TABLESPACE temp1 TABLESPACE GROUP group2; ALTER DATABASE DEFAULT TEMPORARY TABLESPACE group2; CREATE USER hr IDENTIFIED BY hr DEFAULT TABLESPACE TS1 TEMPORARY TABLESPACE group2; ALTER USER hr TEMPORARY TABLESPACE group2; Temporary Tablespace Group: SQL Examples 1 2 3 4 5 6
19
G-19 Copyright © 2006, Oracle. All rights reserved. Temporary Tablespace Group: SQL Examples (notes only slide)
20
G-20 Copyright © 2006, Oracle. All rights reserved. Summary In this appendix, you should have learned how to: Use bigfile tablespaces for very large databases (VLDB) Describe the row IDs for bigfile tablespaces Use temporary tablespace groups (TTG) for VLDB BFT ROWID TTG
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.