Altering a Data File with BR*Tools

Use

You can use BR*Tools  for Oracle to alter a data file as follows:

·        Set data file online

·        Set data file offline

·        Switch on and maintain autoextend

·        Switch off autoextend

·        Resize data file

This section describes how you alter a data file with BR*Tools.

For more information on the approach to altering a data file, see Managing Data Files

Procedure

...

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

Ў        BRGUI or BRTOOLS:

                                                  i.       Choose Space Management ® Alter data file.

BRGUI or BRTOOLS displays the menu BRSPACE options for alter data file, 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

Alter data file action (action)

-f dfalter -a|-action

Tablespace names (tablespace)

-f dfalter -t|-tablespace

Data file names (file)

-f dfalter -f|-file

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 dfalter command that is to be executed using the current settings.

If required, in Data file names you can enter the names of multiple data files, but you cannot use wildcards. But this entry and alter action entry are optional.

For example, /oracle/GC2/sapdata3/users_1/users.data1, /oracle/GC2/sapdata4/xdb/xdb.data1 is a valid entry, but /oracle/GC2/sapdata* is not a valid entry.

You can also enter Oracle file IDs instead of path names.

                                               iii.       Choose Continue.

BRGUI or BRTOOLS prompts you to start BRSPACE.

                                               iv.       Choose Continue to start BRSPACE.

Ў        Command line:

...

Enter at least the following command:

brspace –f dfalter

You can enter more parameters, including the data file name and action, if required. For more information, see BRSPACE -f dfalter.

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

BRSPACE displays the Alter data file main menu.

       2.      If you have already entered the data file name and action, continue with step 6 (quick mode).

If you have entered multiple data files, BRSPACE displays as confirmation a List of data files for alter. You cannot make a selection from this list. If required, go back and make a new selection.

Continue with step 6 (quick mode).

       3.      Choose or confirm the required action:

Ў        Set data file online

Ў        Set data file offline

Ў        Maintain autoextend

Ў        Switch off autoextend

Ў        Resize data file

       4.      If you have already entered the data file name, continue with step 6 (quick mode).

BRSPACE displays the data file list:

List Entry

Meaning

Pos.

List sequence number

Tablespace

Tablespace name for the data file

Status

Data file status – online, offline, system or recover

Type

Data file type – regular or raw disk

Size

Data file size

AuExt.

Autoextend setting

File

File name

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

For example, if you choose Set data file online, only the data files that are currently offline are displayed.

       5.      Select a data file or multiple data files.

These examples apply only to input in character mode.

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

To select the first and third data files, enter 1,3.

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

To select all entries, enter 0.

BRSPACE displays the menu, Options for alter of data file.

       6.      Set the required options:

Menu Entry

Meaning

Current data file status (status)

– display only

Current status of the data file

Current datafile size in MB (currsize)

– display only

Current size of the data file

Alter data file action (action)

– display only

The action that you selected above

Force offline mode (force)

-f dfalter -f|-force

Maximal file size in MB (maxsize)

-f dfalter -m|-maxsize

File increment size in MB (incrsize)

-f dfalter -i|-incrsize

New data file size in MB (size)

-f dfalter -s|-size

SQL command (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.

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

·        The detail log s<encoded timestamp>.dfa 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.