sunny

Upload: ksioukjskl

Post on 09-Jul-2015

49 views

Category:

Documents


0 download

TRANSCRIPT

NTBACKUP Windows 2003Backup To start the Backup process click Start Run NTBACKUP.

Figure 1: Start the Backup process During an online backup, the .edb, .stm, and .log files that comprise the Exchange store are being backed up and checked for corruption. The Exchange database store is checked for corruption at file system level. File system level damage may be caused by unreliable hardware, firmware, or disks. This check is done by verifying the checksums on each 4 KB block or page in the database. If there is a checksum failure, backup will terminate (Exchange will not allow you to back up an Exchange store with a wrong checksum in it). This is tpyical for the 1018 error. Choose a place to save the Backup files.

Figure 2: Choose a Backup device

It is possible to disable Volume Shadow Copy.

Figure 3: NTBACKUP options The Backup process will begin.

Figure 4: The running NTBACKUP process You can see the status of your Exchange Backups when you start the event viewer and select the application log.

Figure 5: NTBACKUP status in the event log Transaction Log files and NTBACKUP

Backup Type

What to Backup

Exchange Logs

Normal

Backs up selected files and marks each file as backed up

Backup Logfiles and delete Transaction Logfiles

Copy

Backs up selected files, but does not mark any as backed up

Backup Logfiles but doesnt deleteTransaction Logfiles

Incremental

Backs up selected files only if they were created or modified since the previous backup

Backup only Logfiles but cannot be used with enabled circular logging

Differential

Backs up selected files only if they were created or modified since the previous backup, but does not mark them as backed up

Backup only Logfiles but cannot be used with enabled circular logging. Logfiles willnot be deleted after Backup

The type of Backup depends on the configuration of circular logging. You can specify circular logging settings at the Exchange Storage Group level.

Figure 6: Circular Logging settings Restore After a succesful Backup it is possible to do an Exchange Server restore in case of emergency. You must ensure that the Exchange database store to restore is not mounted. You can dismount a Exchange Database Store in the Exchange System Manager by right clicking the database. Start the NTBACKUP program and select Restore and Manage Media.

Figure 7: NTBACKUP restore process In the following screen you must select the Server to restore the data, a temporary location for log and patch files (this directory must be empty). Click Last Restore Set when this is the last restore device (this is also possible with ESEUTIL) Click Mount Database after Restore if you want to automatically start the restored database.

Figure 8: restore options Depending on the size of the database, the restore process can be very time consuming.

Figure 9: Restore Progress You can read the Logfile after an successful or unsuccessful Exchange restore.

Figure 10: NTBACKUP Logfile The following screenshots shows the Exchange Server MDBDATA directory. As you can see, there are now more Exchange Server Transcation Logfiles except the actual logfile.

Figure 11: NTBACKUP Logfile

Restore SAP using Netbackup and BrtoolsThis guide has been tested on SAP R3, SRM, and BW with DB Oracle 9i and 10G R2 Login to system using user "oraSID" j5d:> brtools --------------------------------------------------------------BR*Tools main menu 1 - Backup and database copy 2 = Restore and recovery 3 - Check and verification 4 - Database statistics 5 - Profiles and logs 6 - Additional functions 7 - Exit program Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------BR662I Enter your choice: 2 --> Choose option 2 for Restore --------------------------------------------------------------Restore and recovery 1 - Complete database recovery 2 = Database point-in-time recovery 3 - Tablespace point-in-time recovery 4 - Whole database reset 5 - Restore of individual backup files 6 - Restore and application of archivelog files 7 - Disaster recovery 8 - Reset input values --------------------------------------------------------------BR662I Enter your choice: 2 --> Choose option 2 for Database point-in-time recovery --------------------------------------------------------------Database point-in-time recovery main menu 1 = Set point-in-time for recovery 2 * Select database backup 3 * Check the status of database files 4 * Restore control files

