Showing posts with label sap notes. Show all posts
Showing posts with label sap notes. Show all posts

June 10, 2015

SAP ECC 6.0 EHP4 ABAP UPGRADE(Part 5-1)





SAP ECC 6.0 EHP4 ABAP UPGRADE PREPARE PHASE :-



SAP Upgrade ECC 6.0 EHP4
SP 06

Operating System and Database
Windows
MSSQL 2005



Making Preparations at the SAP System Level


Make sure that following parameter has  values in the DEFAULT.PFL profile of directory D:/usr/sap/R3X/SYS/profile.

login/no_automatic_user_sapstar = 0

login/system_client = 100

rdisp/bufreftime = 60

rdisp/bufrefmode=sendoff,exeauto


rdisp/max_wprun_time = 6000



Release the entire Transport Request from SAP System.


SE09











Modification Adjustment Requirements

If you modified SAP objects in your SAP system, make sure that you meet the requirements for the modification adjustment.

In particular, make sure that changes to the Repository are allowed in the client in which you want to perform the modification adjustment. To check this, call transaction SCC4.


Check Update records

Make sure that you have cleaned up all outstanding updates.


To find terminated or outstanding updates, proceed as follows:


Call transaction SM13






Check outbound queue

Make sure that you have cleaned up all outbound queues.

To find outstanding outbound queue RFC calls, proceed as follows:


Call transaction SMQ1








Check inbound queue.

To find outstanding inbound queue RFC calls, proceed as follows:


Call transaction SMQ2




Backup T512W(Wage Type Valuation table).

Execute report RPU12W0S


Client 000








Same for Clients 102, 103,104 





More Information to be posted soon... Have a glance on other posts ..






June 9, 2015

SAP ECC 6.0 EHP4 ABAP UPGRADE(Part 4)



SAP ECC 6.0 EHP4 ABAP UPGRADE PREPARE PHASE :-



SAP Upgrade ECC 6.0 EHP4
SP 06

Operating System and Database
Windows
MSSQL 2005


Preparations for PREPARE

Make Preparations at the Operating System Level


Determining the Host for the Upgrade Preparations.


Checking the consistency of the Hostname  Refer 4.12 of Upgrade Guide







Creating the Upgrade Directory.


     X:\usr\sap\R3Q\upg


  
    Apply patch vcredist_x64.exe

Note 684106 - Microsoft runtime DLLs


1.Go to the following Internet address: 
 http://www.microsoft.com/technet/security/bulletin/MS09-035.mspx

2. On the left-hand side, scroll to the "Affected Software" section.

3. Click the link:
 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package (KB973544)

4. Scroll to the "Files in This Download" section.

5. Download one of the following platform-specific files:
    • Itanium system: vcredist_IA64.exe
    • 64-bit SAP system on Intel 64-bit: vcredist_x64.exe
    • 32-bit SAP system on Intel 64-bit: vcredist_x86.exe
    • SAP system on Intel 32-bit: vcredist_x86.exe

6. Execute the downloaded file and follow the installation instructions. 


                In our case the file is Itanium system: vcredist_IA64.exe














Backing Up the SAP Kernel.

Updating the SAP Kernel Files.


Update current SAP Kernel with latest patch level including R3trans and tp.


 

Client
User
Password
000
SAP*
xxxxxxx
000
DDIC
xxxxxxx
000
Bhavana
xxxxxxx
100
SAP*
xxxxxxx
100
DDIC
xxxxxxx
100
Bhavana
xxxxxxx


  • Ensure System Data is in Solution Manager

  • Create Solution Manager Upgrade Key 





248AF95DAD


  • Download EHP key using SAP Note 1143022      


EHP Key – 1607077


  • Clear out entries in LBWE queues, either by processing them or by deleting them (SAP Notes 328181, 1083709)

Run RSA7 and delete the entries.



Select the row having entry in the TOTAL column.

And then Delete one by one


LBWQ




LBWG



In Application put the value 02 and execute.

Similarly run for 03,04,11,12,13.


  • Import the XML file into transaction /ASU/START      





Add authorization object B_ASU_ADMI to user Bhavana in Client 000

  • Copy fix file into /usr/sap/put –  FIX_NW701SR1.UPG
              FIX_NW701SR1_28.info
By uncaring NW701SR1_28-20004355.SAR


  • Import SPAM update SPAM/SAINT Update - Version 620/0038
  • Providing the JCE Jurisdiction Policy Files (refer 4.14 of Upgrade Guide)

1240081 - "Java Cryptography Extension Jurisdiction Policy" files


For SAP JVM 5.1 (used with SAP NetWeaver 7.10 & 7. 11, also used with the SAP NetWeaver 7.01 installation, upgrade and EHP installation tools): http://java.sun.com/javase/downloads/index_jdk5.jsp > Other Downloads > Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 5.0.







Download jce_policy-1_5_0 zip file.



1330256 - LOAD_PROGRAM_NOT_FOUND Job RDDMASGL Program RDD21DAT



















More Information to be posted soon... Have a glance on other posts
..



SAP ECC 6.0 EHP4 ABAP UPGRADE(Part 3)



SAP ECC 6.0 EHP4 ABAP UPGRADE PREPARE PHASE :-



SAP Upgrade ECC 6.0 EHP4
SP 06

Operating System and Database
Windows
MSSQL 2005


Installation Media


CD / DVD Number
Description
51036903_1
SAP ERP 6.0/NW 7.01 SR1 Upgrade Export 1
51036903_2
SAP ERP 6.0/NW 7.01 SR1 Upgrade Export 2
51036767_4
SAP EHP1 FOR SAP NETWEAVER 7.0 SR1, Kernel 7.01
51036889
BS 7 SR1 Upgrade Master
51036904_1
SAP ERP 6.0/NW 7.01 SR1 Language 1 of 2
51036904_2
SAP ERP 6.0/NW 7.01 SR1 Language 2 of 2
51038620_12
BS 7 SR1 Installation Master Windows Server on IA64 64bit
51038620_13
BS 7 SR1 Installation Master Windows Server on x64 64bit
51036767_5
BS 7 SR1 UC-Kernel 7.01 Windows Server on x64 64bit
51038943
MS SQL SERVER 2008 RDBMS incl. Service Pack 1








More Information to be posted soon... Have a glance on other posts..








SAP ECC 6.0 EHP4 ABAP UPGRADE(Part 2)







SAP ECC 6.0 EHP4 ABAP UPGRADE PREPARE PHASE :-




SAP Upgrade ECC 6.0 EHP4
SP 06

Operating System and Database
Windows
MSSQL 2005


SAP Notes for Upgrade



         
SAP Note Number
Description
1293744
Central information about upgrading to systems based on SAP NetWeaver 7.0 including enhancement package 1 Support Release 1
 825146
MS SQL Server
1292069
Additional information about upgrading to SAP ERP 6.0 including EHP 4 Support Release 1






More Information to be posted soon... Have a glance on other posts..








December 12, 2013

Sap Database Notes -4


Sap Database Notes 4:-

BR Tools:
1. Login to ORA<SID> using putty
2. Type BRTOOLS
3. There are totally 9 option in BR tools
a. Select Instant management, it is option 1
b. In Database instance management select option 2 to shutdown the database.
c. Type ‘C’ and click enter to continue
d. In Database instance shutdown main menu select option 1 shutdown DB.
e. Under options for shutting down the DB instance we have to choose option 1, that is close mode(Default mode is immediate)
f. Select option 1 and enter string value for ‘mode’ (Immediate|normal|transcations|abort).
Note: if the users are logged in to the SAP system then I cannot use immediate, normal, transactional modes, using abort mode will forcefully shutdown and will result to data loss hence never use this option so to be on the safest side always shutdown using normal mode.

Alter DB Instance (Switching off archive mode):
1. Shut down SAP -> Stop SAP [SID<adm>]
2. Log on to ORA<SID> user and start BR tools
3. In BR tools -> Select option 1 (Instance Management)
4. Start up database -> Select option 1
5. Alter DB instance -> Option 3
6. Enter ‘c’ to continue
7. Enter ‘c’ to continue
8. Select option 4 for set non archive mode
9. Enter ‘c ‘to continue and select option 5 to show instance status
Note: while switching to archive mode and non-archive mode, it will shutdown the DB instance first and then starts the DB instance. In each of these cases the time stamp is recorded that is data and time. Once the DB is up and running always check the status before performing any action.

(Q) If SAP started and I am trying to switch to non-archive mode what will happen.
(A) It will show an error showing that SAP instance is running. Please showdown first or use force option.

(Q) If SAP is running and I try to shutdown the DB using BR tools what will happen.
(A) It through an error saying that SAP is running please shutdown the SAP first or force option and then continue.

Table space administration:
1. Oracle stores data in table spaces, each table space consists of one or more data files.
2. Data files are plain files stored on local system
3. Oracle has 4 segment types
a. Data -> This segment contains table data in rows
b. Index -> Each table has one primary index and ‘n’ number of secondary indexes (optional). This index is used for faster access to table data and to enforce unique constrains.
c. Temp Segment -> This segment is used for sorts and to create indexes.
d. Roll back/undo segment -> this segment is used to provide read consistency that is ability to roll back changed to tables for recovery.
4. To meet the demand of large DB, DB designers creates partition tables and indexes.
5. An index segment in oracle DB used in SAP holds either all data for take that is not partitioned or all data for a partition of partitioned table.

Common table spaces:
1. System -> Oracle data dictionary
2. PSAP ROLL -> Roll back segment
Note: From WAS 6.1 version we have SAP undo as roll back segment.
3. PSAP TEMP -> Temporary segment.

(Q) If table space is full then what are the possibility to extend the table spaces ?
(A) Option 1: Add another data file to table space
           2: Existing data file can be manually resized
           3: Properties of existing data file can be changed to auto extendable

(Q) What id the formula to increase the data files size ?
(A) Data file size = Expected DB/100

(Q) How many number of data files will be there by default ?
(A) Default there are 100 data files

(Q) Expected DB size and Data file size
    Expected DB Size     Data File Size
    Up to 200Gb               2Gb
    200 to 400Gb              4Gb
    400 to 800Gb             8Gb
    Greater than 800Gb    60Gb

(Q) What is the error related with table flow ?
(A) For table ORA1653, ORA1654 for indexes.

(Q) What will happen if max extents are reached ?
(A) ORA1533 is the error forms extent reached. If max extent is reaching it limits, then increase next extent. When extents are dripped they are marked as free and their blocks can be used by new extents, but adjacent blocks are not combined. The DBA must use “COALEXE” free extent into one large extent. There are two options for “COALEXE” extent.
     1. BRCONNECT –f check -> COALEXE free extent automatically
    2. BRSPACE –f check -> COALEXE free extent use locally managed table spaces.

To solve above problem with extent we must use locally managed table spaces.
    Segment Sizes           Next segment Size    Max.no.of Extent
    Less than 1Mb          Less than 64Mb               16
    1 to 64Mb                1Mb                                 63
    64Mb to 1Gb           8Mb                                 126
    Greater than 1Gb     64Mb                                Unlimited

Advantage of LMTS (locally managed table spaces) is “ORA1533” error eill no longer occur. The only disadvantage of LMTS is, always it checks for used and free space.

Increase the Table space:
1. Log on to ORA<SID> and enter into BR tools.
2. Space management (option 2)
3. Extent table space (option 1)
4. Enter ‘c’ to continue
5. Enter ‘c’ to continue
It will give “Table space extension main menu”
Note: First use option 2 to show the table spaces and percentage full and make a note of a table space which is 80% and above fill and then add a data file as per the specification using the option 1 that is “extent table space”.
6. Extend table space (option 1)
7. This will list all table spaces and percentage used
Example Table: “PSAPR3700”
8. Select the table space that is ‘pos’ position
9. Enter 2 to select above example table
Note: options for extension of table space
a. Last added file name
b. Last added file size in MB
c. New file to be added
d. Raw disk/link target
e. Size of the new file in MB
f. File auto extend mode = YES
g. Max file size in MB = [10000]
h. File increment size in MB = [20]
i. SQL Command = [alter table space name]

Note: the last added data file name and new file to be added will show the exact location where the data file is residing that is Oracle/<sid>/sapdata 1 to n/

10. Enter ‘c’ to continue
11. Enter option 5 to change the size of new file in MB
12. Press ‘c’ to continue
13. Select ‘NO’ to continue with the current data file addition.
14. Select ‘YES’ to add a new data file to the current table or add new data file to a new table.

Note: this action will update the time stamp in co-file that is, it created a copy of co-file in the location /oracle/<SID>/SAPREORA|[CNTRL<SID>.old]
Once co-file is created, extending of table space is done, one successfully completed it switches to next online redo log file for database instance and finally creates a copy of co-file with new time stamp that is CMTRL<SID>.news

Top 10 Oracle errors:
1. ORA1631 and ORA1632 -> Max extent full
2. ORA1653 -> Table space full
3. ORA1654 -> Index full
4. ORA1113 -> When backup is aborted
5. ORA1144 -> When back is shutdown immediately
6. ORA1578 -> Data block corrupted
7. ORA0255 -> Database struck
8. ORA1555 -> Buffer mode is OFF
9. ORA272 and ORA255 -> Archive struck
10. ORA600 -> Hardware Failure

Note: option 4 and 5 are also called as missing end backup.

Changing Oracle Parameters

Q) Create server parameter file from init<sid>.ora
A) -> Login to oracle user (ora<sid>)


Sap Database Notes -3



Sap Database Notes 3:-

TAPE MANAGEMENT:-

(1) Each and every tape used for Backup, i.e. BRBACKUP and BRARCHIVE needs to be initialized.
(2) During tape Initializing SAP specific label is written on label as First file (Tape.hdro) containing the tape name.
(3) BRTOOLS-> Backup-> Dbcopy-> Additional Functions-> Init of BRBACKUP tape Volume or Init of BRARCHIVE tape volumes.
The command to start the initialization is BRBACKUP or BRARCHIVE or –I/Initialize.

(Q) What are the contents of tape label after a tape is Initialized ?
(A) (i) Tape Name
    (ii) Name of the Database
    (iii) Time stamp of last backup recorded on the tape
    (iv) Number of Backups performed with the tape

Before writing data to tape if the label is Red to check the following
(i) Tape Name
(ii) Tape Locked or Expired(Expire_period)
(iii) No. of times the tape already been read(Tape_use_count)
If Expiration_period = 0 days, the Volume is not locked at all and can be over written
• If a lock occurs on a tape, it automatically expires at midnight.

(Q) What are the methods used by BRBACKUP and BRARCHIVE to check tape locks?
(A) There are 2 types of locks
    (i) Physical lock check: Physical lock check is done by checking tape label parameter Expir_period. If the number of days passed since the tape was last used is less than value of parameter Expir_period, then the tape is physically locked.
    (ii) Logical lock check: This value is derived from the time stamp written to tables SDBAH, SDBAD

(Q) What are the various tape selection processes?
(A) (i) Auto tape selection BRBACKUP and BRARCH
    (ii) Manual selection by the Operator
    (iii)By external tool

(Q) What is the option to select the tapes automatically by BRBACKUP and BRARCH?
(A) Set the parameter Volume_Backup and Volume_archive to TAPE

(Q) What is the command to check which tape will be automatically selected?
(A) BR Backup |  BRARCHIVE –Q | Query { check }

(Q) How do we switch off automatic tape Management?
(A) By setting up the parameter(Volume Backup and Volume Archive) to the value “SCRATCH”

(Q) How do I turnoff the tape management performed by SAP tools?
(A) Configure the parameter Backup_dev_type= UTIL_FILE
                                    OR
       UTIL_FILE_ONLINE and also configure BACKINT interface in init<SID>.sap
NOTE: BackINT Interface program is only supported for external Backup.

(Q) How do we verify Backups?
(A) Verification of backups is of 2 types
     (i) Tape Verification: The files are restored file by file and compared with original files to verify if the backup is redable.
     (ii) DB Block consistency: This checks the Database block by block using Oracle tool “DBVERIFY” to identify and restore from bad blocks.
PATH: BRTOOLSBackup & DBcopyVerification of DB Backup, Verification of Archive log Backup
The option USE_DBV(DBVERIFY=NO), only tape is verified (If yes Tape verification + DB Block Consistancy Check)

STATUS OF OFFLINE REDO LOG FILES:
(1) During Backup to tape= ARCHIVE
(2) First Status= SAVED
SECOND STATUS=COPIED
AFTER DELETION = DELETED
During BACKUP TO Disk = DISK
NOTE: All the above status are recorded in ARCH<SID>.log

ANALYZING Database PROBLEMS:
(1) Check Database alert log and trace files belonging to Bgprocess (SAP Trace/Background)
(i) Check for status of Database = Available or NOT Available
(ii) Check for Error = Media or User error
(iii) Check for corrupted files and file types = Data, Cofile, Online Redo log Files
(iv) Check if Software or Hardware Mirroring = Available or Not
(2) Safest method is to perform a complete Offline Backup before the files are copied back in restore place using BR Backup or any Backup Tools.
(3) The above step is Very Important for Point In Time Recovery or for Database rest because these stratagies always involve Data loss.
(4) Save Offline Redo Log Files in ORARCH Directory using BRArchive only.
(5) To check the reliability of Backup strategy , run regularly restoration report in SAP using DB12
(6) The above report is used to find out which backup to use for recovery as well as it displays information about last successful Backup.
(7) If the list of RedoLog files after the last Database Backup is too long, then perform a complete Database Backup.


Will update soon... Check next post...


Sap Database Notes -2


Sap Database Notes 2:-

BR Tools (Used for entire backup administration)
• BR  tools is a package name which contain various tools.
• These tools are divided into various ways based on their performance.
Note: If you get an error message while calling BR tools then your version might be older. (Less than 4.7).
• These are two modes while calling the various options in BR Tools.
 -Main Menu Mode
 -Quick Mode

BRConnect: is must, be called in main menu mode.
• ‘BRSPACE’ and ‘BRRECOVER’ always make a ‘CONNECT/AS SYS DBA’, because their actions require SYSDBA privilege.
• Once you connect a SYSDBA, if you do not want to enter a user name, password, while calling ‘SQL* PLUS call the interactive program using the command ‘SQLPLUS/NO LOG’
• ‘SQLSTARPLUS by default connects to the db defined in enhancement oracle database.
• Changing the password for SAP user is done using ‘BR CONNECT’
Note: Passwords for DB user ‘SAP SCHEMA ID’ or ‘SAPR3’ should not be changed using oracle methods.

Database Transaction Codes:

