DBAsupport.com Forums - Powered by vBulletin
Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Installation of Oracle 10g

  1. #11
    Join Date
    Jun 2012
    Posts
    7
    Finally I am able to create table in oracle using Command Prompt. Thanks very very much PAVB.
    I want to ask just one question before closing this thread.

    When I connect in command prompt using username,password & Host String(tnsNames.ora). Its succeed as seen below.

    Code:
    C:\>sqlplus sonia/mypass@sonia - In this line First sonia is the userName & second Sonia is the host from the tnsnames.ora
    
    SQL*Plus: Release 11.2.0.2.0 Production on Wed Jul 4 13:12:43 2012
    
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production

    But When I use the sqlPlus screen to connect to Oracle -
    UserNAme - sonia
    Password - mypass
    HostString - sonia

    I am getting ERROR - ORA-12514 TNSlistener does not currently know of service requested in connect descriptor.
    I am not getting why I am not able to LOGIN FROM SQLPLUS SCREEN.

    I searched on the net, But still No LUck.My database is also started which I find using the
    Code:
     C:>sc query OracleServiceXE

    tnsnames.ora (LOCATION - C:\oracle\product\10.2.0\client_1\network\admin\tnsnames.ora
    )

    # tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\client_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.

    SONIA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = sonia)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVICE_NAME = SONIA)
    )
    )
    [/code]


    tnsNAmes.ora -C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN
    Code:
    XE =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = sonia)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = XE)
        )
      )
    
    EXTPROC_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
        )
        (CONNECT_DATA =
          (SID = PLSExtProc)
          (PRESENTATION = RO)
        )
      )
    
    ORACLR_CONNECTION_DATA = 
      (DESCRIPTION = 
        (ADDRESS_LIST = 
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) 
        ) 
        (CONNECT_DATA = 
          (SID = CLRExtProc) 
          (PRESENTATION = RO) 
        ) 
      )
    Listener.ora -C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN
    Code:
    XE =
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
          (PROGRAM = extproc)
        )
        (SID_DESC =
          (SID_NAME = CLRExtProc)
          (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
          (PROGRAM = extproc)
        )
      )
    
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
          (ADDRESS = (PROTOCOL = TCP)(HOST = sonia)(PORT = 1521))
        )
      )
    
    DEFAULT_SERVICE_LISTENER = (XE)

    I am still confused in that I have two tnsNames.ora in different locations.Is that OK?

  2. #12
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Ideally you should have only one TNSNAMES.ora file - as far as I can see the affected computer has both the Oracle server and the Oracle client software installed then you have two Oracle Homes and one tnsnames.ora file on each one.

    The TNSNAMES.ora file Oracle is going to look at is the one in the Oracle Home defined by the environmental variable ORACLE_HOME, most probably the one for the Oracle server.

    Also check if TNS_ADMIN variable is defined, if it is defined then Oracle will look at the TNSNAMES.ora file located where TNS_ADMIN points.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Posting Permissions

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


Click Here to Expand Forum to Full Width