|
tnsManager Installation guide for Linux/Unix
This guide outlines the basic steps necessary to install and configure tnsManager.
- 1. Download and unpack
Download the latest tnsManager binary from here. Transfer it to your chosen machine and unpack it:
unzip tnsManager.zip
Three files will be unpacked:
- tnsManager - the main executable.
- tnsManager.conf - the configuration file.
- README.TXT - The usual legal stuff. Make sure that you read it and agree with it!
- 2. Set ownership and permissions
This guide assumes that the oracle user will be used to install and run tnsManager:
chown -v oracle tnsManager*
chmod 700 tnsManager
chmod 600 tnsManager.conf
- 3. Transfer your tnsnames.ora
Transfer your tnsnames.ora to the tnsManager server. It can be located anywhere in the file system as long as tnsManager has access to it.
Note. Sqlnet LDAP naming does not recognise database domains (such as the infamous '.world'). tnsManager will automatically strip any domain suffixes as it loads the tnsnames.ora into memory. You must ensure that your client PCs do not attempt connections using service names with a domain suffix.
- 4. Edit the configuration file
The tnsManager.conf file must be edited before tnsManager is started for the first time. The following settings should be altered:
tnsnames_location - should be set to the full path and file name of the tnsnames.ora from step 3.
log_location - tnsManager will log events to this file. Specify the full path and file name. The log file will be created the first time that tnsManager is started. Alternativley, you can disable logging by setting log_level to 0 (zero).
After editing, your tnsManager.conf should look something like this:
# Basic settings ##################################################
tnsnames_location=/home/oracle/tnsManager/tnsnames.ora
log_level=1
log_location=/home/oracle/tnsManager/tnsManager.log
tcp_port=3838
Note. When tnsManager is started, it will look for its configuration file in three places:
- The path pointed to by the environment variable TNSMANAGER_CONFIG_PATH
- The current working directory
- /etc
- 5. Start tnsManager
To start tnsManager enter the following command:
./tnsManager start
You will see output similar to the following:
oracle@fermat:~/tnsManager> ./tnsManager start
tnsManager v1.8.0
Copyright (c) 2005-2008 Andrew Barry. All rights reserved.
Starting daemon......done.
------------------------------------------------------------------------------
Status Running
Startup time Sat Apr 12 16:41:44 2008
TCP Port 3838
Logging level 1 (normal)
Log File /home/oracle/tnsManager/tnsManager.log
Config file /home/oracle/tnsManager/tnsManager.conf
TNS file /home/oracle/tnsManager/tnsnames.ora
Modification date Sat Apr 12 11:37:21 2008
Bytes 58703
TNS entries 293
Total queries 0
Successful queries 0
Unsuccessful queries 0
Timed-out requests 0
Invalid requests 0
Last query time No queries
------------------------------------------------------------------------------
tnsManager has started successfully (PID:31223).
oracle@fermat:~/tnsManager>
Note. Run 'tnsManager help' for a complete list of options.
- 6. Workstation configuration
Your workstation machines will need to be configured to use tnsManager instead of tnsnames. To do this you will need to create two new files; sqlnet.ora and ldap.ora. Both of these files will be placed in the same location: <ORACLE_HOME>\network\admin. The contents of the two files should be as follows:
sqlnet.ora
Configure sqlnet.ora to use ldap for names resolution:
NAMES.DIRECTORY_PATH= (LDAP)
NAMES.NO_PERSISTENT_RESOURCES=TRUE
ldap.ora
The ldap.ora tells your Oracle client what the tnsManager server is called and which TCP port it is listening on. Add the following lines to it, putting your own server name in:
DIRECTORY_SERVERS = (put_your_server_name_here:3838)
DEFAULT_ADMIN_CONTEXT = ""
DIRECTORY_SERVER_TYPE = OID
If you want to, you can protect against hardware or network failure by having tnsManager running on more than one server. Simply comma-separate the host names in the ldap.ora, like this:
DIRECTORY_SERVERS = (server1:3838, server2:3838)
See the 'Configuring for high availability' guide for more information.
- 7. Test the installation
To test the installation simply use tnsping or sqlplus from your workstation. Both tools should behave in the usual way. If you run 'tnsManager status' you should also see the query counters increasing.
If you encounter problems, check the tnsManager log file for more information. If you get really stuck, try increasing the logging level to 2.
I'm always interested to hear about how tnsManager is being used, so please feel free to drop me an email about your experiences with it.
<< Back
All trademarks used are properties of their respective owners.
|
|
|