1. DB13: Schedule backups and other administrative jobs.
Note: ‘DB13C’ : This is used to schedule backups and admin activities centrally for all SAP systems and database.
2. DB14: To check the status and logs of all database operations.
3. DB16: Overview of database system checks.
4. Db17: View and maintain check conditions for database system check.
5. DB20: Maintain Statistics.
6. DB21: Configuration of Statistics
7. DB26: Database parameter overview with history.
8. DB02: Table and index monitor
9. ST04: Database performance monitor
10. RZ20 – DB Alert Monitor (Optional)
11. DB13 is used as an interface to schedule back ground jobs starting with DBA*. These background jobs look into table ‘SDBAC’
12. SPfile.ora is server side initialization parameter file (oracle database server)
• Do not make parameter changes on oracle level, because if only changes parameter values in SPfile, hence always use BR* tools, because it monitors consistency by copying the contents in both files.
• The transaction code DB02 and ST04 still use ‘init<SID>.ora’
• SAP installation tool do not create SPfile. SPfile is created using SQL*plus ‘CREATE SPFILE’.
• SPfile is stored in ‘oracle_home’ directory same as ‘init<SID>_ora’.
• RZ20: Database alert monitor.

Start and Stop Commands
BRSPACE_C FORCE_F dbstand_S <State>
BRSPACE_C FORCE_F dbstand_S <State>

Starting of Database

1. No mount = reads parameter files, database instance started and allocated memory buffers.
2. Mount face: opens cofiles.
3. Open: opens all data files and online redo log files.
• Mount face is used for database recovery, for changing archive log mode, for removing and moving data file and also for adding, dropping, renaming online redo log files.
• Do not use ‘BRCONNECT’ to start and shutdown database, instead use ‘BRSPACE’ because it tried logfile actions.
• No mount space is used for creation of database and for recreation of lost cofiles.

Stopping of Database
1. Normal: Oracle waits till all users are disconnected from the database. All files are closed and database is dis mounted and instance is shutdown.
2. Transactional: Oracle waits till all open transactional to finish and then it disconnects users and shutdown database.
3. Immedaite: No new connections and transaction are allowed. PMON ends all user sessions and performance roll back of any open transactions then only shutdown database.
4. Abort: no new connection and transactional allowed. No roll back of open transactions. Users are disconnected and oracle processes are stopped.
Note: With all the above first three methods, database is shutdown in a consistent state and does not need recovery at next restart.
• Default mode for oracle shutdown is normal
• Oracle commands shutdown immediate and shutdown abort stage oracle instance even if work process still has connections of database.
• Oracle info messages, warnings and errors are logged in oracle dump files i.e. background, user trace which is located in ‘SAPDATA_NAME’ directory.
• Background directory store alert log file. Alert_<SID>.log. Whereas user directory store trace files written on behalf of shadow process.

(Q) Why do I need ‘SPFILE<SID>.ora’ even though I have ‘init<SID>.ora ?
(A) From Oracle 9.i ‘init<SID>.ora’ is replaced by ‘SPfile<SID>.ora or ‘SPfile.ora.

(Q) If a file is missing from the chain of offline Redo log files, then what we’ll do ?
(A) We have to perform a restore and recovery of Database. Recovery is performed using the method “Point In Time” by which all the Offline Redo log files older than the last one is used for recovery.

(Q) What are the causes for logical errors related to Database ?
(A) (i) Manually deleting parts of Database objects such as Rows in a table.
    (ii) Manually dropping Database Objects.
    (iii) Manually dropping Application Objects.

(Q) Is Point in Time Recovery a standard Solution for logical errors in production system ?
(A) NO

(Q) Where do we use the Point IN Time Recovery ?
(A) Point in Time is very critical in a system landscape with Data Dependencies between Systems.

(Q) How do we verify Consistency of Oracle Database ?
(A) By performing by a logical data check.

(Q) Why do we need to perform a logical check ?
(A) In order to verify corrupted Data blocks (Ora – 1578)

(Q) Why do we need to perform a physical Data check ?
(A) To verify the tapes used for Database backup.

(Q) How often we perform Online Backup and Offline Backups ?
(A) Online Backup = Daily
    Offline Backup = Once in a Week

(Q) How do we perform Backup of Offline Redo log files ?
 (A) (i) Backup of every Offline Redo log files is taken TWICE on separate tapes before the    files are  deleted from Archive Directory.
   (ii) Perform additional Backups after each system upgrade and also if Database structure is Modified.

(Q) What are the tools used by Oracle Admin in an SAP System for Backups ?
(A) Database Backups = BRBACKUP
    Offline Redo log files = BRARCHIVE

(Q) What are the occasions in which changes to Tile Structure of Database is made ?
(A) 1) When a Data file is added
    2) When a Data file is moved to a Different Location.
    3) When a Table Space and its Data files are reorganized.

(Q) What are the various Backup types?
(A) There are 5 Backup types
    1) Online Backup
    2) Offline Backup
    3) Complete Backup
    4) Incremental Backup
    5) Partial Backup

