Thanks for the question, Geraldo.
Asked: November 08, 2019 - 1:14 pm UTC
Last updated: November 12, 2019 - 11:06 pm UTC
Version: 18.4
Viewed 1000+ times
You Asked
Hello, Ask Tom Team.
We have a two-node RAC running a database. The app connects to the database using scan name (best practice), so we are not using vip to connect to database directly. The tnsnames.ora is:
DBPROD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = scanprod.domain.local)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = dbprod) --default database service
)
)
We recently had an issue with instance 1, Oracle Support was patching node 1 and instance was not starting (it stuck at "STARTING"), it never came up. But the RAC was thinking node 1 was good, so it redirect connections to node 1 when using scan. Then, we got errors like: "shutdown or initialization in progress". All apps using tnsnames above, were not connecting to database.
When Oracle Support shutdown node 1 to patch it, we had a service pointing to node 1 and it automatically moved to instance 2 but the apps pointing to default service, never got connected to db.
DBPROD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = scanprod.domain.local)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = myservice1)
)
)
1. Do you recommend using this configuration (connect using the default database service when you create the database) or create new services pointing to preferred instances with its available failover instance?
and Connor said...
For me, I never use the default service in standard operation because you have very little control over it. It can't be disabled (well, it can, but that will cause all sorts of dramas). Because we use the default service for various internal administration things, we're generally going to always keep it available even against nodes which are not available for normal operations, which hence might interfere with your plans.
Define your own services and use them. You'll have much more control and flexibility.
Rating
(1 rating)
Is this answer out of date? If it is, please let us know via a Comment