Snowfun

导航

 

SQL> select * from HrmWorkResume@oa;
select * from HrmWorkResume@oa
                            *
ERROR at line 1:
ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: preceding 2 lines from OA


SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@NSDZHNCDB01 ~]$ pwd
/home/oracle
[oracle@NSDZHNCDB01 ~]$ ls
oradiag_oracle
[oracle@NSDZHNCDB01 ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_nsdzhncdb01-lv_root
                       44G  3.9G   38G  10% /
tmpfs                  64G   19G   46G  30% /dev/shm
/dev/sda1             477M   59M  394M  13% /boot
/dev/mapper/vg_data-lv_data
                      295G   54G  226G  20% /data
/dev/mapper/vg_software-lv_software
                      314G   54G  245G  18% /software
[oracle@NSDZHNCDB01 ~]$ cd /data/
[oracle@NSDZHNCDB01 data]$ ls
impdp_20150906.log  lost+found  NC633GOLD.DMP  oracle  oradata  oraInventory
[oracle@NSDZHNCDB01 data]$ cd oracle/
[oracle@NSDZHNCDB01 oracle]$ ls
admin  cfgtoollogs  checkpoints  dayautobackup.sh  diag  nightautobackup.sh  oradata  product
[oracle@NSDZHNCDB01 oracle]$ cd product/
[oracle@NSDZHNCDB01 product]$ ls
11.2.0
[oracle@NSDZHNCDB01 product]$ cd 11.2.0/
[oracle@NSDZHNCDB01 11.2.0]$ ls
dbhome_1
[oracle@NSDZHNCDB01 11.2.0]$ cd dbhome_1/
[oracle@NSDZHNCDB01 dbhome_1]$ ls
apex         csmig      diagnostics          instantclient  lib               odbc         owb       scheduler        ucp
assistants   css        dv                   inventory      log               olap         owm       slax             uix
bin          ctx        emcli                j2ee           md                ons          perl      sqldeveloper     utl
ccr          cv         EMStagePatches_orcl  javavm         mesg              OPatch       plsql     sqlj             wwg
cdata        dbs        has                  jdbc           mgw               opmn         precomp   sqlplus          xdk
cfgtoollogs  dc_ocm     hs                   jdev           network           oracore      racg      srvm
clone        deinstall  ide                  jdk            nls               oraInst.loc  rdbms     startup.log
config       demo       install              jlib           NSDZHNCDB01_orcl  ord          relnotes  sysman
crs          dg4msql    install.platform     ldap           oc4j              oui          root.sh   timingframework
[oracle@NSDZHNCDB01 dbhome_1]$ cd network/
[oracle@NSDZHNCDB01 network]$ cd admin
[oracle@NSDZHNCDB01 admin]$ ls
listener_20160517.ora  listener.ora  samples  shrept.lst  tnsnames_20160517.ora  tnsnames_bak20160505.ora  tnsnames.ora
[oracle@NSDZHNCDB01 admin]$ more listener
listener: ûԐҸþ»倂¼
[oracle@NSDZHNCDB01 admin]$ more listener.ora
# listener.ora Network Configuration File: /data/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

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

ADR_BASE_LISTENER = /data/oracle


SID_LIST_LISTENER=
  (SID_LIST=
   (SID_DESC=
    (SID_NAME=dg4msql)
      (ORACLE_HOME=/data/oracle/product/11.2.0/dbhome_1)
         (PROGRAM=dg4msql)
   )
(SID_DESC=
    (SID_NAME=oaecology)
      (ORACLE_HOME=/data/oracle/product/11.2.0/dbhome_1)
         (PROGRAM=oaecology)
   )
 )
#CONNECT_TIMEOUT_LISTENER?=?0
[oracle@NSDZHNCDB01 admin]$ ls
listener_20160517.ora  listener.ora  samples  shrept.lst  tnsnames_20160517.ora  tnsnames_bak20160505.ora  tnsnames.ora
[oracle@NSDZHNCDB01 admin]$ more listener_20160517.ora
# listener.ora Network Configuration File: /data/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

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

ADR_BASE_LISTENER = /data/oracle


SID_LIST_LISTENER=
  (SID_LIST=
   (SID_DESC=
    (SID_NAME=dg4msql)
      (ORACLE_HOME=/data/oracle/product/11.2.0/dbhome_1)
         (PROGRAM=dg4msql)
   )
 )
#CONNECT_TIMEOUT_LISTENER?=?0
[oracle@NSDZHNCDB01 admin]$
[oracle@NSDZHNCDB01 admin]$ ls
listener_20160517.ora  listener.ora  samples  shrept.lst  tnsnames_20160517.ora  tnsnames_bak20160505.ora  tnsnames.ora
[oracle@NSDZHNCDB01 admin]$ mv listener.ora listener.ora_20160518
[oracle@NSDZHNCDB01 admin]$ mv listener_20160517.ora listener.ora
[oracle@NSDZHNCDB01 admin]$ more listener.ora
# listener.ora Network Configuration File: /data/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

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

ADR_BASE_LISTENER = /data/oracle


SID_LIST_LISTENER=
  (SID_LIST=
   (SID_DESC=
    (SID_NAME=dg4msql)
      (ORACLE_HOME=/data/oracle/product/11.2.0/dbhome_1)
         (PROGRAM=dg4msql)
   )
 )
#CONNECT_TIMEOUT_LISTENER?=?0
[oracle@NSDZHNCDB01 admin]$ lsnrctl

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 18-MAY-2016 16:00:40

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

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> reload
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=NSDZHNCDB01)(PORT=1521)))
The command completed successfully
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=NSDZHNCDB01)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                17-MAY-2016 20:06:38
Uptime                    0 days 19 hr. 54 min. 26 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /data/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /data/oracle/diag/tnslsnr/NSDZHNCDB01/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=NSDZHNCDB01)(PORT=1521)))
Services Summary...
Service "dg4msql" has 1 instance(s).
  Instance "dg4msql", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> exit             
