3

My organization wants to centrally manage an Oracle TNSnames file for all of their production servers. When that file changes, they want to be able to push out the changes to all servers that use it with a minimal effort.

Approaches that have been considered:

  • Centralized file server (drawback: if the file server or the network connection to the file server goes down, the servers have no access to the critical file)
  • Subversion client on each server (drawback: using a source control tool in production, added complexity)
  • Store an individual copy of the file on each server (drawback: changing the file contents involves making changes on many different servers)

Update Can I use DFS to do this?

5 Answers 5

6

This is not an Oracle question. This is a canonical use case for a configuration management tool like puppet, bcfg2, cfengine, chef, etc. (of those, at least puppet has some support for managing windows machines as well as unixes)

The appeal from your point of view for this particular case are several:

  1. each machine gets its own local copy of the file in question which means that if the config mgmt server (or the network path to it) goes away, the machine still has the file; it just won't get any updates to it until the connection to the mothership is restored
  2. changes are automatically pushed from the config mgmt server to each oracle box
  3. Little additional complexity on each client (oracle) machine
  4. Changes happen in one place.

The downside, of course, is that this means you need to learn about how to run/configure a configuration management system. Of course, in doing so, you will likely find many, many more uses for it that make your environment and administration more efficient.

5
  • We use System Center Configuration Manager for CM, will that push files to Linux?
    – Brien
    Jul 5, 2012 at 14:18
  • 1
    Looks like it does through extensions. blogs.technet.com/b/johnbaker/archive/2008/08/18/… Jul 5, 2012 at 14:20
  • cfengine (paid version) has great support for windows. The free version needs to run from cygwin (last time I looked). Jul 5, 2012 at 14:51
  • can only edit during 5 minutes ...; I +1 your comment but disagree on the push stuff. I very much prefer pull: see infrastructures.org/bootstrap/pushpull.shtml Jul 5, 2012 at 15:09
  • natxo asenjo: my answer wasn't intended to express a general opinion about push vs. pull, there are arguments in both directions. Typically, the way the config mgmt systems I mentioned work is for an agent on the client to periodically request "Got anything (new) for me?" from a central server, which has the best of both worlds.
    – dotplus
    Jul 5, 2012 at 15:40
4

Since TNSNames isn't one that's locked when the server is in use, try a cron job or scheduled task on each server that updates the file every X minutes/hours.

Edit: The update source should be a file server (CIFS, NFS, etc) accessible from all Oracle servers. You could also set up the script to notify you if the file fails to update, though a failure would simply mean no update instead of a missing critical file on your database servers.

5
  • Updates it from where?
    – Brien
    Jul 5, 2012 at 14:09
  • Brien - the update does need to come from a single source. You'll want a file server accessible by all targets for this. The advantage of this is that if it goes down, you only lose the ability to do updates - every server still has the last-known-good copy of the file.
    – mfinni
    Jul 5, 2012 at 14:13
  • Good point, I should have been a bit more clear
    – Hyppy
    Jul 5, 2012 at 14:14
  • 2
    Doesn't have to be a fileserver - FTP, ssh, http are all scriptable to the extent that it's possible to download a file on both MSWindows and *nix. There are other protocols too.
    – symcbean
    Jul 5, 2012 at 16:28
  • symcbean - you're entirely correct. Those are all other ways to "serve files"
    – mfinni
    Jul 5, 2012 at 16:52
2

Store an individual copy of the file on each server (drawback: changing the file contents involves making changes on many different servers)

Still, I'd go with this. Write a script that reads a list of servers to access, probably with a OS / login control method that varies based on a field. Alternately, Puppet can be used in a similar manner to push configuration files to either Linux or Windows. Puppet will also version and log file changes.

Centralized file server (drawback: if the file server or the network connection to the file server goes down, the servers have no access to the critical file)

You could place redundant servers with IP failover, but that won't solve network issues. I wouldn't consider this a strong solution for your single-purpose task.

Subversion client on each server (drawback: using a source control tool in production, added complexity)

You'd still need to script or send a pull request to each server. I don't see the intrinsic downside of "source control tool in production", though.

1

For the Windows systems, a GPO to copy the files from a share should work. That will do the job for Linux as well if you're using Centrify, Likewise, etc.

For Linux, are you using some sort of provisioning system already? (e.g., Spacewalk, RHSS) That would be the best bet to centrally manage configuration files.

1

You can also use DFS for this - that should fix the lack of redundancy, as long as the DFS root has more than one fileserver in it. You would need an SMB client on the Linux machines that supports DFS; I don't know if that's easy/free/impossible/buggy.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .