0% found this document useful (0 votes)
286 views7 pages

Change The Autoext Mode of Datafiles

The document describes using BRTOOLS and BRSPACE to alter the autoextend setting of a datafile in an Oracle database. It shows selecting the "Alter data file" option in BRSPACE, then choosing the specific datafile, PSAPBUT's datafile 6, and setting its maximum size and autoextend increment. This allows changing the datafile from non-autoextending to autoextending with a maximum size of 3500MB and increments of 50MB.

Uploaded by

Maxi Mus
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
286 views7 pages

Change The Autoext Mode of Datafiles

The document describes using BRTOOLS and BRSPACE to alter the autoextend setting of a datafile in an Oracle database. It shows selecting the "Alter data file" option in BRSPACE, then choosing the specific datafile, PSAPBUT's datafile 6, and setting its maximum size and autoextend increment. This allows changing the datafile from non-autoextending to autoextending with a maximum size of 3500MB and increments of 50MB.

Uploaded by

Maxi Mus
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Change the autoext mode of Datafiles

BRTOOLS:

(2 - Space management -> 7 - Additional space functions -> 1 = Show tablespaces) {font:Courier}
-------------------------------------------------------------------------------

List of database tablespaces Pos. Tablespace Type Status ExtMan. SegMan. Backup Files/AuExt. Total
Used<%> Free ExtSize FreeExt. Largest *1 - PSAPBUT DATA ONLINE LOCAL AUTO NO 6/5* 18075712
99.92 13696 819200 10 819200+:4096:1984:1024:1024 2 - PSAPBUT620 DATA ONLINE LOCAL AUTO NO
4/4 8704000 93.62 555520 819200 88 819200+:24576:16384:11200:10240 ---/ ... / ---
------------------------------------------------------------------------------- {font} As you can see PSAPBUT has 6
datafiles but only 5 of them are set to be autoextensible. DB02 will anyhow report that PSAPBUT is
autoextensible. To change this setting BRTOOLS are just fine. The following is an example on my
testmachine 'BUT'. {font:Courier} BR0656I Choice menu 5 - please make a selection
-------------------------------------------------------------------------------

Database space management

1 = Extend tablespace
2 - Create tablespace
3 - Drop tablespace
4 - Alter tablespace *
5 - Alter data file*
6 - Move data file
7 + Additional space functions
8 - Reset program status
Standard keys: c - cont, b - back, s - stop, r - refr, h - help -----------------------------BR0662I Enter your
choice: 5 BR0280I BRTOOLS time stamp: 2008-04-16 17.14.09 BR0663I Your choice: '5' BR0280I
BRTOOLS time stamp: 2008-04-16 17.14.09 BR0657I Input menu 85 - please check/enter input values
-------------------------------------------------------------------------------

BRSPACE options for alter data file

1 - BRSPACE profile (profile) .......


2 - Database user/password (user) ...
3 ~ Alter data file action (action) . *
4 ~ Tablespace names (tablespace) ... *
5 ~ Data file names (file) ..........
6 - Confirmation mode (confirm) .....
7 - Scrolling line count (scroll) ... <20>
8 - Message language (language) .....
9 - BRSPACE command line (command) .. <-p initBUT.sap -s 20 -l E -f dfalter> Standard keys: c - cont, b -
back, s - stop, r - refr, h - help ------------
BR0662I Enter your choice: 4 BR0280I BRTOOLS time stamp: 2008-04-16 17.14.11 BR0663I Your choice:
'4' BR0280I BRTOOLS time stamp: 2008-04-16 17.14.11
BR0681I Enter string value for "tablespace" : PSAPBUT BR0280I BRTOOLS time stamp: 2008-04-16
17.14.13 BR0683I New value for "tablespace": 'PSAPBUT' BR0280I BRTOOLS time stamp: 2008-04-16
17.14.13 BR0657I Input menu 85 - please check/enter input values
-------------------------------------------------------------------------------

BRSPACE options for alter data file

1 - BRSPACE profile (profile) .......


2 - Database user/password (user) ...
3 ~ Alter data file action (action) .
4 ~ Tablespace names (tablespace) ...
5 ~ Data file names (file) ..........
6 - Confirmation mode (confirm) .....
7 - Scrolling line count (scroll) ... <20>
8 - Message language (language) .....
9 - BRSPACE command line (command) .. <-p initBUT.sap -s 20 -l E -f dfalter -t PSAPBUT> Standard keys:
c - cont, b - back, s - stop, r - refr, h - help -------------------------------------------------------------------------------

BR0662I Enter your choice: c