[oracle@NSDZHNCDB01 admin]$ cd ..
[oracle@NSDZHNCDB01 network]$ ls
admin  doc  install  jlib  lib  log  mesg  tools  trace
c[oracle@NSDZHNCDB01 network]$ cd ..
[oracle@NSDZHNCDB01 dbhome_1]$ ls
apex         csmig      diagnostics          instantclient  lib               odbc         owb       scheduler        ucp
assistants   css        dv                   inventory      log               olap         owm       slax             uix
bin          ctx        emcli                j2ee           md                ons          perl      sqldeveloper     utl
ccr          cv         EMStagePatches_orcl  javavm         mesg              OPatch       plsql     sqlj             wwg
cdata        dbs        has                  jdbc           mgw               opmn         precomp   sqlplus          xdk
cfgtoollogs  dc_ocm     hs                   jdev           network           oracore      racg      srvm
clone        deinstall  ide                  jdk            nls               oraInst.loc  rdbms     startup.log
config       demo       install              jlib           NSDZHNCDB01_orcl  ord          relnotes  sysman
crs          dg4msql    install.platform     ldap           oc4j              oui          root.sh   timingframework
[oracle@NSDZHNCDB01 dbhome_1]$ pwd
/data/oracle/product/11.2.0/dbhome_1
[oracle@NSDZHNCDB01 dbhome_1]$ ls
apex         csmig      diagnostics          instantclient  lib               odbc         owb       scheduler        ucp
assistants   css        dv                   inventory      log               olap         owm       slax             uix
bin          ctx        emcli                j2ee           md                ons          perl      sqldeveloper     utl
ccr          cv         EMStagePatches_orcl  javavm         mesg              OPatch       plsql     sqlj             wwg
cdata        dbs        has                  jdbc           mgw               opmn         precomp   sqlplus          xdk
cfgtoollogs  dc_ocm     hs                   jdev           network           oracore      racg      srvm
clone        deinstall  ide                  jdk            nls               oraInst.loc  rdbms     startup.log
config       demo       install              jlib           NSDZHNCDB01_orcl  ord          relnotes  sysman
crs          dg4msql    install.platform     ldap           oc4j              oui          root.sh   timingframework
[oracle@NSDZHNCDB01 dbhome_1]$ cd dg4msql/
admin/  demo/   driver/ lib/    log/   
[oracle@NSDZHNCDB01 dbhome_1]$ cd dg4msql/
[oracle@NSDZHNCDB01 dg4msql]$ ls
admin  demo  driver  lib  log
[oracle@NSDZHNCDB01 dg4msql]$ cd admin/
[oracle@NSDZHNCDB01 admin]$ ls
dg4msql_cvw.sql  dg4msql_tx.sql  initdg4msql.ora  initoaecology.ora  listener.ora  listener.ora.sample  tnsnames.ora.sample
[oracle@NSDZHNCDB01 admin]$ more initdg4msql.ora
# This is a customized agent init file that contains the HS parameters
# that are needed for the Database Gateway for Microsoft SQL Server

