SQL> shutdown abort .com

About DBA Queries DBA Scripts Quick Guides Nooleus Other Stuff Contact
Andy only 
 

tnsManager Installation guide for Windows

This guide outlines the basic steps necessary to install and configure tnsManager for MS Windows(tm).

  • 1. Download and unpack
    Download the latest tnsManager binary from here. Transfer the zip file to your chosen machine and unpack it.

    Three files will be un-zipped:

    • tnsManager.exe - the main executable.
    • tnsManager.conf - the configuration file.
    • README.TXT - The usual legal stuff. Make sure that you read it and agree with it!

    This guide will assume that the files have been unpacked to 'C:\tnsManager\', but they can be located anywhere.

  • 2. Install the tnsManager Windows service
    tnsManager runs as a Windows service. To install the service, open a command prompt window and run the following:
    c:
    cd \tnsManager
    tnsManager install
    
    The service will be installed but not started at this point.

  • 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. This guide will assume that the tnsnames.ora is located in 'C:\tnsManager\'.

    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=C:\tnsManager\tnsnames.ora
    
    log_level=1
    
    log_location=C:\tnsManager\tnsManager.log
    
    tcp_port=3838
    
    Note. When tnsManager is started, it will look for its configuration file in the same folder as tnsManger.exe.

  • 5. Start tnsManager
    Start the tnsManager service using following command:
    tnsManager start
    
    Note. You can also start and stop tnsManager using the Windows Service Manager.

    You will see output similar to the following:
    C:\tnsManager>tnsManager start
    
    tnsManager v1.8.0
    Copyright (c) 2005-2008 Andrew Barry.  All rights reserved.
    
    Starting service......done.
    ------------------------------------------------------------------------------
    Status                    Running
       Startup time           Sat Aug 30 16:07:35 2008
       TCP Port               3838
       Logging level          2 (debug)
       Log File               C:\tnsManager\tnsManager.log
       Config file            C:\tnsManager\tnsManager.conf
    TNS file                  C:\tnsManager\tnsnames.ora
       Modification date      Sat Aug 30 14:44:15 2008
       Bytes                  158703
       TNS entries            2936
    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.
    
    C:\tnsManager>
    
    Note. Run 'tnsManager help' for a complete list of options.

    If your machine has a personal firewall you might recive a message similar to this one:

    Windows firewall popup

    tnsManager needs to communicate on the port specified in the configuration file (3838 by default). Click on 'Unblock' to allow it.

  • 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.
Copyright© 2007-2010 Andrew Barry