BR0280I BRTOOLS time stamp: 2008-04-16 17.14.16 BR0663I Your choice: 'c' BR0259I Program
execution will be continued...
BR0291I BRSPACE will be started with options '-p initBUT.sap -s 20 -l E -f dfalter -t PSAPBUT'
BR0280I BRTOOLS time stamp: 2008-04-16 17.14.16
BR0670I Enter 'c' to continue, 'b' to go back, 's' to abort: c
BR0280I BRTOOLS time stamp: 2008-04-16 17.14.17 BR0257I Your reply: 'c' BR0259I Program execution
will be continued...
###############################################################################
BR1001I BRSPACE 6.40 (45)
BR1002I Start of BRSPACE processing: sdxsgncr.dfa 2008-04-16 17.14.17
BR0484I BRSPACE log file: E:\oracle\BUT\sapreorg\sdxsgncr.dfa BR0280I BRSPACE time stamp: 2008-04-
16 17.14.19
BR1009I Name of database instance: BUT BR1010I BRSPACE action ID: sdxsgncr BR1011I BRSPACE
function ID: dfa BR1012I BRSPACE function: dfalter
BR0280I BRSPACE time stamp: 2008-04-16 17.14.19
BR0656I Choice menu 314 - please make a selection
-------------------------------------------------------------------------------
Alter data file main menu

1 - Set data file online


2 - Set data file offline *
3 - Turn on and maintain autoextend*
4 - Turn off autoextend
5 - Resize data file
6 - Show data files
7 - Show tablespaces
8 - Show disk volumes
9 * Exit program
10 - Reset program status
Standard keys: c - cont, b - back, s - stop, r - refr, h - help

BR0662I Enter your choice: 3


BR0280I BRSPACE time stamp: 2008-04-16 17.14.25 BR0663I Your choice: '3'
BR0280I BRSPACE time stamp: 2008-04-16 17.14.28 BR0659I List menu 315 +
please select one or more entries -------------------------------------------------------------------------------

List of data files for alter Pos.

Tablespace Status Type Size AuExt. File

1 - PSAPBUT ONLINE FILE 3051520 YES E:\ORACLE\BUT\SAPDATA1\BUT_1\BUT.DATA1


2 - PSAPBUT ONLINE FILE 3051520 YES E:\ORACLE\BUT\SAPDATA1\BUT_2\BUT.DATA2
3 - PSAPBUT ONLINE FILE 3031040 YES E:\ORACLE\BUT\SAPDATA1\BUT_3\BUT.DATA3
4 - PSAPBUT ONLINE FILE 2756672 YES E:\ORACLE\BUT\SAPDATA4\BUT_4\BUT.DATA4
5 - PSAPBUT ONLINE FILE 3092480 YES E:\ORACLE\BUT\SAPDATA4\BUT_5\BUT.DATA5 *
6 - PSAPBUT ONLINE FILE 3092480 NO E:\ORACLE\BUT\SAPDATA4\BUT_6\BUT.DATA6*
Standard keys: c - cont, b - back, s - stop, r - refr, h - help
-------------------------------------------------------------------------------

BR0662I Enter your selection: 6


BR0280I BRSPACE time stamp: 2008-04-16 17.14.33 BR0663I Your selection: '6'
BR0280I BRSPACE time stamp: 2008-04-16 17.14.33
BR0657I Input menu 316 - please check/enter input values
Options for alter of data file E:\ORACLE\BUT\SAPDATA4\BUT_6\BUT.DATA6

1 * Current data file status (status) .......


2 * Current data file size in MB (currsize) . <3020>
3 * Alter data file action (action) .........
4 # Force offline mode (force) .............. *
5 ? Maximum file size in MB (maxsize) ....... *
6 ? File increment size in MB (incrsize) ....
7 # New data file size in MB (size) .........
8 - SQL command (command) ...................

Standard keys: c - cont, b - back, s - stop, r - refr, h - help ---------------------


