Change The Autoext Mode of Datafiles
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
-------------------------------------------------------------------------------
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
-------------------------------------------------------------------------------
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
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"
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,