Showing posts with label SAP. Show all posts
Showing posts with label SAP. Show all posts

Wednesday, 3 September 2014

How to Clear SCOT Error from Production Server?

1. Execute SCOT transaction

2. Go to Utilities

3. Overview of Send orders

4. Go to SOST transaction and Select all error messages. You can use Tab send status for         this and by using the respective tick marks.


5. Select Error Data and Repeat Data.

6. Go to SM37, select the respective Jobs, Copy the Jobs and Release with an authorized user or     your ID.


7. Check with SCOT transaction all error data has cleared.

Do we need to really log-out and log-in again to make authorization changes effective?

Whenever any changes were made to the user authorizations, normally it is required to log-out and log-in again to make these changes effective.

Here is an alternative:


Execute the report RSUSR405 in SE38. This would refresh all user-related buffers and changes to the authorizations are made effective immediately.

How to get List of transactions executed by a User in a specific period of time?

To get the list of transactions executed by a user in a specific period of time:

     1. Go to ST03. Select choose for analysis. Choose only one application server at a time in case       you have multiple application servers. Choose time period of your choice.

     2.  In the next screen from menu choose GO TO-->PROFILES->-USER PROFILES. Here you will get     the list on users who have worked on that application server.


      3. Double click on the required user and you will get all the transactions he/she has executed.

  4.   In case you select TOTAL in step 1 and then follow the steps 2 and 3 you will only get the list      of application server on which the user has worked and not the transaction details.

SAP idle session time out / Logging off inactive users?

To activate automatic logging off, do the following:

1. Go to Profile Maintenance by choosing Tools --> CCMS --> Configuration --> Profile        Maintenance    or the transaction RZ11.

2. Maintain the parameter rdisp/gui_auto_logout. Enter the required number of seconds of inactivity  before the user is logged off automatically.

3.To deactivate automatic logoff, delete the parameter from the profile(s) or set the value '0'.

Tuesday, 2 September 2014

How to delete old batch session on SM35

Users have created a ton of batch input sessions and processed them with SM35. The users did 

not care about deleting unwanted sessions and there are a lot of old sessions, with almost any 

status (in processing/in background/processed/errors). All of them are junk (in your terms), and 

have to be removed from the system.


You can delete unwanted sessions with ABAP program RSBDCTL6 at once and then setup a 

background job that deletes the sessions for a specific session, user who created the session, 

date range, older than x days etc. that runs on a regular basis.


As an alternative, you can run program RSBDC_REORG. However, our tests showed that this 

program may not be suitable for sessions that have a status other than processed.



Note: This has been validated on a ECC 5.0 system. Please consult SAP Marketplace if your 

system doesn’t have these programs and/or if these are suitable for your release.

How to upgrade SAP Kernel on Unix?


For NetWeaver 7.0 ABAP stack only KERNEL UPGRADE?

To Upgrade Kernel on UNIX!

1. stopsap
2. clean shared memory
3. saposcol -k
4. ps -ef|grep sapstartsrv
5. kill
6. cleanipc
7. lsnrctl stop
8. backup your kernel
9. cd /sapmnt/
10. cp -pr exe exe.bkp
11. extract new kernel
12. cd exe
13. SAPCAR -xvf
14. Start saposcol
15. startlistener
16. startsap




How to export and import RFC information

This can be used to take backup of RFC destinations before systm copy and can be restored once system copy is over.

1. Login to SAP Server with sidadm user
2. create a file with rfcexp.dat with below mentioned data
export from source system
client=300
file="F:\rfcexp.ctl"
Select * from rfcattrib
Select * from rfcdes
Select * from rfcdoc
Select * from RFCSYSACL
select * RSECACHK
select * RSECACTB

3. Run command R3trans -w rfcexp.log F:\rfcexp.dat
4. Export should be over with RC=0
5. For import create file rfcimp.dat with following content

import
file="F:\rfcexp.ctl"

6. Run Command R3trans -w rfcimp.log rfcimp.dat

