Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2004
    Posts
    12

    Unanswered: weird problem about listener

    Through my several attempts, i can conclude my problem:

    Oracle 8.1.7.4 on AIX 4.3.3
    Suppose the hostname of the database server is "H85". I also has another Aix box and a PC , both of them was used as oracle client.
    I start the listener of the database server like this:
    H85#lsnrctl start
    And at this time the Services Summary of the listener 's status shows "test has 1 service handler(s)"(can be viewed through "lsnrctl status").
    Both the PC and the Aix box can connect to the database successfully

    But 30 seconds after the listener start, while the Services Summary of the listener 's status becomes :
    test has 1 service handler(s)
    test has 3 service handler(s)
    At this time i must add the hostname of the database to the /etc/hosts of the Aix box and to the /winnt/system32/drivers/etc/hosts of the PC , then the Aix box and the PC can connect to the database.
    the content of the etc/hosts and /winnt/system32/drivers/etc/hosts is:
    10.9.221.55 H85

    Otherwise,If i did not add the hostname of the database into the two files , the connection would failed:
    ORA-12545:connect failed because target host or object does not exist.

    Very very Strange.........

    Here is the content of the listener.ora on H85:

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.9.221.55)(PORT = 1521))
    )
    )

    SID_LIST_LISTENER =

    (SID_LIST =
    #(SID_DESC =
    # (GLOBAL_DBNAME = shyz)
    # (ORACLE_HOME = /oracle/app/oracle/product/8.1.7)
    # (SID_NAME = n1_flcp)
    #)
    (SID_DESC =
    (GLOBAL_DBNAME = test)
    (ORACLE_HOME = /oracle/app/oracle/product/8.1.7)
    (SID_NAME = test)
    )
    )



    here is the content of the tnsnames.ora file on oracle client:

    test =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.9.221.55)(PORT = 1521))
    (CONNECT_DATA =
    (sid = test)
    )
    )

  2. #2
    Join Date
    Feb 2004
    Location
    Oxfordshire
    Posts
    2
    What is in your sqlnet.ora file on your clients. Do you have any setting for the names.directory_path.

  3. #3
    Join Date
    Feb 2004
    Posts
    12
    Originally posted by joebyrne
    What is in your sqlnet.ora file on your clients. Do you have any setting for the names.directory_path.
    I have found sqlnet.ora in /oracle/app/oracle/product/8.1.7/network/admin/samples, But all lines in the sqlnet.ora was commented with "#" .

  4. #4
    Join Date
    Dec 2003
    Location
    Buenos Aires, Argentina
    Posts
    86
    Originally posted by viduka
    I have found sqlnet.ora in /oracle/app/oracle/product/8.1.7/network/admin/samples, But all lines in the sqlnet.ora was commented with "#" .
    you can find the client sqlnet.ora in the "$HOME/OraHome1/network/admin" directory

  5. #5
    Join Date
    Feb 2004
    Location
    Oxfordshire
    Posts
    2
    I think your problem is because you do not have an sqlnet.ora file in the network/admin directory. sqlnet.ora tells sqlnet what type of name resolution you are using, if you don't have one I'm not sure what the default is.

    You should create an sqlnet.ora with the following entry;

    NAMES.DIRECTORY_PATH=(TNSNAMES)

    This will tell sqlnet to use local naming to resolve connection strings and will thus look for a tnsnames.ora file. I don't think with your current setup sqlnet is using your tnsnames.ora file at all. You can find out by switching on tracing at the client side, put the following in sqlnet.ora;

    TRACE_LEVEL_CLIENT=ADMIN

    Your initial connection may be working due to hostname resolution by default. I think this only works when there is only one service to connect to. When PMON gets going it dynamically registers itself with a default listener on port 1521. All of the names in the service param in the init.ora file will be registered (I think thats why you get 3 services available after 30 secs). Once this is the case host name resolution will fail as it won't know which service to connect to.

    Anyway that's my understanding of it, I would always recommend you have a correctly configured sqlnet.ora and tnsnames.ora.

  6. #6
    Join Date
    Feb 2004
    Posts
    12

    To joebyrne

    hi, joebyrne

    I have add a sqlnet.ora at the oracle client, but the problem still appear.
    As you say :
    "When PMON gets going it dynamically registers itself with a default listener on port 1521. All of the names in the service param in the init.ora file will be registered (I think thats why you get 3 services available after 30 secs). Once this is the case host name resolution will fail as it won't know which service to connect to."

    I had only one service name in the inittest.ora. So i don't understand where the 3 services came from.

    Here is my inittest.ora :
    db_name = "test"
    instance_name = test

    service_names = test


    control_files = ("/oracle/app/oracle/oradata/test/control01.ctl", "/oracle/app/oracle/oradata/test/control02.ctl", "/oracle/app/oracle/oradata/test/control03.ctl")

    open_cursors = 300
    max_enabled_roles = 30
    db_block_buffers = 2048

    shared_pool_size = 52428800

    large_pool_size = 10485760
    java_pool_size = 20971520

    log_checkpoint_interval = 10000
    log_checkpoint_timeout = 1800

    processes = 150

    log_buffer = 163840


    background_dump_dest = /oracle/app/oracle/admin/test/bdump
    core_dump_dest = /oracle/app/oracle/admin/test/cdump
    user_dump_dest = /oracle/app/oracle/admin/test/udump

    db_block_size = 8192

    remote_login_passwordfile = exclusive

    os_authent_prefix = ""

    job_queue_processes = 4
    job_queue_interval = 60
    distributed_transactions = 10
    open_links = 4

    mts_dispatchers = "(PROTOCOL=TCP)(PRE=oracle.aurora.server.SGiopServ er)"

    mts_dispatchers = "(protocol=TCP)"

    compatible = "8.1.0"
    sort_area_size = 65536
    sort_area_retained_size = 65536


    By the way, if i put the "trace_level_client" in the sqlnet.ora on the oracle client, where can i find the trace log ?

  7. #7
    Join Date
    Feb 2004
    Posts
    12

    further description of my problem

    I do an admin-level trace on the listener start and here is the segments
    from my listener.trc file :
    nsglgrDoRegister: Creating new instance: "test".
    nttctl: entry
    nscontrol: cmd=7, lcl=0x0
    nsglgrDoRegister: Creating new handler: "D001".
    nsglhcrt: entry
    nsglhcrt: exit
    nsglhins: entry
    nsglhins: exit
    nsglgrDoRegister: Creating new handler: "D000".
    nsglhcrt: entry
    nsglhcrt: exit
    nsglhins: entry
    nsglhins: exit
    nsglgrDoRegister: Creating new handler: "DEDICATED".
    nsglhcrt: entry
    nsglhcrt: exit
    nsglhins: entry
    nsglhins: exit

    I find that When the above information begin to appeared in the listener.trc file , Then the oracle client could not connect to the database server again.

    I don't understand what is "D000", "D001" ?
    Maybe they are the root cause ?

  8. #8
    Join Date
    Dec 2003
    Location
    Buenos Aires, Argentina
    Posts
    86

    Re: further description of my problem

    Originally posted by viduka
    I do an admin-level trace on the listener start and here is the segments
    from my listener.trc file :
    nsglgrDoRegister: Creating new instance: "test".
    nttctl: entry
    nscontrol: cmd=7, lcl=0x0
    nsglgrDoRegister: Creating new handler: "D001".
    nsglhcrt: entry
    nsglhcrt: exit
    nsglhins: entry
    nsglhins: exit
    nsglgrDoRegister: Creating new handler: "D000".
    nsglhcrt: entry
    nsglhcrt: exit
    nsglhins: entry
    nsglhins: exit
    nsglgrDoRegister: Creating new handler: "DEDICATED".
    nsglhcrt: entry
    nsglhcrt: exit
    nsglhins: entry
    nsglhins: exit

    I find that When the above information begin to appeared in the listener.trc file , Then the oracle client could not connect to the database server again.

    I don't understand what is "D000", "D001" ?
    Maybe they are the root cause ?

    D000 and D001 are two dispatchers. Do you have MTS (Multi Thread Server) enabled? Check if the MTS_DISPATCHERS parameter is configured in your parameter file.
    It seems that you have both, SHARED and DEDICATED server configured.

  9. #9
    Join Date
    Feb 2004
    Posts
    12

    Thanks for your advice manf

    Hi manf,
    here is my statements about mts in the inittest.ora file:
    mts_dispatchers = "(PROTOCOL=TCP)(PRE=oracle.aurora.server.SGiopServ er)"
    mts_dispatchers = "(protocol=TCP)"

    After i comment the above statements and restart the database and listener, the problem was solved.
    Thank you for your excellent reply.

    By the way, another question was when i create the database i select the dedicated server mode and I didn't
    set something about MTS manually. Why the the parameter about MTS would appear in my inittest.ora ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •