Pro Oracle SQL Development by Jon Heller

Pro Oracle SQL Development by Jon Heller

Author:Jon Heller
Language: eng
Format: epub
ISBN: 9781484245170
Publisher: Apress


Tablespaces

Tablespaces are logical collections of segments and have one or more data files. Tablespaces are used to group together storage, typically for an application or specific type of data.

Every object with permanent data can be assigned to a different tablespace. But we don’t want to have to worry about the tablespace for every table. The simplest way to manage storage is to create one tablespace per user, and let every object in that schema use the default tablespace. Managing the database is easier with fewer tablespaces. The more tablespaces we have, the more likely one of our tablespaces will run out of space and break things. On the other hand, we don’t want to use only one tablespace; a runaway application could fill up the tablespace and break the entire database.

Many utilities and features can work per tablespace, such as data pump import and export, backup, and transportable tablespaces. Transportable tablespaces let us copy and paste data files between servers, to quickly move data. If we have a set of large tables that we want to frequently copy, it may help to isolate those tables in a tablespace.

Oracle comes with the default tablespaces SYSTEM, SYSAUX, USERS, UNDOTBS1, and TEMP. The SYSTEM and SYSAUX tablespaces are for system-generated objects, and we should avoid storing anything in these tablespaces. When a tablespace is full, the application that writes to that tablespace is going to break; if SYSTEM or SYSAUX is full, the entire database breaks. The USERS tablespace is helpful for ad hoc users, but shouldn’t be shared with applications. UNDOTBS1 unsurprisingly holds undo data, as described earlier in this chapter. The TEMP tablespace will be discussed later in this chapter.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.