cancel
Showing results for 
Search instead for 
Did you mean: 

SAP system can not connect to Oracle standby host after switchover

Former Member
0 Kudos

Hi,

We are having DR setup for our ECC (dual stack) system using Oracle Data Guard. Recently we did the Mock drill for that and SWITCHOVER for that went successfully. But when we tried to start SAP system, disp+work got failed & SAP didn't started.

We have Three separate hosts as below (all are Windows 2008),

1. SAP Application server ( Single application server / ECC EHP 5)

2. Primary database host (oracle 11 g)

3. DR database host (oracle 11 g)

We are having only ONE SAP application server and we want to use that same application server when database SWITCHOVER happens.

I have followed below guide for data guard setup,

http://www.oracle.com/us/solutions/sap/wp-ora4sap-dataguard11g-303811.pdf

As the SWITCHOVER at DB level gone fine, So connectivity w.r.t. tnsping & listener has no issue. DG config also works fine. I had checked the database status manually and DR was in OPEN status and primary DB was in MOUNTED status when SWITCHOVER occurred. So from DB level everything was fine.

I changed parameter "SAPDBHOST=DR host" and  "j2ee/dbhost=DR host" in Default profile of SAP before starting the SAP system (after SWITCHOVER), But SAP didn't able to connect to DR database & disp+work process got died.


I checked the work process log and found errors as below,

and the same error was coming when R3trans -d was executed from SAP application server host. Error log file is attached "Trans.log".


As of now I have reverted SWITCHOVER and now working with original primary server. I need to know what I have missed & what is the requirement for connecting same SAP application server to DR database after SWITCHOVER.

Thanks for your help!!


Best Regards,

Kiraang.

Accepted Solutions (1)

Accepted Solutions (1)

divyanshu_srivastava3
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi, error ORA-01033 in dataguard environment means you are connecting  your standy database .

Check your tnsnames.ora after switchover is pointing new production database.

Former Member
0 Kudos

Hi,

Thanks for the response.

Note 903904 does not apply in my case, As I had started SAP after SWITCHOVER & had also checked the DR DB status which was OPEN.

Note 655240 answers the question of my issue but I have checked Net8 configuration correctly which is fine as per the guide which I have used, that is why I was allowed to do SWITCHOVER otherwise there could be issue with that too and data guard config would also not be working properly (All the hostnames are maintained correctly, tnsping works, nslookup works).

In the guide there is one more parameter to connect application servers (other than CI)

rdisp/msname = <Host name of disaster CI>

I gave that parameter as well in the instance profile & restarted SAP system though its not require in my case as I have only ONE application server. But that even didn't worked out.

Kindly let me know if you any other suggestion as well.

Thanks,

Kiraang.

Former Member
0 Kudos

Hi,

Thanks for your reply.

Yes, It looks like I am having issue with tnsnames.ora file. The file is located at below locations,

g:\oracle\JE2\11203\network\admin ( respectively on primary & DR host)

f:\usr\sap\JE2\SYS\profile\oracle ( SAP application server host)

The file contents are as below,

===================================

JE2.WORLD =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS =

        (COMMUNITY = SAP.WORLD)

        (PROTOCOL = TCP)

        (HOST = saectsd02)

        (PORT = 1521)

)

)

(CONNECT_DATA =

(SID = JE2)

(GLOBAL_NAME = JE2.WORLD)

)

)

JE2_saectsd02.WORLD =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS =

        (COMMUNITY = SAP.WORLD)

        (PROTOCOL = TCP)

        (HOST = saectsd02)

        (PORT = 1521)

      )

    )

    (CONNECT_DATA =

      (SID = JE2)

      (GLOBAL_NAME = JE2.WORLD)

      (SERVICE_NAME = je2_saectsd02)

    )

  )

JE2_saectsd01.WORLD =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS =

        (COMMUNITY = SAP.WORLD)

        (PROTOCOL = TCP)

        (HOST = saectsd01)

        (PORT = 1521)

      )

    )

    (CONNECT_DATA =

      (SID = JE2)

      (GLOBAL_NAME = JE2.WORLD)

      (SERVICE_NAME = je2_saectsd01)

    )

  )

===================================

I guess first block JE2.WORLD should not be there in oracle\JE2\11203\network\admin\tnsnames.ora file (On both the DB hosts), For usr\sap\JE2\SYS\profile\oracle\tnsnames.ora it is correct.

