Sunday 7 July 2013

Oracle Disaster Recovery setup for SAP

Data Guard Configuration


        A Data Guard configuration consists of one production database and one or more standby databases. The databases in a Data Guard configuration are connected by Oracle Net and may be dispersed geographically. There are no restrictions on where the databases are located, provided they can communicate with each other. For example, you can have a standby database on the same system as the production database, along with two standby databases on other systems at remote locations.

You can manage primary and standby databases using the SQL command-line interfaces or the Data Guard broker interfaces, including a command-line interface and a graphical user interface that is integrated in Oracle Enterprise Manager.

Primary Database


          A Data Guard configuration contains one production database, also referred to as the primary database that functions in the primary role. This is the database that is accessed by most of our applications. The primary database can be either a single-instance Oracle database or an Oracle Real Application Clusters database.

Standby Database


          A standby database is a transitionally consistent copy of the primary database. Using a backup copy of the primary database, you can create up to nine standby databases and incorporate them in a Data Guard configuration. Once created, Data Guard automatically maintains each standby database by transmitting redo data from the primary database and then applying the redo to the standby database. Similar to a primary database, a standby database can be either a single-instance Oracle database or an Oracle Real Application Clusters database.

A standby database can be either a physical standby database or a logical standby database:

Parameter Settings:


initPRD.ora parameters:


Parameter for Primary Database:-



Data Guard Parameter for Primary

*.db_name='PRD'
*.log_archive_dest_1='LOCATION=/oracle/PRD/oraarch'
*.log_archive_dest_2='service=PRD_STBY.WORLD reopen=1800'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.fal_server='PRD_STBY.WORLD'
*.fal_client='PRD_PRIM.WORLD'
*.standby_archive_dest='/oracle/PRD/oraarch'
*.standby_file_management='AUTO'
*.service_names='PRD.WORLD'

Parameter for Standby Database:-


Data Guard Parameter for Standby
*.db_name='PRD'
*.log_archive_dest_1='LOCATION=/oracle/PRD/oraarch'
*.log_archive_dest_2='service=PRD_PRIM.WORLD reopen=1800'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='DEFER'
*.fal_server='PRD_PRIM.WORLD'
*.fal_client='PRD_STBY.WORLD'
*.standby_archive_dest='/oracle/PRD/oraarch/'
*.standby_file_management='AUTO'
*.service_names='PRD_STBY.WORLD'

Oracle-net Service Configuration.


TNS Names Entries for Primary: (tnsnames.ora)

PRD.WORLD =
(DESCRIPTION =
(SDU = 32768)
(ADDRESS_LIST =
(ADDRESS =
                (COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = Primary host)
(PORT = 1527)
)
)
(CONNECT_DATA =
(SID = PRD)
(GLOBAL_NAME = PRD.WORLD)
)
)
PRD_PRIM.WORLD =
(DESCRIPTION =
(SDU = 32768)
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = Primary host)
(PORT = 1527)
)
)
(CONNECT_DATA =
(SID = PRD)
(GLOBAL_NAME = PRD.WORLD)
)
)
PRD_STBY.WORLD=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = DR host)
(PORT = 1527)
)
)
(CONNECT_DATA =
(SID = PRD)
(GLOBAL_NAME = PRD_STBY.WORLD)
)
)



TNS Names Entries for Standby: (tnsnames.ora)

PRD.WORLD =
(DESCRIPTION =
(SDU = 32768)
(ADDRESS_LIST =
(ADDRESS =
                (COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = DR host)
(PORT = 1527)
)
)
(CONNECT_DATA =
(SID = PRD)
(GLOBAL_NAME = PRD.WORLD)
)
)
PRD_PRIM.WORLD =
(DESCRIPTION =
(SDU = 32768)
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = Primary host)
(PORT = 1527)
)
)
(CONNECT_DATA =
(SID = PRD)
(GLOBAL_NAME = PRD.WORLD)
)
)
PRD_STBY.WORLD=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = DR host)
(PORT = 1527)
)
)
(CONNECT_DATA =
(SID = PRD)
(GLOBAL_NAME = PRD_STBY.WORLD)
)
)

Listener.ora Paramaters:

Listner.ora entries for Primary:

LISTENER =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = IPC)
(KEY = PRD.WORLD)
)
(ADDRESS=
(PROTOCOL = IPC)
(KEY = PRD)
)
(ADDRESS =
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = Primary host)
(PORT = 1527)
)
)
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = OFF
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SDU = 32768)
(SID_NAME = PRD)
(ORACLE_HOME = /oracle/PRD/102_64)
)
)

Listner.ora entries for Standby:

