Вы находитесь на странице: 1из 27

8.

Backup and Recovery using BRTOOLS:


 The process followed:
BACKUP using BRTOOLS:
In SAP system business application data is stored in a relational database which is very
dynamic in nature and needs security. External factors, physical errors and logical errors can
cause system downtime and may cause data loss to avoid data loss we need suitable
database backup.
Here are the steps to take backup using BRTOOLS.
1. First we go to OS level and type the command BRTOOLS

The BRTOOLS options appears as shown above

2. Then we select the fourth option which is “backup and recovery”.


Then we have to select the backup option if it is database backup, archive log backup etc.

3. We select the first option for “database backup”.

4. Here we are taking the backup on disk so we select the second option now and
change the backup device type from tape to disk.

5. Here we are taking online backup so we select the sixth option now to change
the backup type from “offline to online”.
6. Here we take backup of the SYSAUX table and not all so we choose the ninth
option to change the files for backup from all to SYSAUX.
7. Now after changing all the options we press c for continuing with the backup.

8. Again we have to continue with the backup by pressing c.

The backed up file gets stored in the SAPBACKUP folder present in the oracle home
directory. The name of the folder that contains the backup is also displayed as shown in the
above snapshot.
9. The backup process continues and the data files and the control files get stored
in the location shown and finally the backup is completed successfully.
10. Once the BRTOOLS show that the backup is successful, we can check the backup
files in the location mentioned.

Thus the backup is completed successfully using the BRTOOLS

RESTORE OF INDIVIDUAL FILE FROM THE DATABASE OF AN SAP SYSTEM USING THE
BRTOOLS.

Here, the user related table SR3USR.DATA1 from the location


“E:\oracle\GP2\sapdata1\sr3usr_1” is first taken as a backup into the location
“E:\oracle\GP2\sapbackup”.Now we have changed the name of the file from SR3USR.DATA1
to SR3USR1.DATA1

From the menu provided by the BRTOOLS, the fifth option of “RESTORE AND RECOVERY” is
selected.
Again, from the next menu, we choose the fifth option of “RESTORE OF INDIVIDUAL BACKUP
FILES”, and continue.

The highlighted region below shows the corresponding command in command prompt that
would be executed at the back end of BRTOOLS.

Next, we have to make a selection of the location from where we want to perform the
restore, i.e. whether it is from the sapbackup folder or it is from any other disk or other
location like tapes. So, we choose it from BRBACKUP as the first option.

Next, there will appear a list of all the backup files in the sapbackup folder, from which we
need to select the corresponding backup file that we need to restore and continue.
Next, each backup file consists of the data as well as the control file. We need to continue
from here
Next, we need to enter the destination path to where we need the files to be restored back.

The restoring of the backup file is done only when the database is shutdown. So, the
BRTOOLS will now continue to shutdown it. So, we continue with process.The database will
be shutdown in the “SHUTDOWN IMMEDIATE” mode

Once, the database is shutdown, backup is done by the BRTOOLS.


The following highlighted line shows that the restore is done successfully and the return
code is 0.

At the operating system level, we check that the restore is done, i.e. we have got the
original file back.

Now, we start the database instance.


9. Data Base Operations:
In the transaction DB02->current sizes, we go to memory management to see all the
tablespaces that are existing currently in our database.

1: CREATION OF TABLESPACE USING THE BRTOOLS:


In the tablespace monitoring our first job is to create a tablespace.Using the menu driven
brtools, we can create, delete, alter tablespaces as per requirement. Here to create a
tablespace, we choose the second option of ‘SPACE MANAGEMENT’.
In the next menu, there are various options regarding the space management, like create
tablespace, alter tablespace etc. From this menu, we choose the second option of ‘CREATE
TABLESPACE’

In the next step, we are asked to provide a name for the tablespace that we want to create.
Here we have to follow the naming convention provided by SAP. So, the name of the
tablespace that we provide is ‘PSAPSR3GR2’.
Next, we provide the name of the owner of the tablespace as shown in the following
section.

