Guest User

Untitled

a guest
Mar 23rd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. [root@server1 ~]# $ORACLE_HOME/bin/sqlplus ourdbuser@$ORACLE_SID/ourpassword
  2.  
  3. SQL*Plus: Release 12.2.0.1.0 Production on Fri Mar 23 20:16:01 2018
  4.  
  5. Copyright (c) 1982, 2016, Oracle. All rights reserved.
  6.  
  7. Last Successful login time: Fri Mar 23 2018 20:14:29 +00:00
  8.  
  9. Connected to:
  10. Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
  11.  
  12. [root@server2 ~]# $ORACLE_HOME/bin/sqlplus ourdb@$ORACLE_SID/ourpassword
  13.  
  14. SQL*Plus: Release 12.2.0.1.0 Production on Fri Mar 23 20:16:53 2018
  15.  
  16. Copyright (c) 1982, 2016, Oracle. All rights reserved.
  17.  
  18. ERROR:
  19. ORA-12545: Connect failed because target host or object does not exist
  20.  
  21. [root@server2 ~]# $ORACLE_HOME/bin/sqlplus ourdbuser
  22.  
  23. SQL*Plus: Release 12.2.0.1.0 Production on Fri Mar 23 20:17:17 2018
  24.  
  25. Copyright (c) 1982, 2016, Oracle. All rights reserved.
  26.  
  27. Enter password:
  28. Last Successful login time: Fri Mar 23 2018 20:12:25 +00:00
  29.  
  30. Connected to:
  31. Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
  32.  
  33. [root@server1 ~]# cat /etc/redhat-release
  34. Red Hat Enterprise Linux Server release 7.3 (Maipo)
  35. [root@server1 ~]# env | grep "ORACLE"
  36. ORACLE_SID=ourdb
  37. ORACLE_HOME=/opt/oracle/product/12.2.0/db
  38. [root@server1 ~]# ls -lrt /opt/oracle/product/12.2.0/db/network/admin/tnsnames.ora
  39. -rw-r-----. 1 oracle oinstall 416 Aug 3 2017 /opt/oracle/product/12.2.0/db/network/admin/tnsnames.ora
  40. [root@server1 ~]# cat /opt/oracle/product/12.2.0/db/network/admin/tnsnames.ora
  41. # tnsnames.ora Network Configuration File: /opt/oracle/product/12.2.0/db/network/admin/tnsnames.ora
  42. # Generated by Oracle configuration tools.
  43.  
  44. LISTENER_OURDB =
  45. (ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1521))
  46.  
  47. OURDB =
  48. (DESCRIPTION =
  49. (ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1521))
  50. (CONNECT_DATA =
  51. (SERVER = DEDICATED)
  52. (SERVICE_NAME = ourdb)
  53. )
  54. )
  55.  
  56. [root@server2 ~]# cat /etc/redhat-release
  57. Red Hat Enterprise Linux Server release 7.3 (Maipo)
  58. [root@server2 ~]# env | grep "ORACLE"
  59. ORACLE_SID=ourdb
  60. ORACLE_HOME=/opt/oracle/product/12.2.0/db
  61. [root@server2 ~]# ls -lrt /opt/oracle/product/12.2.0/db/network/admin/tnsnames.ora
  62. -rw-r-----. 1 oracle oinstall 466 Aug 22 2017 /opt/oracle/product/12.2.0/db/network/admin/tnsnames.ora
  63. [root@server2 ~]# cat /opt/oracle/product/12.2.0/db/network/admin/tnsnames.ora
  64. # tnsnames.ora Network Configuration File: /opt/oracle/product/12.2.0/db/network/admin/tnsnames.ora
  65. # Generated by Oracle configuration tools.
  66.  
  67. LISTENER_OURDB =
  68. (ADDRESS = (PROTOCOL = TCP)(HOST = server2)(PORT = 1521))
  69.  
  70. OURDB =
  71. (DESCRIPTION =
  72. (ADDRESS = (PROTOCOL = TCP)(HOST = server2)(PORT = 1521))
  73. (CONNECT_DATA =
  74. (SERVER = DEDICATED)
  75. (SERVICE_NAME = ourdb)
  76. )
  77. )
Add Comment
Please, Sign In to add comment