LISTENER =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = IPC)
(KEY = PRD.WORLD)
)
(ADDRESS=
(PROTOCOL = IPC)
(KEY = PRD)
)
(ADDRESS =
(COMMUNITY = SAP.WORLD)
(PROTOCOL = TCP)
(HOST = DR host)
(PORT = 1527)
)
)
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = OFF
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SDU = 32768)
(SID_NAME = PRD)
(ORACLE_HOME = /oracle/PRD/102_64)
)
)


Operational Procedures:


Start up and Shut down a Physical Standby Database:


The following steps are used to start a standby database:

1. Start the database:
SQL> STARTUP NOMOUNT;
2. Mount the standby database:
SQL> ALTER DATABASE MOUNT STANDBY DATABASE;
3. Start the managed recovery operation:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT
2> FROM SESSION;

The following steps show you how to shut down a standby database:
1. Find out if the standby database is performing managed recovery. If the 
MRP0 or MRP process exists, then the standby database is performing managed recovery.
SQL> SELECT PROCESS, STATUS FROM V$MANAGED_STANDBY;
2. Cancel managed recovery operations.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
3. Shut down the standby database.
SQL> SHUTDOWN IMMEDIATE;


Cheers !!!

SAP Webdispatcher Installation and configuration

Download SAP WEBDISPATCHER executables from service market place
http://service.sap.com/patches

SAP NETWEAVER --> SAP NETWEAVER 04 -->Binary Patches -->SAP KERNEL (32/64Bit, unicode/non-unicode) -->Database Independent.

Download the kernel packet DW.SAR, this contains the SAP Web dispatcher (sapwebdisp).

Create a new directory in D:\usr\sap as sapwebdispatcher

Copy files sapwebdisp and icmadmin.SAR into this directory from downloaded DW.SAR

Extract icmadmin.SAR using SAPCAR

Generation of profile for the first time run command

D:\usr\sap\sapwebdisp>sapwebdisp –bootstrap

Then provide input as prompted

rdisp/mshost=hostname1
ms/http_port=8112
Instance number for SAP Webdispatcher = 11
HTTP Port number for SAP WebDispatcher=8011

Create configuration for Small(S)

It will generate Auth file icmauth.txt

Note down the user name and password from that window itself

Sapwebdisp.pfl,Add another line for redirecting URLs(Example for EP)

icm/HTTP/admin_0= PREFIX/sap/wdisp/admin,DOCROOT=./admin,AUTHFILE=icmauth.txt

icm/http/redirect_0 = /prefix=/, TO=/irj/portal,port 51100,HOST=EPHOST

Start the WEBDISPATCHER using

sapwebdisp pf=sapwebdisp.pfl - auto_restart

Now we can access portal using webdispatcher server
http://hostname1:8011/irj/portal



Cheers !!!

Friday 7 September 2012

Redeploy JAVA support packages in EP

To apply JAVA support packages we are normally using JSPM or SDM but now from NW 7.3 onwards we are not getting direct tool SDM so now every package has to be deploy through JSPM only.


If you have deployed any package and you want to redeploy the the same package with lower level or same level and you are not able to see in JSPM queue /usr/sap/trans/EPS/in then follow the SAP Note : 112333


It may happened you are using forcefully deploy option as per note 1123333 and then also you are not able to see the patch in queue or after applying also some of the component is missing then use the command line option to deploy as below.

Login with SIDadm

> telnet localhost 5<instance no>08

It will ask you for Login & password. Use administrator user & password and run the command

> DEPLOY -h

It will show you the help . Run the below command to apply the patch

> DEPLOY <path of the patch i.e. /usr/sap/trans/EPS/in/patch.SCA > versionRule = <all | lower etc as per help >


Cheers !!!

Monday 20 August 2012

Test call of transport control program (tp) ended with return code 0232



Today I was releasing the transport request at that time I was able to release the child request but parent request was giving the error like " Test call of transport control program (tp) ended with return code 0232"


This error is coming because of SAPSR3 user is expired in database.

SAP has suggested a note (1519872 - SAP Database User Profile SAPUPROF)  for this & now from Oracle 11G onwards we have to change the password of SAPSR3 user in every 6 months.

Change the password through BRTOOLS to update the same in SAPUSER table as well.

To avoid the change of password every 6 months download the profile script attached with the above note.

Run the script as per note & check the below command in sqlplus prompt to confirm the expiry date of users.

SQL > select USERNAME, ACCOUNT_STATUS, EXPIRY_DATE from dba_users;



Cheers.... :)



Saturday 18 August 2012

Welcome to SAP

Dear All,

Welcome to SAP world.

This blog is created for the solution seekers of SAP BASIS who are facing difficulties during their crucial activities at work.

Keep a check for the latest updates and stay headache free :)