Oracle Error ORA-32166: Cannot get XA connection

Oracle Error Message

ORA-32166: Cannot get XA connection

Reason for the Error

Incorrect dbname string was passed or the XA connection has not been opened

Solution

Pass the correct dbname string or check if the XA connection is open