Entering content frameProcedure documentation Extending a Tablespace Locate the document in its SAP Library structure

Use

You can use SAPDBA for Oracle to extend a tablespace, that is, add a data file. The SAP System can be either active or closed when you extend a tablespace.

You need not shut down the database system if you want to add a data file to a tablespace.

Note

Instead of adding a new data file to extend a tablespace, you can also use SAPDBA to:

Prerequisites

Procedure

  1. Choose Tablespace Administration ® Tablespace and enter the name of the tablespace that you want to extend by adding a data file.
  2. Choose Alter tablespace <tablespace name> add data file.
  3. SAPDBA shows a new menu for altering 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.

    Example

    New path: '/oracle/LMA/sapdata1/btabd_2/btabd.data2'

    New size: 121624 K

     

    File system: '/dev/dsk/c1t1d0s2'

    Free space: 121624 K

  4. To show the details of existing data files, choose Show existing data files.
  5. SAPDBA displays the details of the file (or files), including its sequence number, size, and full name with path. For example:

    # Size in K Data file name (file system)

    -- --------- ------------------------------------------------------------

    1 335656 /oracle/LMA/sapdata1/btabd_1/btabd.data1 (/dev/dsk/c1t1d0s2)

  6. To change the path for the new data file, choose New path, Select new path from a list of file systems, or Select new path from a list of raw devices.
  7. 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.

  8. To change the size for the new data file, choose New Size and enter the size in bytes, kilobytes, megabytes, gigabytes, or terabytes.
  9. For more information, see Specifying the Size for the New Data File.

  10. To add more than one new data file, do the following:
    1. Choose Define more than one new data file and select the next free entry.
    2. SAPDBA displays default values for the new data file, as shown above for the first new data file.

    3. Accept the default values or change them as required.
  1. To set Autoextend from the default OFF to ON, do the following:
    1. Choose Autoextend.

SAPDBA prompts you for the incremental and maximum file sizes used in automatic table extension:

    1. Enter the incremental and maximum file sizes.
  1. Choose Start to begin adding the data file.
  2. SAPDBA checks that that there is enough space to add the new data file, showing a display like the following:

    Example

    SAPDBA: Checking space for data files of tablespace

    -------------------------------------------------------------

    File system : '/dev/dsk/c1t1d0s2'

    Current free space : + 20856 K

    New data files : - 56 K

    Left free space : = + 20800 K -> O.K.

    -------------------------------------------------------------

    SAPDBA also performs some other checks before adding the file. For more information, see Checks for Tablespace Extension and Creation.

  3. Enter RETURN to add the data file(s).
  4. SAPDBA adds the new data file(s) to extend the tablespace and also generates a log, <timestamp>.ext . You can check this log to verify that the tablespace extension 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 with ALTER TABLESPACE ADD DATAFILE . If any of these operations fail, SAPDBA stops immediately.

    Note

    If SAPDBA cannot add the new data file, it deletes the corresponding directory or symbolic link and cancels the tablespace extension. Your system and database are unchanged. Use the Oracle ALERT and trace files to analyze and correct the problem, then repeat the tablespace extension.

    When SAPDBA has successfully created the new data file, it automatically goes to the Backup database menu, so that you can back up the extended tablespace.

  5. Be sure to back up the extended tablespace. For more information, see Backing Up After Tablespace Operations.

 

 

Leaving content frame