Tuesday 8 March 2016

BACKGROUND JOBS FAILURE REASONS IN SAP SYSTEM

 BACKGROUND JOBS FAILURE REASONS

User and password issues(authorization ) user lock, userid expiry, password changes, lackof roles etc.
file system problems, btc reads from the file system to update the database, file not opened or corrupted, file sharing, file came with different characters, file not found as well.
Variants are not properly defined.
deadlocks issue
update mechanism failed
table space overflow
table space max extent reached
archive struck
the memory is not sufficient no roll area, PXA BUFFER PAGE ERRORS
problems in the program and inputs
dependent jobs events failure
Target systems are not available to process the jobs.

UPDATE MONITORING

update deactivated in sm14
programming problems in LUM
table space overflow
max extents reached
archive struck

SPOOL PROBLEMS

page setting issues
cartridge issues
printer not available
paper out
print server not available
Drivers corrupt
Network issues
More request in queue.

Export Import method

Client creation in target system
Logical system creation
Assigning logical system to created client
Local client copy
Memory availability
No user should logon(Down time needed depends upon client size)
Client export from source system through scc8.
Client import from in target system through STMS. DEV.
Client import post processing through scc7 in target client. QUA

Transport Got hang what are all to check

1.       Check RDDIMPDP JOB RUNNING OR NOT FROM SM37
2.       IF NOT RUNNING START RDDNEWPP FROM SE38
3.       CHECK FILE SYSTEM IS FULL
4.       CHECK TABLE SPACE
5.       CHECK ORAARCH IS FULL
6.       CHECK SYSTEM IS UP ARE NOT
7.       CHECK USER IS LOCKED OR NOT OR EXPIRED
  
What are all thing need to check when system is down

1.       check services like saposcol , sapsid ,orasid ,oralistener,oraagent-----5 services
2.       check network if Ip is reachable or not
3.       check file system
4.       check table space
5.       check database is reachable or not with command //// r3trans –d -----Return code 0000/0004/0008
6.       If db not reachable check db alert file.//////
Path: oracle/sid/ora102/saptrace/backgroundtrace
7.       Check work process over view with//////  ps –ef .
8.       check any offline backup running or not by using “ ps –ef|grep backup”
9.       check disp log message server log and work directory logs
10.   check work directory logs


System Refresh with PRD To QAS in SAP

System refresh is nothing but moving the production system data to quality system for testing purpose.
Generally system refresh will be done when the client size is more and we cannot move the production system data to quality system.
Types of system refresh:-
1.  Using offline backup
2.  Using online backup
Procedure:-
Source system (Production)
1.  Take the screenshots of important T-code
Ex: SCC4, SM58, ST06, SM36, SM37 and the clients specified t-cods.
2.  Export client settings – Table T000
3.  Printer settings – Table TSP03 and TSP03C
OR
In SPAD t-code we can export or import and delete the configuration
4.  RFC Destination – Table RFCDES
Note: - For all the above we have to create the DUMY transport request in t-code SE01.
5.  Apart from this we also take the backup of user master record. For this we will export SAP_USR profile in SCC8 t-code.
6.  For all the transport requests we have to take down the transport number.
7.  Take the clean offline backup (Will be done by backup team)
8.  Generate the control file using the command
Alter database backup controlfile to trace
File will be stored in path- oracle/SID/saptrace/usetrace
9.  Edit the control file as mentioned below
a.   Delete above startup nomount
b.  Delete below character set UTFS ;
c.   Replace Reuse to SET – Will change Source SID to Target SID.
d.  Replace No Resetlog to Resetlog – Will change the log sequence of offline redolog files
e.   Replace Archiving to No Archiving – Will avoid creating log files while starting the system
10.              Save the control file as .sql or .trc.

Target system (Quality)
1.  Delete all contents inside
Sapdata1, sapdata2 to sapdataN, origlog A, origlogB, MirrorlogA, MirrorlogB, saptrace, sapreorg, sapcheck
Command to delete – rm –rf sapdata*
2.  Ask backup team to restore the source system backup to target system

Note: If we have root access no problem, if it is not there UNIX team will change root permission.
    Command is chown –r
        
         Change the permission inside root
            Command – chown –r datafile name