RFCs should be imported 

How to configure HTTPS on SAP

Here is the procedure to activate the HTTPS for SAP system.

1)  Download SAP Cryptographic from SAP service market place

Service market place

From above link download SAP Cryptographic Library for your OS.

2. Uncar the archive using SAPCAR –xvf and copy the same to kernel directory. (/sapmnt/SID/EXE)

3. Add SAP profile parameter (RZ10) icm/server_port_2 = PROT=HTTPS, PORT=, restart system.

4. Run command on OS level with user sidadm

sapgenpse gen_pse -p SAPSSLS.pse

it will prompt for certain inputs and passwords provide the same and finish.

5. Go to SMICM and check available services, https should be in active mode to work perfectly.

How to configure Central User Administration (CUA)

Here is the procedure for Central user administration configuration in a landscape:

1. Create Logical systems to all clients for the landscape using BD54 or SALE as
   comfortable.

2. Attach Logical system to clients using same.

3. Create RFC connection to relevant systems with the same name as logical system name.

If you Logical system name is SIDCLNT100 for dev then create RFC connection to
DEV with same name SIDCLNT100.

4. Let us suppose you Central system: DEVCLNT100
Child system: QUACLNT200

5. Create user CUA_DEV_100 in devclnt100 system

4. Create user CUA_QUA_200 in quaclnt200 system.

Create RFC’s to child systems from central and central to child.

5. Now logon to central system and execute tcode SCUA to configure CUA.

Enter the name of the distribution model: CUA

Press create

Enter ALL Child system RFC’s

Save your entries now result screen will appear

If you expand the nodes for

the individual systems, you normally see the following messages for

each system: .ALE distribution model was saved,. .Central User

Administration activated and Text comparison was started.. 

If problem messages are displayed here, follow the procedure in SAP Note 333441:

6. Setting the Parameters for Field Distribution

Enter Tcode SCUM in central system following screen will appear

Now maintain your filed distribution and save it.

You can use transaction SUCOMP to administer company address data.

You can use transaction SCUG in the central system to perform the 
synchronization activities 

between the central system and the child systems by selecting your child system on the initial

screen of transaction SCUG and then choosing Synchronize Company Addresses in the 

CentralSystem

After you have synchronized the company addresses, you can transfer the users from the newly 

connected child systems to central administration.

This is done, as with the synchronization of the company addresses, using

transaction SCUG in the central system. To do this, on the initial screen of

transaction SCUG, select your child system and choose the Copy Users to

the Central System button.


Use:

You can use the report RSCCUSND from the central system of Central User Administration (CUA) to synchronize the master data of selected users with a child system of the CUA. The report sends the master data (including role and profile assignments) to a child system of the CUA.
If master data exists in the child system for the user sent, it is overwritten.

Procedure:

1. Start report RSCCUSND (for example, using transaction SA38).
2. In the Receiving System field, specify the child system to which you want
    to send the user data.
3. You can use the fields User and User Group to restrict the number of users.
4. Specify the data that you want to distribute under Distribution Options.
5. Choose Execute.

SAPPFPAR : tools to check SAP Server profile

SAP kernel has a little part called sappfpar. This little program is used to check whether your SAP profile has already well configured or not. It will suggest gave you a suggestion if there are any of your set parameter on SAP profile is not fit or not good enough.

To run this command, you need to log on as adm user.

Syntax :
adm$sappfpar check pf=/directory_where_profile_reside/profile_to_check
Here are the sample :
host:adm 6> sappfpar check pf=/sapmnt/profile/_DVEBMGS10_host
================================================================================
Checking profile: /sapmnt//profile/_DVEBMGS10_host
================================================================================
Shared memory disposition overview
===============================================================
Shared memory pools
Key: 10 Pool
Size configured.....: 188000000 ( 179.3 MB)
Size min. estimated.: 185403586 ( 176.8 MB)
Advised Size........: 188000000 ( 179.3 MB)

