How to fix the Oracle error CLSGN-00172: Domain given in alias “string” for name “string” does not match GNS domain “string”.?

In this post, you’ll learn more about the Oracle ErrorCLSGN-00172: Domain given in alias “string” for name “string” does not match GNS domain “string”. with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

CLSGN-00172: Domain given in alias “string” for name “string” does not match GNS domain “string”.

Reason for the Error CLSGN-00172: Domain given in alias “string” for name “string” does not match GNS domain “string”.

The domain specified for an alias does not match the domain serviced by GNS.

How to fix the Error CLSGN-00172: Domain given in alias “string” for name “string” does not match GNS domain “string”. ?

You can fix this error in Oracle by following the below steps

Either specify the correct domain or do not specify a domain and GNS will use its domain as the default.