BR0662I Enter your choice: 5
BR0280I BRSPACE time stamp: 2008-04-16 17.14.38
BR0663I Your choice: '5'
BR0280I BRSPACE time stamp: 2008-04-16 17.14.38
BR0682I Enter integer value for "maxsize" (0-32767) : 3500
BR0280I BRSPACE time stamp: 2008-04-16 17.14.48
BR0683I New value for "maxsize": '3500'
BR0280I BRSPACE time stamp: 2008-04-16 17.14.48
BR0657I Input menu 316 – please check/enter input values
Options for alter of data file E:\ORACLE\BUT\SAPDATA4\BUT_6\BUT.DATA6
1 * Current data file status (status) .......
2 * Current data file size in MB (currsize) . <3020>
3 * Alter data file action (action) .........
4 # Force offline mode (force) ..............
5 - Maximum file size in MB (maxsize) ....... <3500> *
6 ? File increment size in MB (incrsize) .... *
7 # New data file size in MB (size) .........
8 - SQL command (command) ...................
Standard keys: c - cont, b - back, s - stop, r - refr, h - help
------------------------------------------------------------------------------- BR0662I Enter your choice: 6 BR0280I
BRSPACE time stamp: 2008-04-16 17.14.55 BR0663I Your choice: '6' BR0280I BRSPACE time stamp:
2008-04-16 17.14.55 BR0682I Enter integer value for "incrsize" (1-32767) : 1 BR0280I BRSPACE time
stamp: 2008-04-16 17.15.01 BR0683I New value for "incrsize": '1' BR0280I BRSPACE time stamp: 2008-
04-16 17.15.01 BR0657I Input menu 316 - please check/enter input values
------------------------------------------------------------------------------- Options for alter of data file
E:\ORACLE\BUT\SAPDATA4\BUT_6\BUT.DATA6
1 * Current data file status (status) .......
2 * Current data file size in MB (currsize) . <3020>
3 * Alter data file action (action) .........
4 # Force offline mode (force) ..............
5 - Maximum file size in MB (maxsize) ....... <3500>
6 - File increment size in MB (incrsize) .... <1>
7 # New data file size in MB (size) .........
8 - SQL command (command) ................... Standard keys: c - cont, b - back, s - stop, r - refr, h - help
------------------------------------------------------------------------------- BR0662I Enter your choice: 6 BR0280I
BRSPACE time stamp: 2008-04-16 17.15.04 BR0663I Your choice: '6' BR0280I BRSPACE time stamp:
2008-04-16 17.15.04 BR0682I Enter integer value for "incrsize" (1-32767) <1>: 50 BR0280I BRSPACE time
stamp: 2008-04-16 17.15.05 BR0683I New value for "incrsize": '50' BR0280I BRSPACE time stamp: 2008-
04-16 17.15.05 BR0657I Input menu 316 - please check/enter input values
------------------------------------------------------------------------------- Options for alter of data file
E:\ORACLE\BUT\SAPDATA4\BUT_6\BUT.DATA6
1 * Current data file status (status) .......
2 * Current data file size in MB (currsize) . <3020>
3 * Alter data file action (action) .........
4 # Force offline mode (force) ..............
5 - Maximum file size in MB (maxsize) ....... <3500>
6 - File increment size in MB (incrsize) .... <50>
7 # New data file size in MB (size) .........
8 - SQL command (command) ...................
Standard keys: c - cont, b - back, s - stop, r - refr, h - help ---------------------------------------------------------------
BR0662I Enter your choice: c BR0280I BRSPACE time stamp: 2008-04-16 17.15.07 BR0663I Your choice:
'c' BR0259I Program execution will be continued... BR0280I BRSPACE time stamp: 2008-04-16 17.15.08
BR0370I Directory E:\oracle\BUT\sapreorg\sdxsgncr created BR0280I BRSPACE time stamp: 2008-04-16
17.15.10 BR0319I Control file copy created: E:\oracle\BUT\sapreorg\sdxsgncr\cntrlBUT.old 6955008
BR0280I BRSPACE time stamp: 2008-04-16 17.15.10 BR1016I
SQL statement 'alter database datafile 'E:\ORACLE\BUT\SAPDATA4\BUT_6\BUT.DATA6' autoextend n
next 50M maxsize 3500M'
executed successfully BR1078I Data file E:\ORACLE\BUT\SAPDATA4\BUT_6\BUT.DATA6 altered
successfully into status 'autoext BR0280I BRSPACE time stamp: 2008-04-16 17.15.10 BR0340I Switching
to next online redo log file for database instance BUT ... BR0321I Switch to next online redo log file for
database instance BUT successful BR0280I BRSPACE time stamp: 2008-04-16 17.15.13 BR0319I Control
file copy created: E:\oracle\BUT\sapreorg\sdxsgncr\cntrlBUT.new 6955008 BR0280I BRSPACE time
stamp: 2008-04-16 17.15.13 BR0256I Enter 'c' to continue, 's' to cancel BRSPACE: {font} As you see,

I just chose to alter a datafile from the tablespace PSAPBUT. Then I got a list of the datafiles and could
easily manage the autoextend setting via the menu without having to deal with SQL commands. Hope
that helps, Lars

Sql>select file_name, bytes, maxbytes from dba_data_files where bytes<>maxbytes and tablespace_name='PSAPSR3';
DB13 Restore
Are you trying to restore on same SID or different, if it is same SID then, please find the below steps:
Hope the below gives you a full idea "Steps for Restore and Recovery of SAP system using Brtools"

1. Check the sapmnt directory, SAP kernel and oracle executables