3.  Run the script – DB will come to nomount state
4.  Then recover the database using the command
Recover database using controlfile untill cancel
5.  Execute command
Alter database open resetlog – It will reset redolog sequence number
6.  Then execute command – shutdown immidate
7.  Execute startup – will start oracle
8.  Change the OPS$ password – Through BRTOOLS – BRCONNECT – 8, 4
9.  Make background process Zero
Rdisp/wp_no_btc=0
10.      Startup – Will start SAP

Post activity:
1.  Import RFC definition, client settings, printer settings, Delete and configure SMQ1 and SMQ2
2.  Change the background parameter
3.  Restart the system

If we are using online backup then we have do below mentioned steps.
1.  Perform point-in recovery
2.  To do point-in recovery we have to copy the orccrch directory from source system to target system.
Command - Recover database using controlfile untill time and date.

After refresh if the system is not starting do the below steps.
1.  Check R/3 trans is working or not
Command- R3trans –d – It will check the connection between SAP and DB
2.  Delete source system OPS$ password
3.  Change OPS$ password through BRCONNECT option 8, 4

Note: SQL file character will be changed in init.ora file
    Path: oracle/SID/102_64/dbs/init.ora
            oracle/SID/102_64/dbs/init.sap

System Refresh


System Refresh: Backup/Restore Method (Oracle & Linux Environment)

Scenario


Source System
• SAP ECC6.0 with Kernel Release 700
• Oracle Database 11g
• SUSE Linux
Target System
• SAP ECC6.0 with Kernel Release 700
• Oracle Database 11g
• SUSE Linux
•  Point in Time Recovery Method
Pre-Steps
1. Check the database backup for source and target systems are completed successfully.
2. Check the sapdata directory size for source and target systems are sufficient.
# df -kh | grep sapdata
3. Put the system messages via transaction code SM02 on the target system to warn users that the system refresh is happening.
4. Create a control file of the source system and sent to the target system. Please be aware that the creation of the control file is advisable to generate after the source system backup is completed. This is because we are using point in time recovery method. This is to avoid any other sapdata is added in between the control file is created.
5. On transaction code SE10. Tick all for Request Type and tick only Modifiable for Request Status. List down all the transport that has not been released. Forward the transport list to the appropriate team (Functional) for further analysis. (Hint) You can released the transport directly via transaction code SE03. All Modifiable transport will wipe out after the system refresh.
6. If your refresh system is in CUA landscape (child CUA), please take the screenshot as per this linkhttp://itsiti.com/find-cua-parent-sap-system
http://i1.wp.com/itsiti.com/wp-content/uploads/2011/08/SCUA.jpg?resize=600%2C300
7. Take screenshot of SCC4: Client Overview (including the each client details). Compare with the source system and please be noted that on each client that are not existed, you will need to use SAP_ALL during the client copy process.
http://i2.wp.com/itsiti.com/wp-content/uploads/2010/11/SCC4-Clients%20Overview.png?resize=593%2C215
8. Screenshot of SCOT, STMS, SMLG, RZ12, RZ04, DB13, BD54, WE20, WE21, SM37 – capture all released jobs, STRUSTSSO2, SE06, RSA1, RSA7.
9. Export the User Master Export (UME) from client 000 and client production(s). Please refer tohttp://itsiti.com/sap-client-export-import-using-scc8
10. Export the all the printer configured to your local computer/laptop. Please refer tohttp://itsiti.com/export-import-printers-in-sap
11. Export the RFCDOC & V_TBDLS tables via transport of copies. Please refer tohttp://itsiti.com/export-import-table-rfcdoc-v_tbdls-via-transport-of-copies
System Refresh
1. Bring down the target system and delete the SAP data files on the target system. Now, copy the SAP data files from source to the target system.
2. Edit the control file (adapt the control file to target SAP system). Create the control file and open the database.
3. Add Temp files to database (PSAPTEMP)
4. Import the table.
5. Disable R/3 RFC destinations
6. Cleanup SID –dependent tables
7. Create the OPS$ connect mechanism.
Post Steps
1. Install License Keys.
2. Disable Background work processes
3. Check SAP/Oracle connectivity
R3trans -d
4. Edit and adapt below configurations from the following transaction codes and reports
• SCC4 – Change Client Role
• SE06 – Set System Change settings
• STMS – Configure Transport System
• SCOT – Disable Smtp Client
• SM37 – Set All Batch Jobs To Scheduled Mode
• SICK – Check System Is Ok After Restart
• DB02 – Refresh Database Stats
• BD54 – Change Logical System Descriptions
• SPAD – Convert Printers
• RZ10 – Import Active Profiles
• RZ04 – Delete And Recreate Op Modes
• Update RFC Destinations
• Delete Old OSCOL Definitions
• SMLG – Delete And Recreate Login Groups
• SM61 – Update Batch Processing Servers
• RSTS0022 – Delete Old Temse Objects
• RSBTCDEL2 – Delete Old Batch Job Logs
• SE61 – SAP Sign On Message
• Delete And Recreate DB13 Jobs
• RZ12 – Delete And Recreate RFC Login Groups
• SCUA, SCUM, SCUG, SCUL – Central User Administration
• WE20, WE21 – Partner Profiles
• SM36 – Configure SAP standard jobs
• SWU3 – Automatic Workflow Customizing
• SECSTORE – Administration program for SECURE STORAGE
• SCC7 – Import / Post processing of users
• SM21 – Check system log
• ST22 – ABAP dump
5. Perform full backup and hand over to ABAP and FUNCTIONAL team to verify!


