Use
You can use SAPDBA for Oracle to create or drop a tablespace. The SAP System can be either active or closed when you create or drop a tablespace.
You need not shut down the database system if you want to create or drop a tablespace.
Prerequisites
For more information, see
Procedure
Creating a Tablespace
SAPDBA validates the name you choose, making sure that it conforms to SAP naming conventions.
SAPDBA shows a new menu for creating the tablespace.
SAPDBA proposes a path and size for the new data file. It also displays the details of the file system or raw device and its free space, as in the following example for a file system:
New path: '/oracle/LMA/sapdata1/btabd_2/btabd.data2'
New size: 121624 K
File system: '/dev/dsk/c1t1d0s2'
Free space: 121624 K
You can only change the path, not the data file name. In the above example, you could change
/oracle/LMA/sapdata .For more information, see
Specifying the Path for the New Data File.For more information, see
Specifying the Size for the New Data File.SAPDBA displays default values for the new data file, as shown above for the first new data file.
SAPDBA prompts you for the incremental and maximum file sizes used in automatic table extension:
SAPDBA displays the default values, such as in the following example:
a – |
INITIAL |
16 K |
b – |
NEXT |
40 K |
c – |
MINEXTENTS |
1 |
d – |
MAXEXTENTS |
100 |
e – |
PCTINCREASE |
0 |
For more information on the parameters, see the Oracle documentation.
SAPDBA checks that that there is enough space to add the new data file, showing a display like the following:
SAPDBA: Checking space for data file of tablespace
-------------------------------------------------------------
File system : '/dev/dsk/c1t1d0s2'
Current free space : + 20792 K
New data files : - 1600 K
Left free space : = + 19192 K -> O.K.
-------------------------------------------------------------
SAPDBA also performs some other checks before adding the file. For more information, see
Checks for Tablespace Extension and Creation.SAPDBA adds the new data file(s) to create the tablespace and also generates a log,
<timestamp>.ext . You can check this log to verify that the tablespace creation was successful.SAPDBA creates a directory or a symbolic link for the data file. The control files (old and new) are backed up under the directory
<timestamp> belonging to the log file <timestamp>.ext . SAPDBA then creates the data file using CREATE TABLESPACE WITH <tablespace details> . If any of these operations fail, SAPDBA stops immediately.If SAPDBA cannot add the new data file, it deletes the corresponding directory or symbolic link and cancels the tablespace creation. Your system and database are unchanged. Use the Oracle ALERT and trace files to analyze and correct the problem, then repeat the tablespace creation.
When SAPDBA has successfully created the new data file, it automatically goes to the Backup database menu, so that you can back up the new tablespace.
Dropping a Tablespace
SAPDBA displays information about the tablespace, such as in the following example:
Tablespace PSAPBTABD consists of
3 files (total size 436384 K)
SAPDBA checks that the tablespace is empty and drops it.
If SAPDBA cannot drop the tablespace, use the Oracle ALERT and trace files to analyze and correct the problem, then repeat the tablespace drop.