Complete Backup:
All the Data in the Database is backed up. Complete Backup is again divided into 2 Types
1) Full Backup:- After data backup an additional information , i.e. Catalog is Written into Cofile by Recovery Manager.
2) Whole Backup:- It creates a Backup of all the data without the Catalog.

Incremental Backup:
i) This Backup Is used for taking needed Data blocks that have changed since the time of Full Backup.
ii) During Incremental Backup the amount of data to be backed up to get shorten and not for The Backup time.
iii) During Incremental Backup is only based on previous Full Backup.

(Q) If the Corresponding Full Backup is already overwritten and can I use Incremental Backup ?
(A) NO, Incremental Backup is useless.

(Q) Can I perform a Backup of Individual data files using Incremental Backups ?
(A) NO

Partial Backup:
The backup of Database in smaller parts is called as Partial Backup.
NOTE:- Sum of individual partial Backups form an Entire Complete Backup.
NOTE:- Recovery Backup using partial Backup data is very much time consuming, because it needs all oldest Backup Offline and Online recovery Processes.

(Q) What are the various Backup strategies used in SAP ?
(A) There are 3 Backup strategies in SAP
     i) Complete Backup:- Restore missing Database files from complete Backup, Restore Offline Redo Log files writte during and after this Backup.
     ii) Incremental Backup:- Restore missing Data files from last Full Backup, update them with restore from last Incremental Backup.
     iii)Partial Backup:- Replace complete backup with partial Backups , we need a longer time to perform a recovery from media crash.

TOOLS:
(1) BRBACKUP: Backup of Oracle Data files , Cofiles, Db Redolog files, Oracle Software Directories and SAP System directories.
(2) BRARCHIVE: Backup of Redo log files.
(3) BRRESTORE: Restore all Db files and Offline Redo log files
(4) BRRECOVER: Checks for Database for missing files , it calls BRRESTORE for restoration of missing Data and Offline redo log files.

NOTE:
(1) Both BRBACKUP and BRARCHIVE records their actions in log files, BRRESTORE uses above logs for restoration of missing files.
(2) Both BRBACKUP and BRARCHIVE supports Backup to Tapes, Disks as well as Backups with Third party Tools.
Important Parameters for Configuration of BRBACKUP and BRARCHIVE(Init<SID>.SAP)
(A) Backup_mode =   All(Whole)
            Full(full backup)
            Incremental Backup
            Partial(Table space name, Dir path, File id.s)
(B) Backup_type = Online and Offline Backup
(C) Backup_dev_type = Tape or Disk or External Interface
(D) Util_file = BACKINT(External Backup program through Interface BACKINT)
(E) TAPE_COPY_CMD = CPIO or DD or RMAN(Copying files from Disk to Tapes)
NOTE:
 DD = Raw devices are copied with this option
 CPIO = Directories are copied with this option
The Profiles init<SID>.ora and init<SID..sap and Summary and detail logs are copied with this CPIO.
(F) DISK_COPY_CMD = cp, copy (Copying files to disks)
    Cp is used in UNIX
    Copy is used in WINDOWS
(G) Expire_period = (1)We have to specify the expiry period of a tape
        (2)Tape_use_count = Max number of times, volumes can be written   to tapes.
(H) Volume_Backup: Names of volumes used for backups(BRBACKUP)
    Volume_Archive: Names of volume used for backups of Offline redo log files(BRARCHIVE)
(I)Tape_Address = Identifies device address of tapes.
(J) DD_Flags and DD_IN_FLAGS= Specify block ( Size of at least 64kb)

Integration of Oracle Recovery Manager (RMAN) into SAP Tools:
(1) RMAN is Default Oracle Backup and Restore Program
(2) RMAN executables run in Client process and connection to Database
(3) Backup with RMAN is done in 2 ways
(i) RMAN classifies complete backup level 0 Backup
(ii) Level 0 serves as basis for Level 1 (Incremental)
(4) Backups performed without RMAN call CPIO or DD to save Database files to tape
NOTE: RMAN always writes the information in a separate file recovery catalog

(Q) Can RMAN recover the Database automatically without Recovery catalog ?
(A) NO

(5) RMAN performs Backups directly to Disks and not to Tapes
(6) RMAN uses Oracle shadow process to check for data block corruptions and filters those blocks and then writes used blocks to backup media.
(7) The Parameter to set the controls of copying data to Backup media to RMAN is TAPE_COPY_CMD or DISK_COPY_CMD= RMAN_DISK (RMAN Value)
(8) Advantages of using RMAN:
I) All blocks are checked for block corruption to ensure the consistency state.
II) Only used blocks are copied to Backup media
III) Empty blocks used before are always backed up

(Q) Is whole Backup can be consider as level 0 Backup ?
(A) Whole backup is not level 0 Backup and can’t be used as basis for Incremental Backup.

(9) RMAN writes Header, tailer and blocks of atleast one Database or one raw disk file to a file called SAVESETS
(10) Using SAVESETS speeds up Backup Process.

