cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SXPG_COMMAND_EXECUTE failed... (DB13)

Former Member
0 Likes
5,920

Hello,

This is a SAP distributed system with one SAP dialog instance.


We are facing some problems when we add/run an activity (job) in DB13 tcode.


When we run a Check and update optimizer statistics activity in DB13, it show the following error (the same for other type of activity, like CheckDB):

Job started
Step 001 started (program RSDBAJOB, variant &0000000000006, user ID ADMINSAP)
Execução do comando lógico BRCONNECT No host liszgpora001
Parâmetros: -jid STATS20130320200000 -u / -c -f stats -t ALL
SXPG_STEP_XPG_START: is_local_host: rc = 403
SXPG_STEP_XPG_START: host = liszgpora001
SXPG_STEP_XPG_START: is_local_r3_host: rc = 802
SXPG_STEP_XPG_START: RFC_TCPIP_CONNECTION_OPEN: rc = 1003
SXPG_STEP_COMMAND_START: SXPG_STEP_XPG_START returned: 1.003
SXPG_COMMAND_EXECUTE(LONG)
<timestamp> = 20131009200121
COMMANDNAME = BRCONNECT
ADDITIONAL_PARAMETERS = -jid STATS20130320200000 -u / -c -f stats -t ALL
LONG_PARAMS
OPERATINGSYSTEM = ANYOS
TARGETSYSTEM = liszgpora001
DESTINATION
SY-SUBRC = 1003
SXPG_COMMAND_EXECUTE failed for BRCONNECT - Reason: program_start_error: For More Information, See SYS

I checked the SM37 for DB job (DBA:UPDATESTATS_____@121311/5000) and I see in there an error... the same error.

I searched for a solution and I found the following SAP notes:
1914589 - SXPG_COMMAND_EXECUTE failed when start job from DB13/DBACOCKPIT

446172 - SXPG_COMMAND_EXECUTE (program_start_error) in DB13

I read them, but sincerely I didn't understand some of the instructions/information described in that sap notes. I also found some threads in SDN forums:
http://scn.sap.com/thread/2155624
http://scn.sap.com/thread/2129398

For instance: I see in central instance if there exist the RFC --> SAPXPG_DBDEST_<SAPDBHOST> - and yes, there is the RFC SAPXPG_DBDEST_LISZGPORA001, I made a conection test and everything is OK! I also checked the same RFC but in dialog instance, there is the same RFC - SAPXPG_DBDEST_LISZGPORA001 but when I done a connection test it show me an error:

Connection Error

