Show TOC

Altering Tables with BR*ToolsLocate this document in the navigation structure

Context

You can use BR*Tools for Oracle to alter tables as follows:

  • Switch on table monitoring

  • Switch off table monitoring

  • Set parallel degree

  • Shrink tables (Oracle 10g or higher)

    Note
    • This section describes how you alter tables with BR*Tools.

      For more information on the approach to altering tables, see Segment Management.

    • Only BasicFile LOBs are shrunk while shrinking tables.

Procedure


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

    • BRGUI or BRTOOLS:

      1. Choose Start of the navigation path Segment Management Next navigation step Alter tables. End of the navigation path

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

      2. Set the required options:

        Menu Entry

        Equivalent BRSPACE Command Option

        BRSPACE profile (profile)

        -p|-profile

        Database user/password (user)

        -u|-user

        Alter table action (action)

        -f tbalter -a|-action

        Tablespace names (tablespace)

        -f tbalter -s|-tablespace

        Table owner (owner)

        -f tbalter -o|-owner

        Table names (table)

        -f tbalter -t|-table

        Confirmation mode (confirm)

        -c|-confirm

        Extended output

        -o|-output

        Scrolling line count (scroll)

        -s|-scroll

        Message language (language)

        -l|-language

        BRSPACE command line (command)

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

        Note

        If required, in Table names you can enter the names of multiple tables. You can also use wildcards. For more information, see “Selecting Objects” in Segment Management with BR*Tools.

        In Tablespace names and Table owner, you can specify multiple objects but you cannot use wildcards. BRSPACE processes all the tables in the specified tablespace name(s) or all tables belonging to the specified table owner(s). But these entries and alter action entry are optional.

      3. Choose Continue.

        BRGUI or BRTOOLS prompts you to start BRSPACE.

      4. Choose Continue to start BRSPACE.

    • Command line:

      Enter at least the following command:

      brspace -f tbalter

      You can enter more parameters, including the table names and action, if required. For more information, see BRSPACE -f tbalter.

      Note

      Whichever way you start the procedure - with BRGUI or BRTOOLS, or from the command line - you can use quick mode if you know the final object names, in this case the table names. 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.

    BRSPACE displays the Alter tables main menu.

  2. You can use quick mode as follows:

    • If you have already entered the action, continue with step 4.

    • If you have already entered the table names and action, continue with step 6.

    Note

    If you have entered multiple tables, BRSPACE displays as confirmation a List of tables for alter. If you have not already made a final selection, you can make a selection from this list.

    Continue with step 6 (quick mode).

  3. Choose or confirm the required action:

    • Switch on table monitoring

    • Switch off table monitoring

    • Set parallel degree

    • Shrink table segment

    • Create table segment

    • Drop table segment

  4. If you have already entered the table names, continue with step 6 (quick mode).

    BRSPACE displays the table list:

    List Entry

    Meaning

    Pos.

    List sequence number

    Owner

    Table owner

    Table

    Table name

    Part.

    Partitioned

    Parts

    Number of partitions

    Monit.

    Table monitoring setting

    Paral.

    Parallel degree

    Note

    BRSPACE only displays the tables that can be processed by your chosen action.

    For example, if you choose Switch off table monitoring, only the tables that currently have table monitoring on are displayed.

  5. Select a table or multiple tables.

    Example

    These examples only apply to input in character mode.

    To select the first three tables in the list, enter 1-3.

    To select the first and third tables, enter 1,3.

    To select the first three tables and the fifth, enter 1-3,5.

    To select all tables, enter 0.

    BRSPACE displays the menu Options for alter of tables.

  6. Set the required options:

    Menu Entry

    Meaning

    Current monitoring status (currmonit)

    - display only

    Current monitoring status of the table

    Current parallel degree (currdeg)

    - display only

    Current parallel degree of the table

    Alter table action (action)

    - display only

    The action that you selected above

    New parallel degree (degree)

    -f tbalter -d|-degree

    SQL command line (command)

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

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

Results

Check the results in the BRSPACE logs BRSPACE Logs.

  • The summary log space<DBSID>.log displays the return code.

  • The detail log s<encoded timestamp>.tba displays the details.

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