{"id":2566,"date":"2019-03-12T10:38:18","date_gmt":"2019-03-12T07:38:18","guid":{"rendered":"https:\/\/sysdba.org\/?p=2566"},"modified":"2025-07-02T06:01:07","modified_gmt":"2025-07-02T06:01:07","slug":"connecting-to-oracle","status":"publish","type":"post","link":"https:\/\/sysdba.org\/en\/connecting-to-oracle\/","title":{"rendered":"Connecting to Oracle"},"content":{"rendered":"<p>The Oracle client should be installed on the machine that will access the Oracle server. If the aim is to access the server only for applications then Oracle client will suffice, however for administration and management duties additional admin packages also need to be installed.<\/p>\n<p>Oracle Database 12c Release 1 can be downloaded from\u00a0<a href=\"http:\/\/www.oracle.com\/technetwork\/database\/enterprise-edition\/downloads\/index.html\">this page<\/a>.<\/p>\n<p><a href=\"\/wp-content\/old_uploads\/oracle_baglanti.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-6062 size-full disappear appear\" src=\"\/wp-content\/old_uploads\/oracle_baglanti.jpg\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"\/wp-content\/old_uploads\/oracle_baglanti.jpg 800w, \/wp-content\/old_uploads\/oracle_baglanti-300x207.jpg 300w\" alt=\"Connecting to Oracle\" width=\"800\" height=\"552\" \/><\/a><\/p>\n<p><strong>Toad connection<\/strong><\/p>\n<div id=\"attachment_6065\" class=\"wp-caption alignnone\">\n<p><a href=\"\/wp-content\/old_uploads\/Toad_BAglantI.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6065 size-full disappear appear\" src=\"\/wp-content\/old_uploads\/Toad_BAglantI.png\" sizes=\"auto, (max-width: 725px) 100vw, 725px\" srcset=\"\/wp-content\/old_uploads\/Toad_BAglantI.png 725w, \/wp-content\/old_uploads\/Toad_BAglantI-300x225.png 300w, \/wp-content\/old_uploads\/Toad_BAglantI-45x35.png 45w\" alt=\"Toad connection\" width=\"725\" height=\"543\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Toad connection<\/p>\n<\/div>\n<p><strong>SQL Developer connection<\/strong><\/p>\n<div id=\"attachment_6067\" class=\"wp-caption alignnone\">\n<p><a href=\"\/wp-content\/old_uploads\/SQLDeveloper_tnsnamesora.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6067 size-full disappear appear\" src=\"\/wp-content\/old_uploads\/SQLDeveloper_tnsnamesora.png\" sizes=\"auto, (max-width: 885px) 100vw, 885px\" srcset=\"\/wp-content\/old_uploads\/SQLDeveloper_tnsnamesora.png 885w, \/wp-content\/old_uploads\/SQLDeveloper_tnsnamesora-300x169.png 300w\" alt=\"SQL Developer connection\" width=\"885\" height=\"500\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">SQL Developer connection<\/p>\n<\/div>\n<div id=\"attachment_6069\" class=\"wp-caption alignnone\">\n<p><a href=\"\/wp-content\/old_uploads\/SQLDeveloper_BaglantI.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6069 size-full disappear appear\" src=\"\/wp-content\/old_uploads\/SQLDeveloper_BaglantI.png\" sizes=\"auto, (max-width: 504px) 100vw, 504px\" srcset=\"\/wp-content\/old_uploads\/SQLDeveloper_BaglantI.png 504w, \/wp-content\/old_uploads\/SQLDeveloper_BaglantI-300x218.png 300w, \/wp-content\/old_uploads\/SQLDeveloper_BaglantI-278x202.png 278w, \/wp-content\/old_uploads\/SQLDeveloper_BaglantI-373x270.png 373w\" alt=\"SQL Developer connection\" width=\"504\" height=\"366\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">SQL Developer connection<\/p>\n<\/div>\n<p>The contents of\u00a0<strong>tnsnames.ora<\/strong><br \/>\n[crayon]ASM =(DESCRIPTION =<\/p>\n<p>(ADDRESS = (PROTOCOL = TCP)(HOST = asm.ora.local)(PORT = 1521))<\/p>\n<p>(CONNECT_DATA =<\/p>\n<p>(SERVER = DEDICATED)<\/p>\n<p>(SERVICE_NAME = orcl)<\/p>\n<p>)<\/p>\n<p>)<\/p>\n<p>[\/crayon]<br \/>\n\u201cASM\u201d is only an alias and any other name could be given in its place. To avoid confusion, the server and the host should share the same name<\/p>\n<p>Note: To resolve the client machines name\u00a0<strong>asm.ora.local<\/strong><br \/>\n[crayon]ping asm.ora.localPinging asm.ora.local [192.168.13.132] with 32 bytes of data:<\/p>\n<p>Reply from 192.168.13.132: bytes=32 time&lt;1ms TTL=64<\/p>\n<p>[\/crayon]<br \/>\nWe need to get a response similar as the above lines. If you encounter any issues with name resolution<\/p>\n<p>1. Enter the following line in\u00a0<strong>C:WindowsSystem32driversetchosts<\/strong><\/p>\n<p>192.168.13.132 asm.ora.local asm<\/p>\n<p>2. Alternatively tsnames.ora should be changed to include\u00a0<strong>HOST = 192.168.13.132<\/strong><\/p>\n<p>Verifying the changes on the client machine:<br \/>\n[crayon]C:\\> tnsping asmTNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 \u2013 Production on 08-HAZ-2011 16:18:37<\/p>\n<p>Copyright (c) 1997, 2010, Oracle. All rights reserved.<\/p>\n<p>Used parameter files:<\/p>\n<p>c:appmdervisogluproduct.2.0client_1networkadminsqlnet.ora<\/p>\n<p>Used TNSNAMES adapter to resolve the alias<\/p>\n<p>Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.13.132)<\/p>\n<p>(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))<\/p>\n<p>OK (0 msec)<\/p>\n<p>[\/crayon]<br \/>\nIf the\u00a0<a href=\"http:\/\/sysdba.org\/listener\/\">listener<\/a>\u00a0is inactive or there are network access issues with port 1521:<br \/>\n[crayon]TNS-12541: TNS:no listener \u00ab The error due to the mentioned situations[\/crayon]<br \/>\nConnecting to SQLPlus through the command prompt.<br \/>\n[crayon]C:\\> sqlplus omer\/password@asm^^^ to connect, alternatively connect as the sysdba<\/p>\n<p>C:\\> sqlplus sys\/sys@asm as sysdba<\/p>\n<p><a href=\"http:\/\/sysdba.org\/sqlplus\/\">SQL*Plus<\/a>: Release 11.2.0.1.0 Production on \u00c3ar Haz 8 16:36:01 2011<\/p>\n<p>Copyright (c) 1982, 2010, Oracle. All rights reserved.<\/p>\n<p>Connected to:<\/p>\n<p>Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 \u2013 Production<\/p>\n<p>With the Partitioning, OLAP, Data Mining and Real Application Testing options<\/p>\n<p>[\/crayon]<br \/>\n[crayon]C:\\> sqlplus omer\/password@asm1SQL*Plus: Release 11.2.0.1.0 Production on Per Haz 9 14:42:33 2011<\/p>\n<p>Copyright (c) 1982, 2010, Oracle. All rights reserved.<\/p>\n<p>[\/crayon]<br \/>\n[crayon]ERROR: ORA-12154: TNS:could not resolve the connect identifier specified[\/crayon]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Oracle client should be installed on the machine that will access the Oracle server. If the aim is to access the server only for applications then Oracle client will suffice, however for administration and management duties additional admin packages also need to be installed.<\/p>\n","protected":false},"author":1,"featured_media":3438,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[383,338],"tags":[345],"class_list":["post-2566","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dba_i","category-oracle-tr","tag-oracle"],"_links":{"self":[{"href":"https:\/\/sysdba.org\/en\/wp-json\/wp\/v2\/posts\/2566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sysdba.org\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sysdba.org\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sysdba.org\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sysdba.org\/en\/wp-json\/wp\/v2\/comments?post=2566"}],"version-history":[{"count":1,"href":"https:\/\/sysdba.org\/en\/wp-json\/wp\/v2\/posts\/2566\/revisions"}],"predecessor-version":[{"id":4831,"href":"https:\/\/sysdba.org\/en\/wp-json\/wp\/v2\/posts\/2566\/revisions\/4831"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sysdba.org\/en\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/sysdba.org\/en\/wp-json\/wp\/v2\/media?parent=2566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sysdba.org\/en\/wp-json\/wp\/v2\/categories?post=2566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sysdba.org\/en\/wp-json\/wp\/v2\/tags?post=2566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}