Key: 40 Pool for database buffers
Size configured.....: 126000000 ( 120.2 MB)
Size min. estimated.: 122104088 ( 116.4 MB)
Advised Size........: 126000000 ( 120.2 MB)

Shared memories inside of pool 10
Key: 11 Size: 500000 ( 0.5 MB) Factory calender buffer
Key: 12 Size: 6000000 ( 5.7 MB) TemSe Char-Code convert Buf.
Key: 13 Size: 40500000 ( 38.6 MB) Alert Area
Key: 14 Size: 20000000 ( 19.1 MB) Presentation buffer
Key: 17 Size: 2672386 ( 2.5 MB) Roll administration
Key: 30 Size: 20480 ( 0.0 MB) Taskhandler runtime admin.
Key: 33 Size: 30720000 ( 29.3 MB) Table buffer, part.buffering
Key: 34 Size: 10240000 ( 9.8 MB) Enqueue table
Key: 51 Size: 3200000 ( 3.1 MB) Extended memory admin.
Key: 54 Size: 20488192 ( 19.5 MB) Export/Import buffer
Key: 55 Size: 8192 ( 0.0 MB) Spool local printer+joblist
Key: 57 Size: 1048576 ( 1.0 MB) Profilparameter in shared mem
Key: 58 Size: 4096 ( 0.0 MB) Enqueue ID for reset

Shared memories inside of pool 40
Key: 42 Size: 10752992 ( 10.3 MB) DB TTAB buffer
Key: 43 Size: 33414392 ( 31.9 MB) DB FTAB buffer
Key: 44 Size: 8838392 ( 8.4 MB) DB IREC buffer
Key: 45 Size: 5766392 ( 5.5 MB) DB short nametab buffer
Key: 46 Size: 20480 ( 0.0 MB) DB sync table
Key: 47 Size: 10241024 ( 9.8 MB) DB CUA buffer
Key: 48 Size: 300000 ( 0.3 MB) Number range buffer
Key: 49 Size: 2769392 ( 2.6 MB) Spool admin (SpoolWP+DiaWP)

Shared memories outside of pools
Key: 1 Size: 2500 ( 0.0 MB) System administration
Key: 2 Size: 33600808 ( 32.0 MB) Disp. administration tables
Key: 3 Size: 114048000 ( 108.8 MB) Disp. communication areas
Key: 4 Size: 513448 ( 0.5 MB) statistic area
Key: 6 Size: 638976000 ( 609.4 MB) ABAP program buffer
Key: 7 Size: 14838 ( 0.0 MB) Update task administration
Key: 8 Size: 134217828 ( 128.0 MB) Paging buffer
Key: 9 Size: 134217828 ( 128.0 MB) Roll buffer
Key: 16 Size: 22400 ( 0.0 MB) Semaphore activity monitoring
Key: 18 Size: 917604 ( 0.9 MB) Paging adminitration
Key: 19 Size: 50000000 ( 47.7 MB) Table-buffer
Key: 31 Size: 4806000 ( 4.6 MB) Dispatcher request queue
Key: 41 Size: 25010000 ( 23.9 MB) DB statistics buffer
Key: 52 Size: 40000 ( 0.0 MB) Message Server buffer
Key: 62 Size: 85983232 ( 82.0 MB) Memory pipes
Key: 63 Size: 409600 ( 0.4 MB) ICMAN shared memory
Key: 64 Size: 4202496 ( 4.0 MB) Online Text Repository Buf.
Key: 65 Size: 4202496 ( 4.0 MB) Export/Import Shared Memory
Key: 1002 Size: 400000 ( 0.4 MB) Performance monitoring V01.0
Key: 58900110 Size: 4096 ( 0.0 MB) SCSA area

Nr of operating system shared memory segments: 22

Shared memory resource requirements estimated
===============================================================
Nr of shared memory descriptors required for
Extended Memory Management (unnamed mapped file).: 8