#
# HS init parameters
#
HS_FDS_CONNECT_INFO=[10.10.0.60]:1433//EastRiver
# alternate connect format is hostname/serverinstance/databasename
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER

[oracle@NSDZHNCDB01 admin]$
[oracle@NSDZHNCDB01 admin]$ ^C
[oracle@NSDZHNCDB01 admin]$
[oracle@NSDZHNCDB01 admin]$ pwd
/data/oracle/product/11.2.0/dbhome_1/dg4msql/admin
[oracle@NSDZHNCDB01 admin]$ ls
dg4msql_cvw.sql  dg4msql_tx.sql  initdg4msql.ora  initoaecology.ora  listener.ora  listener.ora.sample  tnsnames.ora.sample
[oracle@NSDZHNCDB01 admin]$ more listener.ora
# listener.ora Network Configuration File: /data/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

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

ADR_BASE_LISTENER = /data/oracle


SID_LIST_LISTENER=
  (SID_LIST=
   (SID_DESC=
    (SID_NAME=dg4msql)
      (ORACLE_HOME=/data/oracle/product/11.2.0/dbhome_1)
         (PROGRAM=dg4msql)
   )
 )

 

SID_LIST_LISTENER=
  (SID_LIST=
   (SID_DESC=
    (SID_NAME=oaecology)
      (ORACLE_HOME=/data/oracle/product/11.2.0/dbhome_1)
         (PROGRAM=dg4msql)
   )
 )
#CONNECT_TIMEOUT_LISTENER?=?0
[oracle@NSDZHNCDB01 admin]$
[oracle@NSDZHNCDB01 admin]$
[oracle@NSDZHNCDB01 admin]$ pwd
/data/oracle/product/11.2.0/dbhome_1/dg4msql/admin
[oracle@NSDZHNCDB01 admin]$ ls
dg4msql_cvw.sql  dg4msql_tx.sql  initdg4msql.ora  initoaecology.ora  listener.ora  listener.ora.sample  tnsnames.ora.sample
[oracle@NSDZHNCDB01 admin]$ cp initdg4msql.ora initdg4msql2.ora
[oracle@NSDZHNCDB01 admin]$ vi initdg4msql2.ora
[oracle@NSDZHNCDB01 admin]$ more initdg4msql.ora
# This is a customized agent init file that contains the HS parameters
# that are needed for the Database Gateway for Microsoft SQL Server

#
# HS init parameters
#
HS_FDS_CONNECT_INFO=[10.10.0.60]:1433//EastRiver
# alternate connect format is hostname/serverinstance/databasename
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER

[oracle@NSDZHNCDB01 admin]$ cd ..
[oracle@NSDZHNCDB01 dg4msql]$ cd ..
[oracle@NSDZHNCDB01 dbhome_1]$ cd ..
[oracle@NSDZHNCDB01 11.2.0]$ cd dbhome_1/
[oracle@NSDZHNCDB01 dbhome_1]$ cd network/
[oracle@NSDZHNCDB01 network]$ ls
admin  doc  install  jlib  lib  log  mesg  tools  trace
[oracle@NSDZHNCDB01 network]$ cd admin
[oracle@NSDZHNCDB01 admin]$ vi listener.ora
[oracle@NSDZHNCDB01 admin]$
[oracle@NSDZHNCDB01 admin]$
[oracle@NSDZHNCDB01 admin]$ lsnrctl

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 18-MAY-2016 16:17:42

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

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=NSDZHNCDB01)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                17-MAY-2016 20:06:38
Uptime                    0 days 20 hr. 11 min. 5 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /data/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /data/oracle/diag/tnslsnr/NSDZHNCDB01/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=NSDZHNCDB01)(PORT=1521)))
Services Summary...
Service "dg4msql" has 1 instance(s).
  Instance "dg4msql", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> reload
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=NSDZHNCDB01)(PORT=1521)))
The command completed successfully
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=NSDZHNCDB01)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                17-MAY-2016 20:06:38
Uptime                    0 days 20 hr. 11 min. 15 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /data/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /data/oracle/diag/tnslsnr/NSDZHNCDB01/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=NSDZHNCDB01)(PORT=1521)))
Services Summary...
Service "dg4msql2" has 1 instance(s).
  Instance "dg4msql2", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>
