Dropping a Tablespace with BR*Tools

Use

You can use BR*Tools  for Oracle to drop a tablespace.

This section describes how you drop a tablespace with BR*Tools.

For more information on the approach to dropping a tablespace, see Managing Tablespaces.

Procedure

...

       1.      Start the procedure using BRGUI or BRTOOLS, or from the command line:

Ў        BRGUI or BRTOOLS:

                                                  i.       Choose Space Management ® Drop tablespace

BRGUI or BRTOOLS displays the menu BRSPACE options for drop tablespace, where you specify the options with which you call BRSPACE.

                                                ii.       Set the required options:

Menu Entry

Equivalent BRSPACE

Command Option

BRSPACE profile (profile)

-p|-profile

Database user/password (user)

-u|-user

Tablespace name (tablespace)

-f tsdrop -t|-tablespace

Confirmation mode (confirm)

-c|-confirm

Scrolling line count (scroll)

-s|-scroll

Message language (language)

-l|-language

BRSPACE command line (command)

This shows you the BRSPACE -f tsdrop command that is to be executed using the current settings.

                                               iii.       Choose Continue.

BRGUI or BRTOOLS prompts you to start BRSPACE.

                                               iv.       Choose Continue to start BRSPACE.

Ў        Command line

You need to enter at least the following command:

brspace –f tsdrop

You can enter more parameters, including the tablespace name, if required. For more information, see BRSPACE -f tsdrop.

Whichever way you start the procedure – with BRGUI or BRTOOLS, or from the command line – you can take advantage of quick mode if you know the object name, in this case the tablespace name. For more information, see How to Use BR*Tools.

BRSPACE starts and you see a message that includes Start of BRSPACE processing. From now on, BRSPACE writes a detail log.

       2.      If you have already entered the tablespace name, continue with step 5 (quick mode).

BRSPACE displays the Tablespace drop main menu.

       3.      Choose Drop tablespace.

BRSPACE displays the list of tablespaces.

List Entry

Meaning

Pos

List sequence number

Tablespace

Tablespace name

Files/AuExt

Number of data files / number of data files with autoextend

Total [KB]

Total size of all data files of the tablespace

Used[%]

Percentage of space in tablespace that is used

Free [KB]

Amount of space in tablespace that is free

ExtSize [KB]

Maximal size that the tablespace can be autoextended

       4.      Select a tablespace.

BRSPACE displays the menu Options for dropping of tablespace.

       5.      Set the required options:

Menu Entry

Meaning

Number of files in tablespace (files)

– display only

Number of files in the tablespace

Total tablespace size in MB (size)

– display only

Total tablespace size

Force tablespace drop (force)

-f tsdrop -f|-force

SQL command (command)

The SQL command that is to be executed using the current settings. For more information, see your Oracle SQL documentation.

       6.      To start processing with the selected options, choose Continue.

The selected tablespace is only deleted immediately if it is empty (that is, it does not contain any segments).

If the table is not empty, you have to use the option force to immediately delete the tablespace.

Results

Check the results in the BRSPACE logs.

·        The summary log space<DBSID>.logdisplays the return code.

·        The detail log s<encoded timestamp>.tsd displays the details.

·        The structure change log struc<DBSID>.log logs all structure changes.

For more information on how to view the logs with BR*Tools, see Showing Logs and Profiles with BR*Tools.