Starting and Stopping SAP

Starting and Stopping SAP

Starting and stopping SAP system is a very much procedural and sequential.
Start Sequential
Start services – Start Database – Start Central Instance – Start Dialog Instance

Start Services
Services will come only in Windows so we need to start the SAP and Database services if they are not running automatically.

SAP Services
1. SAPOSCOL (This will collects OS related information)
2 SAP_ Ex: SAPPRD_00 (Control the SAP instance)

Database Services
1. Create the connection to the database
2. Control DB actions

Start Database
Underlying element of SAP system is Database Therefore database has to be started first.

Start Central Instance
In this stage operating system collector called SAPOSCOL is started. It can also be started later in T-code ST06. SAPOSCOL will runs in the operating system background and collects the data about operating system resources and makes this available through shared memory of all the SAP instances. In this stage first message server and Enqueue server will be started. Once these both are started Dispatcher will be started at last work processes will be started.

Note – Dialog instance should be started after the message server and Enqueue server are started.

Next Step: - When an instance is started it reads the start profile. Start profile contains the information like type of processes, number of processes, Main memory size and other.

Profile path: - usr/sap/SID/sys/profiles

Dispatcher will reads the default profile which contains the configuration information of the instance. Dispatcher will start the work processes and creates the instance specific configuration. After the instance is successfully started all the work processes connects to the database.

Procedure of Starting the SAP System: -
SAP can be started in 2 ways
1. Using the Microsoft management console
2. Using the command startsap

After logon to system execute T-Code SM50 and check the number of work process running and also in OS level execute the command disp+word to see the work process.

Logs of Start Process:-
Status of the start process is written in to the log files in Sap home directory of the relevant instance. Log files will be in the form of……
STDERR1 – Database System
STDERR2 – Message Server
STDERR3 – Dispatcher

Problem Analysis of start process
1. SAP system logs
2. SAP trace files
3. Database error log files
Note: If any problems come while starting the SAP system we need to check the log files. How and where to check?
Go to work directory (path usr/sap/sid/dvbmgs/work
Check the latest updated files of the Dispatcher, Workprocess, and Message Server.
In windows MMC right click on gray colour and select trace file directly it takes to the trace file.

Logs files looks like
1. Startsap.log
2. Stopsap.log
3. StartDB.log
4. StopDB.log
5. Dev_disp - Dispatcher log
6. Dev_msg - Message server log
7. Dev_W(XXX) Work process log

Stopping the SAP system
Mostly the SAP system will be stopped during if not able to overwrite the kernel, when system parameters are changed and for some other maintenance activity. Stopping the SAP system should be in sequence to avoid the inconsistency in the system.

Before stopping the system some of the things need to be taken in to consideration.
1. Check the logged-on users in SM04
2. Check the background jobs running in SM37
3. Batch inputs in SM35
4. Updates in SM13
5. External connections
Note: Before stopping the system it is important to inform all the users, so create the system message in SM02

Sequence is stopping
1. Stop the Dialog instance
2. Stop the central instance
3. Stop the database