2. check the sap operating system users (i..e, ora, adm) with appropriate user IDs' and group
membership. (Note: the Uids' of the SAP operating system users and GIDs' must be same as it
was before disaster)
3. Check the Operating System groups (i.e., sapsys, dba, oper) with appropriate Group IDs'
4. Check for the Successful backup taken with brbackup and the tapes related to same
5. Check the init.sap, especially change the tape_address parameter,
6. check the sap directories used by brtools (/oracle//sapbakcup, /oracle//saparch,
/oracle//sapreorg, /oracle//sapcheck), if necessary create it with ora as owner and dba as group
7. Connect the tape drive to the system and insert tapes in to it.
8. Check the Backup in the tape using command "brbackup -I show". This will show the backup
date, tape label, etc
9. "Restore the backup logs as well as init.sap, init.ora saved while backup using backup
""brrestore -n all_log="" (Note: this takes much time, since it reads the whole tape. So please be
patience and donot cancel this step. Also we cannot restore the database without the detailed
log)"
10. The above command will restore all the files like init.ora, init.sap, backup detail log, summary
log.
11. Replace the existing files with the files restored from the alternate location to the original
location
12. Check the mount points and permissions for sapdata folders (i.e., owner - ora, group - dba, file
permissions 755)
13. start the datafiles restoration using command - "brrestore -b . - m full"
14. Brrestore will create the sub directories as required and as in detail log specified
15. Brrestore will start restoring the datafiles as per detail logs
16. Once the datafiles restoration is completed, it restores Controlfile in to sapbackup folder and
copies the controlfile as specified in the detail log
17. Check the control_files parameter in init.ora file and confirm whether the files are at the correct
location. If the controlfiles are at different locations, check the path of all files and change the
control_file parameter in init.ora
18. Mount the database, to do this execute sqlplus "/ as sysdba" and then in the sql prompt type
sql script "startup mount"
19. This will mount the database if control files are in correct location as in init.ora and are not
corrupt

20. Restore the archive logs from the archive logs backup taken with brarchive.

21. To Restore, insert the archive log tape in the tape drive
22. Ensure that the tape address parameter tape_address is correct in init.sap
23. To restore archive logs we have to restore summary as well as detail log of archive log backup
24. To restore the archive log backup log, execute the command - brrestore -n all_logs=. This will
restore all logs saved in the backup like init.sap, init.ora, summary and detail log
25. Copy the summary and detail log from alternate locaiton to original location i.e.,
/oracle//saparch
26. Execute the sql script recover database using backup controlfile until cancel; in the sql prompt.
This command will show the archive log file that will be necessary for recovery of the database.
27. To restore the archive log files, check in detail log file the archive logs saved in the backup. To
restore the logs backed in the backup execute, brrestore -a -. This command will restore the
archive logs from archive log a to archive log b to default location /oracle//oraarch
28. Start applying the archive logs using sql script - recover database using backup controlfile until
cancel; This will give the archive log file, check whether we have all the logs along with the file
specified 29 Restore the all the archive logs available in the backup.
29. Follow steps 21 to 25 Note: if we had added any datafile to any tablespace. The archive log will
be switched from online redo log to offline redo log file (if we use brtools to add or extend
datafile). When we try to add this archive log file, then we get an error, ORA-01111: name for
data file is unknown - rename to correct file and the correct file name with location will be
displayed. But if we have extended the datafile, then applying the archive log of that time will
extend the file automatically To solve this problem , check the alert log file, the below error will
be displayed ORA-01244: unnamed datafile(s) added to controlfile by media recovery ORA-
01110: data file : '/oracle//sapdata/_/.data' Check the unnamed file in v$datafile table using
query "select FILE#, NAME from V$datafile where FILE# = ;" This will show the name of the file
as in the controlfile. We have to rename the file and create the physical file; to do this execute
"alter database create datafile '/oracle//920_64/dbs/UNNAMED00' as
'/oracle//sapdata/_/.data';" Start Applying the archive logs using sql script - recover database
using backup controlfile until cancel;
30. Open the database using sql command - "alter database open resetlogs;", this will open the
database in read/write mode and reset the archive log number to 0, the archive log generated
will be started with number - 1
31. Check the connectivity of the Database with sap using a tool given by SAP i.e., R3trans. Which
checks the connectivity to the database. Start the listener - lsnrctl start and execute R3trans -d.
The output of the r3trans -d should be 0, else analyze the error and go ahead.
32. If the R3trans tool return code is 0, then start sap.To start sap switch to user adm (use su - adm
give the password if prompted) and execute startsap. This will start both database if not started
and then sap
33. Brbackup doesnot take the backup of the tempfiles in any of the backup. So after opening the
database we have to create the temporary datafiles. To add tempfiles execute the sql script :
"alter tablespace PSAPTEMP add tempfile '/oracle//sapdata/temp_/temp.data' SIZE 6144M;".
This will add a temp file of size 6GB Hope this helps you Regards,

You might also like