This discussion is archived
9 Replies Latest reply: Jan 20, 2010 2:21 PM by hans forbrich RSS

Unable to Create Starter Database

747313 Newbie
Currently Being Moderated
Hello All,

I've attempted to due my due diligence researching this forum, install documentation and the web before posting but to no luck.

I have two virtual machines using VMWare Workstation 6.5. Both servers are Windows Server 2003 Enterprise Edition 32bit. One is a domain controller and the other is an application server. I'm able to the basic install of Oracle 10G R2 Enterprise Edition on the app server, but when it gets to the part to create the starter database it fails with error TNS-12154: TNS: could not resolve the connect identifier specified. All default options were used during the install.

From my research, I checked the tsnames.ora and sqlnet.ora files. Below is the output of the two files...

tsnames.ora-

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

sqlnet.ora-


SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

All of the troubleshooting tips I find seem to assume that a database has already been created. How can I troubleshoot when no database exists yet? Also, it looks like the tsnames.ora and the sqlnet.ora files are default and I wouldn't think they would need to be modified.

Another recommendation was to make sure that you can ping your host using both the host name and the hostName.domainName. I'm able to do both of these successfully.

Any help would be greatly appreciated as I'm not sure what to do next. Thanks.
  • 1. Re: Unable to Create Starter Database
    damorgan Oracle ACE Director
    Currently Being Moderated
    Due diligence-wise you've fallen quite a bit short of the mark.

    First you installed in a totally uncertified, untested, and unsupported environment.
    By any reasonable definition you should expect to fail.

    But any search, even one as cursory as reading the installation doc, would have discussed the use of a fixed-IP address rather than dynamic addressing. It would also have mentioned use a loop-back and 127.0.0.1 none of which you mention trying.

    Before spending even one minute trying to help you ... please address the obvious and let us know what you did and didn't do. Also post your listener.ora file and the output of a TNSPING.

    Your TNSNAMES.ORA file clearly indicates that you never ran NETCA and created a database service. Also described in the install docs.
  • 2. Re: Unable to Create Starter Database
    747313 Newbie
    Currently Being Moderated
    The below output is from the Quick Installation Guide. Why do you say that the environment is not supported? Are you referring to it being in a Virtual Environment?

    Operating System
    Oracle Database for Windows is supported on the following operating systems:

    Windows 2000 with service pack 1 or later. All editions, including Terminal Services and Microsoft Windows 2000 MultiLanguage Edition (MLE), are supported.

    Windows Server 2003 - all editions+

    Windows XP Professional

    I am using a static IP and have not installed a loopback adapter because the Installation Guide says that you should install it if you are installing on a DHCP or a non networked computer neither of which is true.

    I have now run NETCA and attempted to configure the local naming method. Below is the output of three files you requested TNSNAMES.ORA, SQLNET.ORA, and LISTENER.ORA

    TNSNAMES.ORA

    # tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora
    # Generated by Oracle configuration tools.

    ORCL.VIRTUALEMC.LOCAL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.147.15)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVICE_NAME = ORCL)
    )
    )

    SQLNET.ORA

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

    # This file is actually generated by netca. But if customers choose to
    # install "Software Only", this file wont exist and without the native
    # authentication, they will not be able to connect to the database on NT.

    SQLNET.AUTHENTICATION_SERVICES= (NTS)

    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

    NAMES.DEFAULT_DOMAIN = VirtualEMC.local

    LISTENER.ORA

    # listener.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\listener.ora
    # Generated by Oracle configuration tools.

    LISTENER =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.147.15)(PORT = 1521))
    )

    When I try and create a database named ORCL through the Database Configuration Assistant it fails with the TNS-12154 error.

    Also, after the install of the database software the url link for ISQL PLUS (http://VECC.VirtualEMC.local:5561/isqlplus) returns a "Cannot find server or DNS error".

    Please let me know if there is any other info that I could provide to ease with troubleshooting. Thanks.
  • 3. Re: Unable to Create Starter Database
    damorgan Oracle ACE Director
    Currently Being Moderated
    Again VMWare is uncertified and unsupported. Is there some reason you can not install this on a real operating system?

    What happens when you ping 192.168.147.15?

    What happens when you tnsping ORCL.VIRTUALEMC.LOCAL?

    What is the result of the following?
    lsnrctl status

    What are the values of the environment variables ORACLE_HOME and ORACLE_SID?
    If not set ... set them and try again.
  • 4. Re: Unable to Create Starter Database
    747313 Newbie
    Currently Being Moderated
    Ok, understood. Re-attempted installation on a physical server with Windows Server 2003 Enterprise Edition 32 bit.

    I can ping 192.168.147.15 from both the domain controller and the application server successfully.

    Below are the results of tnsping ORCL.VIRTUALEMC.LOCAL

    TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 19-JAN-2
    010 16:36:29

    Copyright (c) 1997, 2005, Oracle. All rights reserved.

    Used parameter files:
    C:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora


    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
    (HOST = 192.168.147.15)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = ORCL)))
    OK (50 msec)

    Below is the result of lsnrctl status

    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 19-JAN-2010 16:38
    :09

    Copyright (c) 1991, 2005, Oracle. All rights reserved.

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.147.15)(PORT=152
    1)))
    STATUS of the LISTENER
    ------------------------
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
    ction
    Start Date 19-JAN-2010 15:46:50
    Uptime 0 days 0 hr. 51 min. 19 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\oracle\product\10.2.0\db_1\network\admin\listener.o
    ra
    Listener Log File C:\oracle\product\10.2.0\db_1\network\log\listener.log

    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.147.15)(PORT=1521)))
    The listener supports no services
    The command completed successfully

    Environment variables ORACLE_HOME and ORACLE_SID do not exist. The only environment variable that appears to be related at all to Oracle is PATH. I will research the two environment variables, test, try again, and post the results. Thanks.

    Does the output of tnsping and lsnrctl status look as expected?
  • 5. Re: Unable to Create Starter Database
    hans forbrich Oracle ACE Director
    Currently Being Moderated
    ORA-12154 basically points to a misconfigured TNSNAMES.ORA so you are not necessarily that far off.

    If you have installed anything other than Express Edition, you will have the 'netca.exe' that could be used to configure your tnsnames.ora file.

    When you attempt to connect to the database, you usually use the form "connect user/password@db-alias" (example, sqlplus system/oracle@orcl or imp hr/blah@mydb).

    The "db-alias" must be translated to "database host information" + "port on which the listener is listening on the host" + "database service to which the listener should establish the connection". This is usually accomplished using the tnsnames.ora file found in the ORACLE_HOME/network/admin directory. That file should contain an entry that looks like one of the following (for db-alias called XE and one called DB11R2)
    XE =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = here)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = XE)
        )
      )
    
    DB11R2 =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = test88)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SID = orcl)
        )
      )
    If using the tnsnames.ora file (by default, or by definition as identified in the sqlnet.ora file), the 12154 means the entry could not be found in that file.

    Typical challenges that you may face include:

    1) each Oracle install will create a new TNSNAMES.ORA and they are not synchronized. Using the wrong file => 12154
    2) using sqlnet.ora and a 'default_domain' setting will append the domain to the db-alias before looking in the file
    3) typo errors

    The other challenge is that the most common errors are 12154, 12145, 12514 and 12541 - each is Oracle Networking related, but each represents a different problem.
  • 6. Re: Unable to Create Starter Database
    747313 Newbie
    Currently Being Moderated
    I have installed Oracle 10g R2 Enterprise Edition so I do have netca.exe and have used it to configure the tsnames.ora file. I've also used net manager to configure the listener and net service name. The part that confuses me though is that I can't even create a database to begin with without getting the ORA-12154 error. Are all of these configurations needed before you even create a database?

    Tomorrow morning I will follow Dan's clue into adding the two environment variables that seem to be missing. I though the install documentation mentioned that these environment variables are created by default in a Windows OS, but had to be created manually in a Linux OS is this not the case?

    Thanks for the response.
  • 7. Re: Unable to Create Starter Database
    hans forbrich Oracle ACE Director
    Currently Being Moderated
    user8987016 wrote:
    I have installed Oracle 10g R2 Enterprise Edition so I do have netca.exe and have used it to configure the tsnames.ora file. I've also used net manager to configure the listener and net service name. The part that confuses me though is that I can't even create a database to begin with without getting the ORA-12154 error. Are all of these configurations needed before you even create a database?
    No.

    You create a database while on the machine that will host the database. You set the ORACLE_HOME ahead of time, and may unset the ORACLE_SID, or set it to the proposed SID.

    Then you bypass Oracle Networking by using the "SQLPLUS / as sysdba", rather than "sqlplus /@db-alias AS SYSDBA", if you use ypur own create-db script.

    If you are using DBCA to do the database create, then you have some other issue. Note that the @ is the separator between password and db-alias. If you happen to use very secure password for SYS (on the DBCA passwords screen) that includes the @, DBCA WILL fail with a 12154 because thinks it has a network alias and it passes the password-part to Oracle Networking, which in turn says "no".

    Edited by: Hans Forbrich on Jan 19, 2010 8:18 PM

    A thought - if you are using DBCA, try generating the create script (an DBCA option) but NOT creating the database. Then post that script if it's not obvious what the error is.
  • 8. Re: Unable to Create Starter Database
    747313 Newbie
    Currently Being Moderated
    Thank you so much!

    The issue was as simple as having an @ sign in the password.

    Yes I should have read the password requirements more carefully, sorry!

    Again thanks for both of your time spent helping me through this.
  • 9. Re: Unable to Create Starter Database
    hans forbrich Oracle ACE Director
    Currently Being Moderated
    user8987016 wrote:
    Thank you so much!

    The issue was as simple as having an @ sign in the password.
    I suspect this will become a more common issue as people become aware of security. ;-)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points