LSNRCTL> exit
[oracle@NSDZHNCDB01 admin]$ vi listener.ora
[oracle@NSDZHNCDB01 admin]$ lsnrctl

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 18-MAY-2016 16:21:33

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

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> reload
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=NSDZHNCDB01)(PORT=1521)))
The command completed successfully
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=NSDZHNCDB01)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                17-MAY-2016 20:06:38
Uptime                    0 days 20 hr. 14 min. 59 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /data/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /data/oracle/diag/tnslsnr/NSDZHNCDB01/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=NSDZHNCDB01)(PORT=1521)))
Services Summary...
Service "dg4msql" has 1 instance(s).
  Instance "dg4msql", status UNKNOWN, has 1 handler(s) for this service...
Service "dg4msql2" has 1 instance(s).
  Instance "dg4msql2", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> exit
[oracle@NSDZHNCDB01 admin]$ more tnsnames
tnsnames: ûԐҸþ»倂¼
[oracle@NSDZHNCDB01 admin]$ more tnsnames.ora
# tnsnames.ora Network Configuration File: /data/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = NSDZHNCDB01)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

 


dg4msql =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.0.68)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = dg4msql)
    )
    (HS = OK)
  )

oaecology =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.0.68)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = oaecology)
    )
    (HS = OK)
  )

orcl172 =
(DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.1.172)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
)
[oracle@NSDZHNCDB01 admin]$ vi tnsnames.ora
[oracle@NSDZHNCDB01 admin]$
[oracle@NSDZHNCDB01 admin]$
[oracle@NSDZHNCDB01 admin]$ lsnrctl

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 18-MAY-2016 16:24:34

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

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> reload
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=NSDZHNCDB01)(PORT=1521)))
The command completed successfully
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=NSDZHNCDB01)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                17-MAY-2016 20:06:38
Uptime                    0 days 20 hr. 18 min. 4 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /data/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /data/oracle/diag/tnslsnr/NSDZHNCDB01/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=NSDZHNCDB01)(PORT=1521)))
Services Summary...
Service "dg4msql" has 1 instance(s).
  Instance "dg4msql", status UNKNOWN, has 1 handler(s) for this service...
Service "dg4msql2" has 1 instance(s).
  Instance "dg4msql2", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> exit
[oracle@NSDZHNCDB01 admin]$ tnsping dg4msql2

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 18-MAY-2016 16:24:57

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

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.0.68)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = dg4msql2) (HS = OK))
TNS-12533: TNS:illegal ADDRESS parameters
[oracle@NSDZHNCDB01 admin]$ tnsping dg4msql

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 18-MAY-2016 16:25:19

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

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.0.68)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = dg4msql)) (HS = OK))
OK (0 msec)
[oracle@NSDZHNCDB01 admin]$ ls
listener.ora  listener.ora_20160518  samples  shrept.lst  tnsnames_20160517.ora  tnsnames_bak20160505.ora  tnsnames.ora
[oracle@NSDZHNCDB01 admin]$ more tnsnames.ora
# tnsnames.ora Network Configuration File: /data/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = NSDZHNCDB01)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )


dg4msql2=
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.0.68)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = dg4msql2
    )
    (HS = OK)
  )

dg4msql =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.0.68)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = dg4msql)
    )
    (HS = OK)
  )

oaecology =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.0.68)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = oaecology)
    )
    (HS = OK)
  )

orcl172 =
(DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.1.172)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
)
[oracle@NSDZHNCDB01 admin]$    vi tnsnames
[oracle@NSDZHNCDB01 admin]$
[oracle@NSDZHNCDB01 admin]$    vi tnsnames.ora
[oracle@NSDZHNCDB01 admin]$
[oracle@NSDZHNCDB01 admin]$
[oracle@NSDZHNCDB01 admin]$
[oracle@NSDZHNCDB01 admin]$ tnsping dg4msql2

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 18-MAY-2016 16:26:54

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

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.0.68)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = dg4msql2)) (HS = OK))
OK (0 msec)
[oracle@NSDZHNCDB01 admin]$
[oracle@NSDZHNCDB01 admin]$
[oracle@NSDZHNCDB01 admin]$
[oracle@NSDZHNCDB01 admin]$

posted on 2016-05-18 16:10  Snowfun  阅读(2338)  评论(0)    收藏  举报