PREPARATORY RUN:
    Preparatory run is used to determine the optimal SAVESET distribution of data files we want to backup.
(Q) Why do we need to perform a preparatory run ?
(A) If Backup with RMAN is supposed to form sets then we need to run Preparatory run.
     Preparatory run can be run from DB13 prepare for RMAN Backup.
     No Backup is created during preparation run, only estimates Compression rate of BRTOOLS to compress the files and to determine compressed and decompressed file sizes.
     It is recommended to perform preparatory run per one Backup cycle.


Will update soon... Check next post...

Sap Database Notes -1


Sap Database Notes 1:-

Database :-

Oracle database: is a collection of data stored in one or more data files on disks.
                      Oracle manages database data in logical units called table spaces.



Table space: One or more data files.

Instance: Set of oracle background process and memory buffers form an instance.

Q) What happen when oracle instance is stored ?
      Shared global are allocated (SAG is allocated)
      Oracle background processes are started.

* In unix we can identify oracle process as individual system process
* In windows these processes run as threads with one common oracle OS process i.e. ‘Oracle.exe’.
* When an oracle instance starts a special process called listener, process opens and establish communication between net weaver and oracle.
* Listener process is not part of oracle instance; it is rather part of network process that works with oracle.
* In SAP dedicated server configuration is used. i.e. for each work process we have dedicated server processor called as shadow processes.
* The ratio of work process to shadow process is 1:1
* To handle database request for SAP uses a work process communicate with its core shadow process.
* Database data is permanently stored in datafiles or disks.
* To accelerate read and write access data it is cached in database buffer cache in SGA
* Shared pool divided into executable SQL statements which are stored in shared SQL area of the shadow pool.
* Oracle data dictionary is stored in row cache of shared pool.
* Data processing never takes place directly on disk, it is first copied by associated shadow process from disk to the database buffer cache in SGA.
* Oracle keeps most recently used data blocks in the database buffer cache.
* Sometimes oracle writes the least recently used data blocks in buffer cache.
* Modified data blocks are call as Dirty blocks.
* Shadow process never copies modified data into disk.
* Coping data into disk is done by a special background process called as ‘DBWO’ (DW writer).

Q) What are the situations in which DBWO writes dirty blocks to disks ?
 if the number of scanned buffers reaches a certain thresh hold.
 At a specific time that is when check point occurs.
* Scanning of the buffers is done by shadow process.
* Changes are done in two ways:
      Roll forward changes.
      Roll backward changes.
* Redo events are stored in redo.log files and performs roll forward recovery.
* Undo entries stored in undo table space performs rollback.
* Redo changes = committed changes = new value = after images.
* Undo changes = un committed changes = old value = before image.
* Oracle shadow process records redo changes and stores in redo log buffer of SGA temporarily.
* Oracle background process “log writer – LGWR” writes data in redo log buffer to online redo log files which are stored physically on disk.
* Redo log buffers is also called as circular buffer.
* Circular buffers records all committed and un-committed changes made to the database.

Q: What are the conditions in which log writer writes redo log buffer data to online redo log files ?
Ans: There 4 conditions:
 When transaction is committed.
 For every three seconds.
 When redo log is 1/3rd of full.
 When DBWR is about to write modified buffers to disk and some of the corresponding redo records have not at been written to online redo log i.e. write ahead logging.
* Each committed transaction will have a system change number (SCN) stored in redo log file.
* Size of Oracle redo log file is 40MB (fixed number). These are four predefined collections of online redo log files.
* At every log switch oracle will increase the log sequence number.
* Current online redo log file, ‘LGWR’ is writing into is call active online redo logo file.

Control files
This file is used to start and operate database.

Q) What are the entries in co files ?.
 Physical structure of database
 State of  database
 Table space information
 Names and location of data files and redo log files.
 Current log sequence number
* if physical structure of database is occurred then co.files get updated automatically.
* SAP stores co.files in three locations during installation of SAP. It is recommended to store the files in three physically separated hard disk.
* If database = open then co.file available for writing.
* Normally caches are small and don’t grow.
* ‘RMAN’ for backups, “cofiles may grow by factor 10”, because they contain information about RMAN backup.

Check point Functions:
* Checkpoint wakes up the database writer to copy all buffers that are dirty to the disk.
* It also updates header of all data files to record details of the check point.
* If writers information about the check point position in online redo log files into the cofile. This information is used during database recovery.
* Less frequently the checkpoint occurs the longer is the time the instance need for recovery.
* Checkpoints occurs at log switch.

