SQL> shutdown abort .com

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

tnsManager Administration Guide



  • Start tnsManager
    To start the tnsManager service/daemon simply type the following:
    tnsManager start
    
    There will be a short delay while the background process is launched, after which you will receive a status message giving various details regarding the daemon.

    Upon starting successfully tnsManager will return the operating system process number (PID). If it fails it will return 0 (zero).


  • Stop tnsManager
    To stop tnsManager issue the following command:
    tnsManager stop
    
    tnsManager will return 0 (zero) on success, or a positive integer in the case of failure.


  • Display the current status of tnsManager
    tnsManager collects various statistics while it runs. To display them use the following command:
    tnsManager status
    
    You will receive a screen similar to the following:
    tnsManager v1.7.2
    Copyright (c) 2005-2008 Andrew Barry.  All rights reserved.
    
    Daemon status
    -------------------------------------------------------------
    Status                    Running
       Startup time           Mon Dec 12 14:55:27 2007
       TCP Port               3838
       Logging level          2 (debug)
       Log File               ./tnsManager.log
       Config file            ./tnsManager.conf
    TNS file                  ./tnsnames.ora
       Modification date      Sun Jan 30 02:10:01 2008
       Bytes                  9227
       TNS entries            102
    Total queries             44298169
       Successful queries     44297132
       Unsuccessful queries   1037
       Invalid requests       0
       Last query time        Sat Feb 19 19:55:31 2008
    -------------------------------------------------------------
    
    As you can see, there is a lot of useful information displayed here. You are able to see the modification date of the tnsnames.ora and also how many queries/requestes the daemon has processed.

    The query totals have the following meanings:
    Successful queriesThe service name was recognised and its connection string was sent to the client.
    Unsuccessful queries    The service name was not found in the tnsnames.ora.
    Invalid requestsThe request was not in a format that tnsManager could understand.

    Note. 'Invalid requests' should be zero under normal circumstances. If tnsManager is reporting significant numbers of them, it might be an indication of network problems or hacking attempts.


  • Making an alteration to the master tnsnames.ora
    When tnsManager is first started the tnsnames file is loaded into memory. Queries to tnsManager are made against this cached tnsnames rather than the version held on disk. This has been done to reduce the load on the system and to increase the performance of tnsManager.

    Alterations made to the master tnsnames file will not take effect until tnsManager has been instructed to re-read the file. Use the following command:
    tnsManager reload
    
    During the reload process tnsManager will check the structure of the tnsnames file. If it finds a problem, it will abort the reload and continue to use the previously cached version.

    Note. The reload option does not reload the main configuration file. Use the 'restart' option to do that.


  • Restarting tnsManager
    To restart tnsManager use this command:
    tnsManager restart
    
    This will quickly stop and start tnsManager. The configuration file and tnsnames are both re-read.


  • The list option
    To display a list of the tns service names that tnsManager is listening for use the list command:
    tnsManager list
    
    This will list all services, sorted alphabetically, with the number of times a client workstation has requested the connection string for each:
    tnsManager v1.8.0
    Copyright (c) 2005-2008 Andrew Barry.  All rights reserved.
    
    List all services...
    -------------------------------------------------------------------------------
    Name: andy                                               Queries: 945
    Name: barry                                              Queries: 201
    Name: comma                                              Queries: 53
    Name: comma2                                             Queries: 65
    Name: comma3                                             Queries: 32
    Name: fal_test                                           Queries: 627
    Name: pid1                                               Queries: 140
    Name: scr10e                                             Queries: 768234
    -------------------------------------------------------------------------------
    Total services: 8
    Total queries:  770297
    

    To display more detailed information about an individual service use the list option followed by the service name in question:
    tnsManager list <service name>
    
    $ ./tnsManager list scr10e
    
    tnsManager v1.8.0
    Copyright (c) 2005-2008 Andrew Barry.  All rights reserved.
    
    List service 'scr10e'...
    -------------------------------------------------------------------------------
    Service name:        scr10e
    Successful queries:  768234
    Connect String:
    
      (DESCRIPTION=
            (ADDRESS_LIST=
                    (ADDRESS=
                            (PROTOCOL=TCP)
                            (HOST=fermat)
                            (PORT=1235)
                    )
            )
            (CONNECT_DATA=
                    (SERVICE_NAME=scr10e)
            )
      )
    
    -------------------------------------------------------------------------------
    

  • Display the help screen
    To display the help screen type tnsManager followed by help, -h or -help:

    
    tnsManager v1.8.0
    Copyright (c) 2005-2008 Andrew Barry.  All rights reserved.
    
    Usage: tnsManager <option>
    
    Options:
           start                Start the tnsManager daemon
           stop                 Stop the tnsManager daemon
           restart              Stop and start the daemon
           reload               Reload the tns file.
           status               Display the current status
           list                 List all tns services
           list [service name]  Display information about the specified service
    
    For support visit http://www.shutdownabort.com/tnsmanager
    
    


    << Back


  • Copyright© 2007-2012 Andrew Barry