5 * Restore data files 6 * Restore split control files 7 * Restore and apply incremental backup 8 * Restore and apply archivelog files 9 * Open database and post-processing 10 * Exit program 11 - Reset program status Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------BR0662I Enter your choice: c --> Choose option "c" to set restore/recover database to selected status that we want to recover. Make sure all offline Redologs (archivelogs) available --------------------------------------------------------------Options for point-in-time recovery of database SID 1 # Database instance of archivelog thread (instance) . [] 2 ~ Last archivelog sequence to apply (last_seq) ...... [] 3 ~ Last system change number to apply (last_scn) ..... [] 4 ~ End point-in-time for recovery (end_pit) .......... [] Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------BR0662I Enter your choice: 4 --> Choose option 4 for recovery to selected time that we want, option 2 for archivelog sequence and 3 for scn. BR0681I Enter string value for "end_pit" () []: 2007-12-06 12.00.00 --> example if we want to recover untul 2007-12-06 12.00.00 --------------------------------------------------------------Options for point-in-time recovery of database SID 1 # Database instance of archivelog thread (instance) . [] 2 ~ Last archivelog sequence to apply (last_seq) ...... [] 3 ~ Last system change number to apply (last_scn) ..... [] 4 ~ End point-in-time for recovery (end_pit) .......... [2007-12-06 12.00.00] Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------BR0662I Enter your choice: c --> Make sure options for point-in-time recovery is correct --------------------------------------------------------------Database point-in-time recovery main menu 1 + Set point-in-time for recovery 2 = Select database backup 3 * Check the status of database files 4 * Restore control files 5 * Restore data files 6 * Restore split control files 7 * Restore and apply incremental backup 8 * Restore and apply archivelog files 9 * Open database and post-processing 10 * Exit program 11 - Reset program status Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------BR0662I Enter your choice: c --> Choose continue to select online backup log of database that we want to restore/recover. --------------------------------------------------------------Database backups for database point-in-time recovery Pos. Log Start Type Mode Device Rc 1 = bdwtavcl.anf 2007-12-05 13.00.03 online all util_file 0

Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------BR0662I Enter your selection: c --> Choose continue if the selection is correct --------------------------------------------------------------Database point-in-time recovery main menu 1 + Set point-in-time for recovery 2 + Select database backup 3 = Check the status of database files 4 * Restore control files 5 * Restore data files 6 # Restore split control files 7 # Restore and apply incremental backup 8 * Restore and apply archivelog files 9 * Open database and post-processing 10 * Exit program 11 - Reset program status Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------BR0662I Enter your choice: c --> Choose continue to check the status of database files BR0750I Database instance SID will be remounted now with mode 'IMMEDIATE' BR0670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort: c --> Choose continue if the selection is correct BR0331I Start and mount of database instance SID successful BR0118I Tablespaces and data files -- list -BR0119I Redo log files -- list -BR0120I Control files -- list -BR0670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort: c --> Choose continue --------------------------------------------------------------Database point-in-time recovery main menu 1 + Set point-in-time for recovery 2 + Select database backup 3 + Check the status of database files 4 - Restore control files 5 = Restore data files 6 # Restore split control files 7 # Restore and apply incremental backup 8 * Restore and apply archivelog files 9 * Open database and post-processing 10 * Exit program 11 - Reset program status Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------BR0662I Enter your choice: c --> Choose continue to restore data files --------------------------------------------------------------BRRESTORE main options for restore of database files 1 - BRRESTORE profile (profile) ........ [initSID.sap] 2 - BRBACKUP backup run (backup) ....... [bdwtavcl.anf] 3 - Fill-up previous restores (fillup) . [no] 4 - Restore device type (device) ....... [util_file] 5 - BACKINT/Mount profile (parfile) .... [/oracle/SID/102_64/dbs/initSID.utl] 6 # Database user/password (user) ...... [/]

