Skip to Main Content
  • Questions
  • Best Practice using database services

Breadcrumb

more

Connor and Chris don't just spend all day on AskTOM. You can also catch regular content via Connor's blog and Chris's blog. Or if video is more your thing, check out Connor's latest video and Chris's latest video from their Youtube channels. And of course, keep up to date with AskTOM via the official twitter account.

Question and Answer

Connor McDonald

Thanks for the question, Geraldo.

Asked: November 08, 2019 - 1:14 pm UTC

Answered by: Connor McDonald - Last updated: November 12, 2019 - 11:06 pm UTC

Category: Database Administration - Version: 18.4

Viewed 100+ times

Whilst you are here, check out some content from the AskTom team: AskTOM-more experts to help you!

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 we 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.

and you rated our response

  (1 rating)

Reviews

Follow Up

November 11, 2019 - 2:16 am UTC

Reviewer: Geraldo from Dominican Republic

Thanks for the response.
Connor McDonald

Followup  

November 12, 2019 - 11:06 pm UTC

Glad we could help

More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database