Error when opening an RFC connection (CPIC-CALL: 'ThSAPOCMINIT' : cmRc=27 thRc=2

ERROR: timeout during allocate

LOCATION: SAP-Gateway on host liszgpsap003.zagope.pt / sapgw01

DETAIL: no connect of TP /usr/sap/AZP/DVEBMGS00/exe/sapxpg from host liszgpsap

COMPONENT: SAP-Gateway

COUNTER: 18059

MODULE: gwr3cpic.c

LINE: 2025

RETURN CODE: 242

SUBRC: 0

RELEASE: 720

TIME: Fri Oct 11 15:32:37 2013

VERSION: 2

I don´t know if this is the cause for this error... and if this RFC in dialog instance is suppose to be work for this can run the jobs for DB!
I don´t know...


Please, can you help me!?

Kind regards,
samid

View Entire Topic
Former Member
0 Likes

Hello,

In  dialog instance, please check the hosts & Services  file at Operating system level and make sure that entries of the target server are maintained as same as in Central instance.

Regards,

Mudasir H Syed

Former Member
0 Likes

Hello Mudasir,

I checked both files (/etc/hosts and /etc/services) and they have the same entries!

Any tips?!

Thank you,

samid

Former Member
0 Likes

Hello,

Check the note 980266 and change the settings of your RFC as it has been mentioned in the note.

Note 980266 - RFC destination SAPXPG_DBDEST_<DB-HOST> does not work


Another crude work around is ( Temporary ) ,

As you are able to access the RFC from Central instance then try to run the job on Central instance only. You can remove the Dialog instance from the 'background processing group' ( SM61 ) and then execute the job. It will run on central instance only.

Regards,

Mudasir H Syed.

Former Member
0 Likes

Hello,

I´m reading that sap note 980266.

Tell me one thing, and correct me please if I am wrong...

As I said before this is a distributed SAP system with a dialog instance, so we have three servers, the server A (central instance), server B (dialog instance) and server C (database instance/host).

Regarding that RFC SAPXPG_DBDEST__<SAPDBHOST>, in central instance the settings of this RFC has the program field with server A host.

In dialog instance the settings of this RFC has the program field with server A host.

So... my question is, the value of that Program the value of thisfieldshould not be for both RFC´s (in central and dialog instance) the server C host, this is, the database host? I think so, but can you tell me if I am right, please?

Kind regards,

samid


Former Member
0 Likes

Try this once:

In RFC SAPXPG_DBDEST__<SAPDBHOST, enter gateway host and service of the Central instance.

Then  try running DB13 from any of the dialog instance.

Former Member
0 Likes

Hello Ankit Mishra,

I did what you suggested and yes, it corrects the RFC SAPXPG_DBDEST__<SAPDBHOST> in dialog instance.

I run again in DB13 the activity Check and update optimizer statistics and again it stops with an error... not the initial error, it´s a new error!

Job started
Step 001 started (program RSDBAJOB, variant &0000000000023, user ID ADMINSAP)
Execute logical command BRCONNECT On host liszgpora001
Parameters: -jid CHECK20131011180519 -u / -c -f check
BR0801I BRCONNECT 7.20 (1)
BR0252E Function fopen() failed for './dbs/initAZP.sap' at location BrInitSapRead-1
BR0253E errno 2: No such file or directory
BR0159E Error reading BR*Tools profile ./dbs/initAZP.sap
BR0280I BRCONNECT time stamp: 2013-10-11 18.05.20
BR0301E SQL error -12545 at location db_connect-2, SQL statement:
'CONNECT /'
Error while trying to retrieve text for error ORA-12545
BR0310E Connect to database instance AZP failed

BR0806I End of BRCONNECT processing: cemhednc.log2013-10-11 18.05.20
BR0280I BRCONNECT time stamp: 2013-10-11 18.05.20
BR0804I BRCONNECT terminated with errors
External program terminated with exit code 3
BRCONNECT returned error status E
Job finished

Can you help me please?!

Thanks,

samid

Former Member
0 Likes

do the following:

1. Grant 777 or 775 perimission to conn<SID>.log created under /oracle/<SID>/sapcheck

run and let me know the result.

Former Member
0 Likes

Also, check

/oracle/AZP/11203/dbs has the following permission

drwxr-xr-x  2 oraazp dba  4096 Oct 11 12:00 dbs

Second,

files under dbs i.e initAZP.sap has the below perimission and ownership

-rw-r-xr-x 1 oraazp dba     27414 Sep 20 12:52 initAZP.sap

Former Member
0 Likes

Hello Ankit,

1. Grant 777 or 775 perimission to conn<SID>.log created under /oracle/<SID>/sapcheck

I didn´t found any sapcheck directory under /oracle/<SID>

All this checks is to be done in Database host or in central instance, dialog instance hosts?


I also check the permissions in /oracle/AZP/11202/dbs (in Database host) and also in the files under dbs and everything is OK, like you recommended


What I don´t understand is... when I read the sap note 980266 (RFC destination SAPXPG_DBDEST_<DB-HOST> does not work) I thought that RFC´s (in central instance and dialog instance) should has in the 'Program' field the path of sapxpg program in database instance/host and not to the central instance (gateway host and service of the Central instance)! What you think about that?

regards,

samid

Former Member
0 Likes

Do you have Database host and central instance host different ?

- If this is same, in RFC you just need to update Gateway host & Gateway Service of Central Instance.

- If database host has no sap instance installed : you need a Gateway installed on this host.

BR0801I BRCONNECT 7.20 (1)

BR0252E Function fopen() failed for './dbs/initAZP.sap' at location BrInitSapRead-1

BR0253E errno 2: No such file or directory

BR0159E Error reading BR*Tools profile ./dbs/initAZP.sap

>> what is your ORACLE_HOME for sidadm & orasid on database host ?

Also verify permissions of brtools with  Note 113747 - Owners and authorizations for BR*Tools

/oracle/SID/sapcheck is a standard default directory on database host for storing BRCONNECT logs. If it is not there, please create it. Permission can be 775 for orasid:dba

http://help.sap.com/saphelp_nwpi71/helpdata/en/47/05f87ce74266c0e10000000a1553f7/content.htm?framese...

make sure you have permissions for dbs & initSID.sap like below :

dbs > drwxr-xr-x oraSID:dba

initSID.sap > -rw-r--r-- oraSID:dba

best regards

ashish

Former Member
0 Likes

Hello ashish,

Do you have Database host and central instance host different ?

They are in different hosts! So, in this case, I need a Gateway installed on this databse host, am I right?

>> what is your ORACLE_HOME for sidadm & orasid on database host ?

For azpadm and oraazp the ORACLE_HOME is the same: /oracle/AZP/112_64

/oracle/SID/sapcheck is a standard default directory on database host for storing BRCONNECT logs. If it is not there, please create it. Permission can be 775 for orasid:dba

The location of sapcheck directory is not, in my case, in /oracle/<SID>/sapcheck, instead it is in the following directory: /oracle/AZP/sapdata/sapcheck

It has the following permissions:

drwxr-xr-x   2 oraazp   dba           12 Aug 12 13:13 sapcheck

make sure you have permissions for dbs & initSID.sap like below :

dbs > drwxr-xr-x oraSID:dba

initSID.sap > -rw-r--r-- oraSID:dba

I checked the permissions in /oracle/AZP/11202/dbs and also in the files under dbs and everything is OK, like you recommended:

drwxr-xr-x   2 oraazp   dba           27 Oct 13 02:47 dbs

-rwxr-xr-x   1 oraazp   dba         6996 Feb 25  2013 initAZP.sap

Any tips?

Kind regards,

samid

Former Member
0 Likes

you are right.. you should installed a standalone gateway on database host.

Nicholas Chang has explained it very well in http://scn.sap.com/thread/1937412

So just follow all steps and let us know in case of further problems.

best regards

ashish