If you do not define the service name for the database, the target database refuses a connection. If the database refuses the connection, you receive the
TNS connection refused
error.
To resolve the TNS connection error, define the database service name.