Total Nr of shared segments required.....: 30
System-imposed number of shared memories.: 1000
Shared memory segment size required min..: 638976000 ( 609.4 MB)
System-imposed maximum segment size......: 35184372088832 (33554432.0 MB)

Swap space requirements estimated
================================================
Shared memory....................: 1475.9 MB
..in pool 10 176.8 MB, 98% used
..in pool 40 116.4 MB, 96% used
..not in pool: 1174.5 MB
Processes........................: 228.8 MB
Extended Memory .................: 4092.0 MB
------------------------------------------------
Total, minimum requirement.......: 5796.7 MB
Process local heaps, worst case..: 1907.3 MB
Total, worst case requirement....: 7704.0 MB

Errors detected..................: 0
Warnings detected................: 0
If any errors and Warnings, it will display
Errors detected..................: 1
Warnings detected................: 1



How to update using SPAM,SAINT

Importing a SPAM/SAINT Update

Use: A SPAM/SAINT Update (SPAM update for short) contains updates and improvements to Support Package Manager and Add-On Installation Tool. There is always one SPAM update for each release.

The latest SPAM update is also available in SAP Support Portal, under service.sap.com/spManager.

Make sure you always have the most recent version of SPAM update before importing Support Packages or Installation Packages.

Prerequisites
You can only import a SPAM update if there are no terminated packages in the system.

A dialog box informs you if there are any terminated packages. You then have two options:

● Import the entire queue to begin with and then the SPAM update.

● Delete the queue, import the SPAM update, then import the queue.

You can only delete the queue if module Import 1 has not yet started (up to phase SCHEDULE_RDDIMPDP).

Procedure
1. Call Support Package Manager (transaction SPAM).

2. Check if the SPAM update offered is newer than the one in your system.

3. To import the most recent SPAM update, choose Support Package ® Import SPAM update.

SPAM updates are automatically confirmed once they have been imported.



Sunday, 27 July 2014

DB post steps

DB post steps:


1. Create OPS$ users

SQL> select tablespace_name,status from dba_tablespaces;

TABLESPACE_NAME         STATUS
------------------------------ ---------
SYSTEM                         ONLINE
SYSAUX                         ONLINE
PSAPUNDO                    ONLINE
PSAPTEMP                     ONLINE
PSAPCRM                       ONLINE
PSAPCRM731                 ONLINE
PSAPCRMUSR                ONLINE



SQL> create user OPS$BCRADM DEFAULT TABLESPACE PSAPCRMUSR temporary tablespace psaptemp identified externally;

User created.

SQL> create user OPS$ORABCR DEFAULT TABLESPACE PSAPCRMUSR temporary tablespace psaptemp identified externally;

User created.

SQL> grant connect, resource to ops$bcradm;

Grant succeeded.

SQL> grant sapdba to ops$orabcr;

Grant succeeded.

2. Drop exBIDing table ops$sidadm.sapuser (Source <sid>)

SQL> drop table ops$c2radm.sapuser;

Table dropped.

3. Create table ops$sidadm.sapuser (target <sid>)

SQL> create table ops$BCRadm.sapuser (userid varchar2(256), passwd varchar2(256));

Table created.

SQL> insert into ops$BCRadm.sapuser values ('SAPCRM','a234678z');

1 row created.


SQL> alter user sapcrm profile default;

User altered.

SQL> alter user system identified by a234678z;

User altered.

4. Update schema owner password using brconnect.

brconnect -u system/a234678z -f chpass -o sapcrm -p a234678z

5. Run scripts sapdba_role.sql and sapconn_role.sql

 sapdba_role.sql :

 sqlplus /nolog @sapdba_role <SAPSCHEMA_ID>
 <SAPSCHEMA_ID>: for owner SAPR3: R3, SAP<SID>: <SID>, SAP<SID>DB: <SID>DB

sapconn_role.sql :
sqlplus /nolog @sapconn_role

Starting SAP

1. Verify <sid>adm environment pinting to 11g binaries, 11g client

DIR_LIBRARY
LD_LIBRARY_PATH
TNS_ADMIN
ORACLE_HOME_PATH