7 - Files for restore (mode) ........... [all] Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------BR0662I Enter your choice: c --> Make sure all parameter is correct. --------------------------------------------------------------Additional BRRESTORE options for restore of database files 1 - Confirmation mode (confirm) ...... [yes] 2 - Query mode (query) ............... [no] 3 # Compression mode (compress) ...... [no] 4 # Parallel execution (execute) ..... [0] 5 - Additional output (output) ....... [no] 6 - Message language (language) ...... [E] 7 - BRRESTORE command line (command) . [-p initSID.sap -b bdwtavcl.anf -d util_file -r /oracle/SID/102_64/dbs/initSID.utl -m all -l E] Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------BR0662I Enter your choice: c --> Make sure all parameter is correct. -- list -BR0256I Enter 'c[ont]' to continue, 's[top]' to cancel BRRESTORE: c --> choose continue to overwrite exisiting datafile with backup datafile *************************************************************** Program: /usr/sap/SID/SYS/exe/run/backint 5.0GA Input File: /oracle/SID/sapbackup/.rdwththe.lst Profile: /oracle/SID/102_64/dbs/initSID.utl Function: RESTORE *************************************************************** -- list -*************************************************************** BR0403I BRRESTORE completed successfully with warnings =============================================================== BR0670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort: c --> make sure restore completed successfully --------------------------------------------------------------Database point-in-time recovery main menu 1 + Set point-in-time for recovery 2 + Select database backup 3 + Check the status of database files 4 - Restore control files 5 + Restore data files 6 # Restore split control files 7 # Restore and apply incremental backup 8 = Restore and apply archivelog files 9 * Open database and post-processing 10 * Exit program 11 - Reset program status Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------BR0662I Enter your choice: c --> Choose continue if the selection is correct --------------------------------------------------------------Archivelog files to apply of database instance SID Pos. Sequence Status Apply From Disk Tape Util Rman Stage 1 - 2866 arch_back yes arch .... .... yes .... .... Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------BR0662I Enter your choice:

c --> Choose continue if the selection is correct BR0778I You can change the source the archivelog files will be restored/applied from BR0676I Enter 'y[es]' to perform the action, 'n[o]/c[ont]' to skip it, 's[top]' to abort: n --> to skip the action and using default source --------------------------------------------------------------Applying archivelog files of database instance SID 1 - First sequence number (first_seq) .. [2866] 2 - Last sequence number (last_seq) .... [2886] 3 - Use backup control file (back_ctl) . [yes] 4 ~ Parallel recovery (degree) ......... [] Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------BR0662I Enter your choice: c --> The sequence number of archivelogs automatic selected if using option "end_pit" BR0781I All archivelog files to be applied are on disk - no restore required note : if archivelog not on disk, it will ask for restore from tape media. --------------------------------------------------------------Applying archivelog group of database instance SID 1 - Apply unattended (unattend) ....... [no] 2 - First sequence number (first_seq) . [2866] 3 - Last sequence number (last_seq) ... [2886] 4 - SQLPLUS command (command) ......... [recover from '/oracle/SID/oraarch' database until time '2007-12-06 12.00.00' using backup controlfile] Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------BR0662I Enter your choice: c --> Choose continue if the selection is correct BR0681I Enter string value for "unattend" (yes|no) [no]: yes --------------------------------------------------------------Applying archivelog group of database instance SID 1 - Apply unattended (unattend) ....... [yes] 2 - First sequence number (first_seq) . [2866] 3 - Last sequence number (last_seq) ... [2886] 4 - SQLPLUS command (command) ......... [recover from '/oracle/SID/oraarch' database until time '2007-12-06 12.00.00' using backup controlfile] Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------BR0662I Enter your choice: c --> Choose continue if the parameters is correct BR0783I Archivelog files with sequence number 2866-2886 of database instance SIDwill be applied now BR0336I Applying offline redo log file /oracle/SID/oraarch/SIDarch_2866.dbf ... -- list -BR0337I Offline redo log file /oracle/SID/oraarch/SIDarch_2866.dbf applied successfully BR0784I Media recovery completed --------------------------------------------------------------Database point-in-time recovery main menu 1 + Set point-in-time for recovery 2 + Select database backup 3 + Check the status of database files 4 - Restore control files 5 + Restore data files 6 # Restore split control files 7 # Restore and apply incremental backup 8 + Restore and apply archivelog files 9 = Open database and post-processing 10 * Exit program

