Oracle Solution for Error ora-32166

Solution for Oracle Error ORA-32166

ORA-32166: Cannot get XA connection

What triggered the Error:

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

What should we do to fix it:

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