My Oracle Support Banner

ORA-12154 And ORA-32830: "result code -101 returned by Messaging Gateway agent with oracle.mgw.admin.MgwAdminException: [241] Failed to connect to database." (Doc ID 2502382.1)

Last updated on JANUARY 24, 2020

Applies to:

Oracle Database - Enterprise Edition - Version and later
Information in this document applies to any platform.


While configuring MGW on RAC environment, MGW startup fails with ORA-32830:


32830, 00000, "result code %s returned by Messaging Gateway agent"
// *Cause:  The Messaging Gateway agent terminated abnormally due to an
//          unexpected error.
// *Action: Review the Messaging Gateway log file for further information
//          regarding the problem. Resolve the problem and start the
//          Messaging Gateway agent. Contact Oracle Support Services if
//          the problem cannot be resolved.


SQL> exec dbms_mgwadm.startup

PL/SQL procedure successfully completed.

SQL> select agent_status, LAST_ERROR_MSG  from mgw_gateway;

NOT_STARTED     ORA-32830: result code -101 returned by Messaging Gateway agent


Messaging Gateway log file shows below information :


oracle.mgw.admin.MgwAdminException: [241] Failed to connect to database. SQL error: 12154, connect string: jdbc:oracle:oci:@MGWAGENT_RAC_DB

at oracle.mgw.admin.AdminUtil.packageSQLError(
at oracle.mgw.admin.AdminMgr.<init>(
at oracle.mgw.engine.Agent.start(
at oracle.mgw.engine.Agent.agentMain(

java.sql.SQLException: ORA-12154: TNS:could not resolve the connect identifier specified

at oracle.jdbc.driver.T2CConnection.checkError(
at oracle.jdbc.driver.T2CConnection.logon(
at oracle.jdbc.driver.PhysicalConnection.connect(



 New MGW Configuration on RAC environment.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.