|
Oracle Home |
|
Home > Oracle Database Administration (DBA) > Maintenance > Managing Tablespaces and Datafiles |
|
Oracle Database 10g Administration (DBA): Maintenance |
|---|
Managing Tablespaces and Datafiles |
|
Tablespaces & Datafiles: Overview
Data for Oracle tables, indexes, etc is stored in data files, but never when an object is defined, the object is associated with a file directly. All the time the Oracle objects are "located" in the tablespaces. The "tablespaces" are logical concepts and each tablespace is in relation with one or more physical file. So, when an object is created in a tablespace, the data will be stored automatically in the file(s) associated with this tablespace.
=> Data tablespace (created for data objects like tables, materialized view, indexes)
ALTER TABLESPACE DATA_1_TBSADD DATAFILE 'c:\oradata\data_file2.dbf' SIZE 30M AUTOEXTEND OFF;
To get more information on the files which are associated with a tablespace the following query could be used:
SELECT TABLESPACE_NAME, FILE_NAME, FILE_ID, AUTOEXTENSIBLE, ONLINE_STATUSFROM DBA_DATA_FILES ORDER BY 1;
Remove a file from a tablespace (Resizing a tablespace)
Removing a file from a tablespace cannot be done directly. First, the objects must be moved in another tablespace, the initial tablespace will be dropped and recreated. After that the objects could be moved again in the tablespace which was resized. If the reason you wanted to drop the file is because you mistakenly created the file of the wrong size, then consider using the RESIZE command.
More information about this subject ( Managing Tablespaces and Datafiles ) you can get from www.in-oracle.com
|
|
Home > Oracle Database Administration (DBA) > Maintenance > Managing Tablespaces and Datafiles |
|
Different Romanian Links/ Linkuri romanesti diferite |
Disclaimer: The views expressed on this web site are my own and do not reflect the views of Oracle Corporation. You may use the information from this site only at your risk. Copyright (c) 2009-2011 Paul Catalin Tomoiu. All rights reserved.