Database Recovery:
* Online redo log files used for database recovery (instance recovery). After restart, the system performs automatic recovery.
* If online redo log files are lost during a crash, a complete recovery is not possible. Hence online redo log files must be mirrored i.e. two or more copies needs to be maintained.
* Oracle it self mirrors online redo log files by default.
* Online redo log fines are limited in size, and cannot grow automatically.
* Automatic instance recovery of online redo log files is possible.
* To manually restore and recover data files which are missing, we need both a database backup and all redo log information written after the backup.
* Archiving must be exclusively activated by tuning on archived log mode i.e. “LOG_ARCHIVE_START” is true.
* Archiving is take care by an oracle background process called as “ARCO” (archive)
* Oracle cannot mirror offline redo log files, hence we must use RAID.
* Offline redo log files and data files should be on different disk.

SMON (System Monitor)
* SMON performs recovery at instance startup
* It writers alert log information if any instance process fails.
* If cleans up temporary segments that are no longer in use.

PMON (Process Monitoring)
* This monitors shadow process.
* PMON roll backs, its uncommitted data, stops shadow process and frees resources incase of a client process crash.

Oracle Directory Structure in SAP
In Unix all directories are present under one single tree, where as in windows all directories are present under separate drive letters. They have 3 files inside the directories
 /database (Windows)    init<SID>.ora
 /database (Unix)       init<SID>.sap
 Spfile<SID>.ora (only from oracle 9i)
• Online redo log file = original log and mirror log.
• Define redo log files: original arch, SAP arch.
Note: All previous versions till oracle 8i has saparch directory.
• SAP trace = Alert <SID> log = SAP trace/background/user trace
• Data files = SAP data1
    ...
    ...
    ...
    SAP data <n>
There are 3 environment variables on database server
1. Oracle_SID = system ID for DB instance
2. Oracle_HOME = the directory for BR* tools.
3. SAP DATA_HOME = the data file directory.

• The home directory for oracle is ORACLE_HOME
• The location for cofiles and offline redo logs is configured in the oracle profile init<SID>.ora.
• The location for data files and online redolog files is stored in database.
• The oracle tool to ping is ‘TNSPING’

Oracle System Privileges
• SYS DBA and SYSOPR are oracle system privileges.
• Control at this privileges is outside the database.
• The privileges allow accesses to database instance even when database is not open.

Operating System Users and Groups (Start->programs->Admin tools-> Configure Management -> users, groups)

Users:
<SAP SID> Admin and ORAdb<SID> are the two users which are created in unix system,
where as <SAPSID> admin, <SAP service.SAP<SID> created in windows system.

Groups:
1. ‘ora_dba’ = Member of this groups can connect to oracle database as dba without a password.
2. ‘ora_<SID>_dba’ = admin group
3. ‘ora_<SID>_OPER = db operate group

Extra Groups:
SAP_<SID>_Global Admin = SAP Global Admin Group.
SAP_<SID>_Local Admin = SAP Local Admin Group
SAP_Local Admin = SAP local Admin Group

• Operating System group DBA will have administrative privileges, where as OS group OPER will have restricted privileges.
Note: Always assign database rates to users.
• Data base rolls have privileges.

Rolls:
DBA, SAPDBA are the two rolls.
DBA rolls is created by oracle
SAP DBA rolls is created by SAP.
• The Roll DBA has all admin privileges except the ‘SYS DBA’ and ‘SYS OPER’ system privileges
Note: The privileges ‘SAPDAB’ provides accesses for administrating certain tables.
• SYSOPER has all SYSDBA privileges except create DB and without ability to look at user data.

Database Users:
1. ‘SYS’ and ‘SYSTEM’ are created by oracle.
2. SAP <SID> are SAP <SCHEMA_id> is created by SAP.
3. Default user used by SAP to connect to database is system.
4. During installation oracle database, you will be promoted to enter the password for the user SYS, System, and SAP <SCHEMA_ID>
Note: OPS$ is an user which is created by SAP and doesnot need a password.
• SAP workprocess at OS level connect oracle with the user name ‘SAP<SCHEMA_ID>.
• The password for this user is stored in oracle system table ‘SAPUSER’
• Workprocess first connect to ‘OPS$ user and get the password for ‘SAP SCHEMA_ID’ from the table ‘SAP USER’.
• Never change the password for ‘SAP SCHEMA_ID’, always use ‘BR*’ tools, ie. ‘BRCONNECT’ to change the password.
• OS files stored in ‘ORACLE_HOME’ directory.
• ‘Listener_ora’ = contains all oracle system ID and protocol address.
• ‘TNSNAME.ORA’ = Contains all the list of server names for all the databases that can be accessed in the network.
• ‘SQL NET.ORA’ = Contains client side information.
• Oracle has one listener i.e. ‘LSNRCTL’
Options:
OS level : lnsnrctl_help
OS level : lnsnrctl_status = oracle.
Location of parameters and listener log files.
Note: ‘Listener_Ora = Listener tracing files.
Options:
1. Off = Offered
2. User = Limited Trace
3. Admin = Detail Trace


Will update soon... Check next post...