11 - Reset program status Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------BR0662I Enter your choice: c --> Choose continue if the selection is correct --------------------------------------------------------------Options for opening database instance SID 1 ~ Reset logs option (reset_logs) .. [resetlogs] 2 * Open database command (command) . [alter database open resetlogs] Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------BR0662I Enter your choice: c --> Choose continue if the selection is correct BR0786I Database instance SID will be opened now in mode 'resetlogs' BR0787I No more archivelog files can be applied after database has been opened BR0675I Do you want to perform this action? BR0676I Enter 'y[es]/c[ont]' to perform the action, 'n[o]' to skip it, 's[top]' to abort: y --> Choose YES if all the archivelogs has been applied successfully BR0304I Starting and opening database instance SID ... BR0305I Start and open of database instance SID successful BR0118I Tablespaces and data files -- list -BR0119I Redo log files -- list -BR0120I Control files -- list ---------------------------------------------------------------Database point-in-time recovery main menu 1 + Set point-in-time for recovery 2 + Select database backup 3 + Check the status of database files 4 - Restore control files 5 + Restore data files 6 # Restore split control files 7 # Restore and apply incremental backup 8 + Restore and apply archivelog files 9 + Open database and post-processing 10 = Exit program 11 - Reset program status Standard keys: c - cont, b - back, s - stop, r - refr, h - help --------------------------------------------------------------BR0662I Enter your choice: c --> Choose continue if the selection is correct BR0680I Do you really want to exit BRRECOVER? Enter y[es]/n[o]: yes

BRTOOLSDBA BRTOOLS "/" mean loging as OPS$

Check backup space required

1. brbackup -u / -q OR brbackup -u system/manager -q

2. brbackup -u system/manager -m full -d disk ..

OR: /usr/sap/GRT/SYS/exe/run/brbackup -p initGRT.sap -l E -d disk -m all -k yes -t offline -e 0

3. brestore -u / -m full -d disk -b /SAPBackup/xx.afd -c force [&]

################################################# sidadm>brbackup -u / -t online_cons -m all -d disk -o dist

brbackup -u / -t offline -d disk -p init.sap -o dist

sidadm>brarchive -d disk -sd -f -u / brarchive -f stop

brarchive -u / -c -d disk -f -sd -p D:\oracle\\102\database\init_custom_profile.sap Note: -sd (save/delete) for archive streaming to other location

sidadm>BrConnect -u / -c -f stats -t all

#################################################

Change password: -----------------

1 - alter user SAP identified by XYZ; 2 - brconnect -u system/ -f chpass -o -p

Example:

esgqr3db:oragrq 2> brbackup -u system/gtmab -q

BR051I BRBACKUP 6.20 (132) BR055I Start of database backup: bdsnpemn.qub 2006-05-05 16.57.33

BR280I Time stamp 2006-05-05 16.57.40 BR057I Backup of database: GRQ BR058I BRBACKUP action ID: bdsnpemn BR059I BRBACKUP function ID: qub BR110I Backup mode: ALL BR077I Database files for backup: /oracle/GRQ/origlogA/log_g101m1.dbf /oracle/GRQ/origlogB/log_g102m1.dbf /oracle/GRQ/origlogA/log_g103m1.dbf /oracle/GRQ/origlogB/log_g104m1.dbf /oracle/GRQ/origlogA/log_g105m1.dbf /oracle/GRQ/origlogB/log_g106m1.dbf /oracle/GRQ/origlogA/log_g107m1.dbf /oracle/GRQ/origlogB/log_g108m1.dbf /oracle/GRQ/origlogA/cntrl/cntrlGRQ.dbf BR061I 41 files found for backup, total size 226083.262 MB BR143I Backup type: offline BR111I Files will be compressed BR130I Backup device type: disk BR106I Files will be saved on disk in directory: /staging

BR140I Number of parallel copy processes: 3 BR124I Query option set - no processing

BR056I End of database backup: bdsnpemn.qub 2006-05-05 16.57.40 BR280I Time stamp 2006-05-05 16.57.40 BR052I BRBACKUP terminated successfully

Update stat ########################### Brconnect -u / -c -f stats -t all

brconnect -u / -f check

Change dbparam Brspace -f dbparam

