connect error

1.error

oracle [mmsc] :/home/mmsc/mms_home/cfg>sql

SQL*Plus: Release 11.2.0.1.0 Production on Mon Oct 17 11:21:07 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified


Enter user-name:

 

 

2.mms.cfg

[Database]
DBName = ora11g
DBUserName = mmsc
DBPassword = mmsc

DBUrl = jdbc:oracle:thin:@192.168.9.93:1521:ora11g
DBJdbcClass=oracle.jdbc.driver.OracleDriver

MMS_LOCAL_FLOATIP = 192.168.9.93

 

3.lsnrctl status

[oracle@oracle admin]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 17-OCT-2011 11:35:16

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.9.93)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                14-OCT-2011 19:34:58
Uptime                    2 days 16 hr. 0 min. 17 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /myoracle/app/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /myoracle/app/diag/tnslsnr/oracle/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.9.93)(PORT=1521)))
Services Summary...
Service "ora11g" has 1 instance(s).
  Instance "ora11g", status READY, has 1 handler(s) for this service...
Service "ora11gXDB" has 1 instance(s).
  Instance "ora11g", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@oracle admin]$

 

4.listener.ora

[oracle@oracle admin]$ vi listener.ora

# listener.ora Network Configuration File: /myoracle/app/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

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

ADR_BASE_LISTENER = /myoracle/app

~

 

5.tnsnames.ora

[oracle@oracle admin]$ vi tnsnames.ora

# tnsnames.ora Network Configuration File: /myoracle/app/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

ORA11G =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ORACLE)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ora11g)
    )
  )

ORA93 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.9.93)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ora11g)
    )
  )
~
~

6..bash_profile

[oracle@oracle ~]$ vi .bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

#export PATH
export ORACLE_BASE=/myoracle/app
export ORACLE_HOME=/myoracle/app/product/11.2.0/dbhome_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_SID=ora11g
export umash=022
export PATH=$PATH:$ORACLE_HOME/bin:/usr/bin/java:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
~

你可能感兴趣的:(connect)