Are you also suspecting this, Thanks for your answer.

Regards,

Kiraang.

Former Member
0 Kudos

Check tnsping output from CI host as <sid>adm user.

Former Member
0 Kudos

Hi, the line (HOST = saectsd02) in JE2.WORLD entry is the name or IP of DB host so you must change after switchover to correct hostname or IP in the tnsnames of SAP app.

Former Member
0 Kudos

Hi,

This is your first switchover after DR config ?

dba users exists in standby with standby host (like - primaryhost\sidadm, standbyhost\sidadm, primaryhost\sapservicesid, standbyhost\servicesid, etc)

pls check.. OPS$ mechanism also used in this to connect standby db

Regards

Shri

Former Member
0 Kudos

Hi,

tnsping does not work from SAP application work. It says tnsping is not recognized.

It works only on primary and DR hosts.

Regards,

Kiraang.

Former Member
0 Kudos

Hi,

Yes, It was first SWITCHOVER and all DB users exists on DR host.

Thanks,

Kiraang

Former Member
0 Kudos

Can you attach output?

Former Member
0 Kudos

Hi,

Keep same sidadm password for both primary and standby.

Change standby passwords same as primary.  Though it is same, after switchover it may not work.

This has happened in our case, we again changed passwords with below on Windows

brconnect -c -u / -f chpass -o OPS$STANDBYhost\SAPSERVICESID -p <password>

brconnect -c -u / -f chpass -o OPS$STANDBYhost\SIDADM -p <password>

Regards

Shri

Former Member
0 Kudos

Hi,

Yes, It looks like you have hit on right place, Soon I will get down time window & will try to do Mock drill again.

I will update asap.

Thanks,

Kiraang.

Former Member
0 Kudos

Hi,

Trans.log is already attached on the first message, Kindly check.

The output is of R3trans -d from SAP application server running on separate host.

Thanks,

Kiraang.

Former Member
0 Kudos

Hi,

Thanks for sharing your experience, I will also check for this during next Mock drill if tnsnames.ora change on SAP application server will not work as suggested by Orlando Maquera Choque

Regards,

Kiraang.

Former Member
0 Kudos

> tnsping does not work from SAP application work. It says tnsping is not recognized.

Can you attach output?

Former Member
0 Kudos

Hi,

Here it is, The following is executed from SAP application host (which is running separately)

Thanks,

Kiraang.

Former Member
0 Kudos

Thanks, its resolved after changing host name of DR server in JE2.WORLD.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

If you have only one application server which you want to use for both, what is the backup plan if real disaster happens? You will end up with only database server without application server (Because your primary datacenter is gone) !

How can you expect performance if you have appliation server in one datacenter and database in another one?

Keeping all these queries aside - If you use your current application server to connect to DR database, then you should change all the environment variables and profiles (Change the host names to DR) and then tnsnames.ora and listener.ora files.

Once these changes are done, then try to do tnsping <hostname> and paste the error.

Regards,

Nick Loy

Former Member
0 Kudos

Hi,

I accept that this is not proper setup having all servers in one data center, But as of now we have this setup only as per our management decision, So let's keep this concern aside (May be in near future this will be handled properly).

We have setup this using Oracle data guard, So tnsnames & listener files are maintained for both primary & DR host. Also environment variables exist on both primary & DR host with the respective host details as require. We can do tnsping from primary & DR host, So no issue with that, Even SWITCHOVER went smoothly. The only issue we have is, SAP can not connect to DR database after SWITCHOVER. We are now suspecting on tnsnames.ora file which is on SAP application host ( f:\usr\sap\JE2\SYS\profile\oracle\tnsnames.ora)

Kindly let me know if you have any other suggestion.

Regards,

kiraang.

Former Member
0 Kudos

Hi,

That is what i mentioned in above thread.

Since you are using your current application server to connect to DR database, you should change the TNSNAMES.ORA, Listener.ora and the environment variables of the users.

Ex: Server A is your primary and Server B is your DR database and Server C is your application serer which is connected with Server A till now. You are trying to connect server C with Server B, so it should have the connection details of Server B.

1) Change TNSNAMES.ORA, Listener.ora and environment variables of user.

2) Change the database hostname in SAP profiles (of application server)

Regards,

Nick Loy