Urgent stop ############################## Brarchive -f stop

Brbackup -f l -fill "softly"

LMTS - ossnote 214995

Rebuild psaptemp after restored ############################## Alter tablespace psaptemp drop tempfile '/oracle/sid/sapdata2/temp_1/temp.data1';

Alter tablespace psaptemp add tempfile '/oracle/sid/sapdata2/temp_1/temp.data1' size 2048M reuse autoextend off;

Drop tablespace if cannot create

Alter database datafile '/oracle/sid/sapdata2/temp_1/temp.data1' offline drop;

Last resort- use another filename

################################################ Disabling Archive log in 10g is as good as enabling ################################################

LOG_ARCHIVE_START is obsolete and ignored in 10g and higher.

SQL> archive log list SQL> shutdown immediate SQL> startup mount

For Enablining

SQL> alter database archivelog;

For Disabiling

SQL> alter database noarchivelog;

SQL> alter database open; SQL> archive log list

Database log mode No Archive Mode Automatic archival Disabled Archive destination G:\oracle\XD1\saparch\XD1arch Oldest online log sequence 97 Current log sequence 100

Using BRTOOLS

-----------------

BRSPACE options for alter database instance 1 - BRSPACE profile (profile) ...... [initHRQ.sap] 2 - Database user/password (user) .. [/] 3 ~ Alter database action (action) . [] 4 ~ Database instance (instance) ... [] 5 - Confirmation mode (confirm) .... [yes] 6 - Message language (language) .... [E] 7 - BRSPACE command line (command) . [-p initHRQ.sap -l E -f dbalter] Standard keys: c - cont, b - back, s - stop, r - refr, h - help ------------------------------------------------------------------------------BR0662I Enter your choice: 3 BR0280I BRTOOLS time stamp: 2008-12-23 02.31.36 BR0663I Your choice: '3' BR0280I BRTOOLS time stamp: 2008-12-23 02.31.36 BR0681I Enter string value for "action" (switchlog|checkpoint|archlog|noarchlog) []: BR0291I BRSPACE will be started with options '-p initHRQ.sap -l E -f dbalter -a archlog -i HRQ' Options for alter of database instance HRQ 1 * Current archivelog mode (mode) .. [noarchivelog] 2 * Alter database action (action) .. [archlog] 3 - Force instance shutdown (force) . [no] 4 - SQL command (command) ........... [alter database archivelog]

End Specified tablespace backup ******************************************************* If the system has shutdown during a backup use: > > startup mount; > alter tablespace psapundo end backup; tablespaces > affected can be found by mapping a drive to the D drive and looking in > the alert log > alter tablespace psapstabd end backup; > alter database open;

SAP DAILY ACTIVITIES 1] Check that all the application servers are up: sm51 SAP Servers sm04/al08 Logon Users 2] Check that daily backup are executed without errors db12 Backup logs: overview 3] SAP standard background jobs are running successfully. Review for cancelled and critical jobs. sm37 Background jobs--- Check for successful completion of jobs. Enter * in user-id field and verify that all critical successful jobs and review any cancelled jobs. 4] Operating system Monitoring st06 5] Extents monitoring db02 Database monitoring--Check for max-extents reached 6] Check work-processes(started from sm51) sm50 Process overview-- All work processes with a running or waiting status.

7] Check system log sm21 System log-- Set date and time to before the last log review. Check for errors ,warning, security, message-bends, database events. 8] Review workload statistics st03 Workload analysis of sto2 tune summary instance 9] Look for any failed updates sm13 update records 10] check for old locks sm12 lock entry list 11] Check for spool problems sp01 spool request screen-- check for spool that are in request for over an hour. 12] Review and resolve dumps st22 ABAP Dump analysis 13] Checking .trc file in SAP trace directory for block corruption on daily basis. C:\ORacle\sid\saptrace 14] Archive backup brarchive -f force -cds -c Insert the archive backup tape 15] Review NT system logs for problem -> NT system log- look 4 errors or failures -> NT security log- failed logon 2 sap servers -> NT Application log -look 4 errors or failures