OCM_Session1_5_TablespaceCreationandConfigurationnote(四)

2014-11-24 16:37:19 · 作者: · 浏览: 1
-------------------------------- NLS_NCHAR_CONV_EXCP FALSE NLS conversion exception NLS_NCHAR_CHARACTERSET AL16UTF16 NCHAR Character set NLS_RDBMS_VERSION 10.2.0.1.0 RDBMS version for NLS parameters GLOBAL_DB_NAME PROD Global database name EXPORT_VIEWS_VERSION 8 Export views revision #
27 rows selected.
SQL>



5.2 Create a permanent tablespace to store sample test data. Use the following specifications: 5.2.1 Tablespace name of EXAMPLE 5.2.2 Initial datafile size of 400MB with the file expectd to grow to 4TB. 5.2.3 Initial extent size of 1MB 5.2.4 next extent size of 1MB
参考联机文档: Administrator's Guide ==> Managing Tablespaces==>Creating a Bigfile Tablespace http://docs.oracle.com/cd/B19306_01/server.102/b14231/tspaces.htm#i1010733

Creating a Bigfile Tablespace

To create a bigfile tablespace, specify the BIGFILE keyword of the CREATE TABLESPACE statement (CREATE BIGFILE TABLESPACE ...). Oracle Database automatically creates a locally managed tablespace with automatic segment space management. You can, but need not, specify EXTENT MANAGEMENT LOCAL and SEGMENT SPACEMANAGEMENT AUTO in this statement. However, the database returns an error if you specify EXTENT MANAGEMENT DICTIONARY or SEGMENT SPACE MANAGEMENT MANUAL. The remaining syntax of the statement is the same as for the CREATE TABLESPACE statement, but you can only specify one datafile. For example:

CREATE BIGFILE TABLESPACE bigtbs DATAFILE '/u02/oracle/data/bigtbs01.dbf' SIZE 50G ...

You can specify SIZE in kilobytes (K), megabytes (M), gigabytes (G), or terabytes (T).

If the default tablespace type was set to BIGFILE at database creation, you need not specify the keyword BIGFILE in the CREATE TABLESPACE statement. A bigfile tablespace is created by default.

If the default tablespace type was set to BIGFILE at database creation, but you want to create a traditional (smallfile) tablespace, then specify a CREATESMALLFILE TABLESPACE statement to override the default tablespace type for the tablespace that you are creating.

操作如下:

SQL> create bigfile tablespace example datafile '/u01/app/oracle/oradata/PROD/Disk1/example01.dbf' size 400m 2 autoextend on next 1m maxsize 4t extent management local uniform size 1m;
Tablespace created.



5.3 Create a permanent tablespace to store indexes, Use the following specifications: 5.3.1 Tablespace name of INDX 5.3.2 File size of 40MB
参考联机文档: Administrator's Guide ==> Managing Tablespaces==>Creating a Locally Managed Tablespace
操作如下:
SQL> create tablespace indx datafile '/u01/app/oracle/oradata/PROD/Disk1/indx01.dbf' size 40m;
Tablespace created.



5.4 Create a permanent tablespace to store data collected from various Oracle tools. Use the following specifications: 5.4.1 Tablespace name of TOOLS 5.4.2 File size of 10MB 操作如下:
SQL> create tablespace tools datafile '/u01/app/oracle/oradata/PROD/Disk1/tools01.dbf' size 10m;
Tablespace created.




5.5 Create a default permanent tablespace using the following specifications: 5.5.1 Tablespace name of USERS 5.5.2 File size of 48MB 5.5.3 Initial extent size of 4MB 5.5.4 Next extent size of 4MB
操作如下:
SQL> create tablespace users datafile '/u01/app/oracle/oradata/PROD/Disk1/users01.dbf' size 48m 2 extent management local uniform size 4m;
Tablespace created.
SQL> alter database default tablespace users;
Database altered.

SQL> select * from DATABASE_PROPERTIES;
PROPERTY_NAME PROPERTY_VALUE DESCRIPTION --