Re: Using Service Names for database

From: Mladen Gogala <>
Date: Thu, 19 Feb 2015 16:52:25 -0500
Message-ID: <>

On 02/19/2015 02:43 PM, Jeff C wrote:
> Does anybody use or have experience with using multiple Service Names
> for your database? Is this a normal thing people do? I have a
> database that is a mix of a bunch of different applications and I
> would like to better identify them from database connection and so
> giving them their own service name to connect to seems like the
> perfect fit. One thing I did noticed that we will have to be careful
> about is if you restore that database to the same server with a
> different name and you don't change the service name parameter then
> the listener will pick up that service name and your users may be
> going to the restored database and not production.
> Any other things to think about and/or is this a bad practice?
> Thanks,
> Jeff

Jeff, yes, that's a perfectly normal practice. I used in two situations:

  1. On RAC, when carving out resources for the different applications.
  2. I merged two databases. One database was very small and it was decided to make it a tablespace in a much bigger machine. In order not to change any connection strings, the new machine was given an alias which was the same as the old machine name and I created a service using DBMS_SERVICE (it wasn't RAC, no srvctl) that was the same as the name of the old database. The old connection string, which was hard coded into Java application, continued to work flawlessly.

And yes, the instance will dynamically pick ALL the service names from the instance.

Mladen Gogala
Oracle DBA

Received on Thu Feb 19 2015 - 22:52:25 CET

Original text of this message