Next the option of the space management regarding the tablespace comes into action. Here
there are four things as follows:
a)We need to provide the initial size of the tablespace,
b)whether the auto extent mode is ON or OFF,
c)Maximum size of the tablespace,
d)The amount of memory by which the tablespace will increase if the auto extent mode is
ON.
All these four things are shown in the following snapshot.
From here we continue to create the tablespace
When the table space is created, we can check it in the transaction DB02->current sizes as
shown below,

Thus, a table space with the name PSAPSR3GR2 is created.

2. Extension of tablespace by addition of new datafiles:


To extend the table space, we need to add one or more new data files to the table space.
This could again be done using the second option of ‘SPACE MANAGEMENT’ in the main
menu of BRTOOLS. This is shown below
Next the option of ‘EXTEND TABLESPACE’ is chosen as shown below,

It is then required to provide the name of the tablespace that we want to extend.So,
choosing the third option, we give the tablespace name.

Then comes the option of giving the size of the new datafile that will be added to the
tablespace.This is done as below,
Continuing on from here, we will be asked again to add another datafile automatically.If we
want to carry on we can continue or else we stop here and choose the option of NO to add
just one datafile.
Once the tablespace is extended we can check it in the transaction DB02->CURRENT SIZES-
>ANY TABLESPACE->DATAFILES.

3. RESIZING A DATAFILE:
Here, we resized the data file that was already declared. This could be done using the space
management in the main menu of the brtools.
Next we choose to resize the data file by choosing the fifth option of ‘ALTER DATA FILE’ as
shown below

In the next menu that appears under the alter data file heading, there are three
informations that we need to provide so that we can change the size of the data file that we
want to.
First, the operation that we want to perform, i.e. RESIZING. So, we choose the third option
and write ‘RESIZE’ there.
Next, we provide the name of the tablespace which contains the data file that we want to
change the size of.

Next the location of the data file is to be provided whose size is to be changed.This is shown
below.

From this step, we continue to enter into the menu that contains the information about the
new size of the data file. From this option, we can enter the new size of the data file.So, this
is done by choosing the sixth option and entering the new size that we want for the data
file.
Continuing on, the data file size can be changed according to the data that we provided.

This can also be checked from the operating system level as shown below,

In this way, the resizing of the data file is done.


4. MOVING A DATA FILE FROM ONE LOCATION TO ANOTHER:

In the move operation of the data file, as the name suggests the data file can be moved
from one location to another. This is also possible using the BRTOOLS.
In the BRTOOLS, we choose the second option of ‘SPACE MANAGEMENT’, as shown below.

In the next menu, the sixth option of ‘MOVE DATA FILE’ is selected.
The next step consists of the giving the name of the tablespace that contains the data file to
be moved from one location to another.

Next comes the location of the data file that is to be moved. We choose the fourth option to
provide the location of the data file. This is explained by the snapshot shown below.

Once the existing location of the data file is provided, the target location i.e. where the data
file is to be moved is then specified by choosing the third option as shown below,
Then we just need to continue from here onwards to complete the movement of the data
file to the desired location in the database.
For the completion of the movement of the data file the database instance must be
shutdown.this job is done automatically by the BRTOOLS.Once the data file is successfully
moved, the database instance is automatically started by the BRTOOLS.
At the operating system level also this movement can be checked by searching the source
and the target directories respectively.

In this way a data file can be moved from one location to another using the BRTOOLS.
5.Drop TABLESPACE:
Using the second option of ‘TABLESPACE MANAGEMENT’ in the main menu of the BRTOOLS,
we can drop or delete a table space from a database.
Next we choose the third option of ‘DROP TABLESPACE’

It should be noted that the table space to be dropped should be empty, otherwise the
BRTOOLS will throw an error telling that the table space should be emptied before we drop
it. This is the default setting done in the BRTOOLS. Also there is an option of over-riding this
default setting if we choose the ‘FORCE’ option

Next we provide the name of the tablespace that needs to be dropped. For this we choose
the third option and provide the tablespace name as shown below.
Then we continue from here onwards to get the tablespace dropped. To drop the
tablespace, the corresponding SQL command is also shown at the bottom by which the
BRTOOLS is going to drop the tablespace.

We continue from here to get the tablespace dropped. The below given screen shot
confirms that the tablespace Is dropped from the database.

In this way we can drop a table space using the BRTOOLS.