2. Go to cdexe and run ldd dboraslib.so , should be able to load libraries

hostname:bcradm 11> cdexe
hostname:bcradm 12> ldd dboraslib.so
        linux-vdso.so.1 =>  (0x00007fff1e9ff000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f43e8d81000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f43e8b78000)
        libclntsh.so.11.1 => /oracle/client/10x_64/instantclient/libclntsh.so.11.1 (0x00007f43e61c2000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f43e5e21000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f43e5b1a000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f43e5896000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f43e5680000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f43e5463000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003a7b400000)
        libnnz11.so => /oracle/client/10x_64/instantclient/libnnz11.so (0x00007f43e5097000)
        libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f43e4e7e000)
        libaio.so.1 => /lib64/libaio.so.1 (0x00007f43e4c7c000)

3.Run R3trans –d using <sid>adm, return code to be 000

If return code other than 000 analyse r3trans.log
hostname:bcradm 13> R3trans -d
This is R3trans version 6.23 (release 720 - 17.09.12 - 20:12:05 ).
unicode enabled version
R3trans finished (0000).


4. Startsap and verify startup logs

Ps –eaf| grep dw
Ps –eaf| grep sap
Ps –eaf| grep ms ,
ps –eaf| grep scs,
ps –eaf| grep ers

5. Login to SAP via sapgui and apply sap license

Record hardware key to generate saplicense via sap market place
hostname:bcradm 16> saplicense -get
saplicense: HARDWARE KEY = xxxxxxxxxxx

6. Set below paaremter to login with user sap* 000 client

DEFAULT.PFL:login/no_automatic_user_sapstar = 0
Set below paramters relevant to transport

Example:
BIR_DVEBMGS01_sapbirci:DIR_EPS_ROOT = /usr/sap/trans/isu/BIR/EPS
BIR_DVEBMGS01_sapbirci:DIR_TRANS = /usr/sap/trans/isu/BIR

7. Reinitialize TMS after DB copy

logon to 000  as DDIC
Run transaction SE06 -->database copy or database migration
Reinstall CTS -->  yes
change original <S_System <SID>>to <T_System <SID>> -->yes
cts not configured --> ok
delete the TMS Configuration --> yes
delete all versions of transports --> yes
delete transport routs --> yes
Configure TMS

Logon to 000 Client with user DDIC and password

Go to STMS and configure TMS as self domain, verify domain.cfg tp_domain.PFl creation at right location at OS level.

Go to system overview, create a virtual system
Go to transport routes and add routes, adjust and dBIRribute

8. Suspend background jobs, run report BTCTRNS1

9. Configure SAP Profile Parameter Files

After the database restore, the active profiles lBIRed in the SAP system will be from the old hostname.  These profiles need to be deleted and the profiles from the OS need to be re-imported.  Proceed as follows:

Run transaction RZ10.

Delete source system profiles:

Click the Profile drop-down box and choose a profile (this process must be done for each profile).
Select menu items: Profile -> Delete -> All versions of a profile.

Click Yes to first prompt to update the database

Click No to delete the files from the OS Level

Click green check on all versions deleted screen

Repeat steps 1-3 for all source system profiles lBIRed in the Profile drop-down lBIR.

Import all profiles from UNIX by selecting menu items: Utilities -> Import Profiles -> of active servers.

Green back arrow.

10. Fix Logon Group Names

Run transaction SMLG

Add the newly added systems to exBIRing LOGON groups.
Highlight the New Hostname Entries.
Click the Assign Group button and assign the Logon groups respectively.
Highlight the Old Hostname Entries.
Click the Delete button.
Save.  

Note: Do not delete the groups instead of that delete only instances assigned. If you delete the groups both the groups and instances will be deleted.

Re-execute transaction SMLG once again and validate the logon group configuration.


11.Fix RFC Server Group

Run transaction RZ12
Add the newly added systems to exBIRing server groups.
Click create assignment provide exBIRing server group name and hostname
Choose apply current quotos and save


12. Configure Op Modes

After the database restore, the target system will contain Operation Modes from the old hostname.  These Op Modes need to be deleted and the correct Op Modes need to be imported.  Proceed as follows:
Run transaction RZ04
Choose exiting operation mode and delete
Click create operation mode
Select a server name and press SHIFT F2.
Do this for each source system op mode lBIRed.
Click the SAVE button and provide day mode
Click yes to add other operation mode (night), select no and save.

13. Create RFC’s between CRM, ISU and BW systems

CRM --> ISU & ISU --> CRM
Use user rfcuser or copy rfcuser with in the rfc and maintain the rfc’s, perform authorization test
CRM --> BW & ISU --> BW
Use user KIWALE with in the rfc connections
BW --> CRM & BW -->ISU
Use user BIWREMOTE, ALEREMOTE or rfcuser relevant to system

14. Logical system conversion

Go to SCC4 and record the logical system

Go to WE20 and record logical systems relevant to ISU, CRM and BW
      
1. Disconnect from previously connected BWR (EX : BWR – source , BWS – target) 

(For all systems that are source systems of BW: ISU, CRM)
Run Transaction SE37
Enter RSAP_BIW_DISCONNECT
Hit Test/Execute (F8)
Enter data into the following fields:
I_BIW_LOGSYS:  BWRCLNT500
I_OLTP_LOGSYS: <Logical system for your Production System>
I_FORCE_DELETE: X
Hit execute (F8)

Difference between PFILE and SPFILE? What are their advantages?

Difference between PFILE and SPFILE? What are their advantages?

 PFILE

Until Oracle 8i, we were using a text file called the PFILE (parameter file) for setting the database initialization parameters. This PFILE is read at instance startup time to get specific instance characteristics. The PFILE is text based, and can be edited in an editor like vi on UNIX or Notepad on Windows. Any changes that were made in PFILE would only take effect when the database is restarted,
Since SAP/Oracle recommends using SPFILE over PFILE, I will provide some details on SPFILE to answer your question in more detail.

SPFILE

In Oracle9i, a new feature called SPFILE (server parameter file) was introduced. SPFILE is a binary file that contains the same information as the old PFILE. SPFILE permits dynamic changes without requiring you to restart that instance.

By default, if you do not specify PFILE in your STARTUP command, Oracle will use server parameter file (SPFILE). If you choose to use the traditional text initialization parameter file (PFILE), you must specify the PFILE clause when issuing the STARTUP command.

The SPFILE is different from the PFILE in that it cannot be directly edited. This is because it has a header and footer that contain binary values. Since you cannot change a SPFILE directly, Oracle allows you to manage the SPFILE via the ALTER SYSTEM command.

When you execute the ALTER SYSTEM command, the parameter change is validated immediately, which helps avoid errors associated with entering an incorrect parameter name or an invalid value. In addition, the ALTER SYSTEM allows you to specify whether you want to update the parameter immediately, update just the SPFILE, or both. All these features help avoid human error associated with manually updating a PFILE.

The following example shows how to change the current value of SESSIONS and store the value in the SPFILE.

SQL> ALTER SYSTEM SET SESSIONS=200 SCOPE=SPFILE;

The new part in this command is the parameter SCOPE. You have the following options for this.
SCOPE = SPFILE

(For both static and dynamic parameters, changes are recorded in the spfile, and will take effect in the next restart.)

SCOPE = MEMORY

(For dynamic parameters, changes are applied in memory only. No static parameter change is allowed.)

SCOPE = BOTH

For dynamic parameters, the change is applied in both the server parameter file (SPFILE) and memory. No static parameter change is allowed.)
For dynamic parameters, we can also specify the DEFERRED keyword. When specified, the change is effective only for future sessions.

Now for the first part of your question. Since you are using Oracle 10G, you have to use the ALTER SYSTEM command to change the Oracle parameters as recommended by the SAP Early Watch Alert.