{"id":1473,"date":"2013-10-13T14:00:56","date_gmt":"2013-10-13T12:00:56","guid":{"rendered":"http:\/\/www.extradrm.com\/?p=1473"},"modified":"2013-10-16T22:33:24","modified_gmt":"2013-10-16T20:33:24","slug":"oracle-net-configuration-oracle-11g","status":"publish","type":"post","link":"https:\/\/www.extradrm.com\/?p=1473","title":{"rendered":"ORACLE.NET : Configuration oracle 11g"},"content":{"rendered":"<p>Oracle SQL developer is free and is very powerful more. We can compare it to sql server management studio. To launch sqldeveloper under linux :<\/p>\n<pre>$ORACLE_HOME\/sqldeveloper\/sqldeveloper.sh<\/pre>\n<p>.<br \/>\nA panel to create a connexion to sqldeveloper using tnsnames connectors like below is necessary :<\/p>\n<p><a href=\"http:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/tnsnames.ora-01.jpg\"><img loading=\"lazy\" class=\"alignleft size-full wp-image-1476\" alt=\"tnsnames.ora-01\" src=\"http:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/tnsnames.ora-01.jpg\" width=\"738\" height=\"572\" \/><\/a><\/p>\n<hr \/>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n<strong>To see the content of an .ORA file we can make the cat instruction like below :<\/strong><\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/tnsnames.ora_.jpg\"><img loading=\"lazy\" class=\"size-full wp-image-1477 aligncenter\" alt=\"tnsnames.ora\" src=\"http:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/tnsnames.ora_.jpg\" width=\"751\" height=\"543\" srcset=\"https:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/tnsnames.ora_.jpg 751w, https:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/tnsnames.ora_-300x216.jpg 300w\" sizes=\"(max-width: 751px) 100vw, 751px\" \/><\/a><\/p>\n<hr \/>\n<h2>How to configure a tnsname correctly ?<\/h2>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/netca1.jpg\"><img loading=\"lazy\" class=\"size-full wp-image-1530 aligncenter\" alt=\"netca1\" src=\"http:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/netca1.jpg\" width=\"692\" height=\"587\" srcset=\"https:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/netca1.jpg 692w, https:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/netca1-300x254.jpg 300w\" sizes=\"(max-width: 692px) 100vw, 692px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/netca2.jpg\"><img loading=\"lazy\" class=\"size-full wp-image-1529 aligncenter\" alt=\"netca2\" src=\"http:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/netca2.jpg\" width=\"842\" height=\"498\" srcset=\"https:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/netca2.jpg 842w, https:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/netca2-300x177.jpg 300w\" sizes=\"(max-width: 842px) 100vw, 842px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/netca3.jpg\"><img loading=\"lazy\" class=\"size-full wp-image-1528 aligncenter\" alt=\"netca3\" src=\"http:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/netca3.jpg\" width=\"657\" height=\"562\" srcset=\"https:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/netca3.jpg 657w, https:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/netca3-300x256.jpg 300w\" sizes=\"(max-width: 657px) 100vw, 657px\" \/><\/a><a href=\"http:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/netca4.jpg\"><img loading=\"lazy\" class=\"size-full wp-image-1527 aligncenter\" alt=\"netca4\" src=\"http:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/netca4.jpg\" width=\"961\" height=\"591\" srcset=\"https:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/netca4.jpg 961w, https:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/netca4-300x184.jpg 300w\" sizes=\"(max-width: 961px) 100vw, 961px\" \/><\/a><\/p>\n<p><strong>To connect to sqlplus with a tnsname:<\/strong><br \/>\ntype under test base (<strong>export ORACLE_SID=test<\/strong>):<\/p>\n<pre>sqlplus demo\/demo@production1<\/pre>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n<a href=\"http:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/tnsnames.ora-02.jpg\"><img loading=\"lazy\" class=\"alignleft size-full wp-image-1490\" alt=\"tnsnames.ora-02\" src=\"http:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/tnsnames.ora-02.jpg\" width=\"613\" height=\"261\" srcset=\"https:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/tnsnames.ora-02.jpg 613w, https:\/\/www.extradrm.com\/wp-content\/uploads\/2013\/10\/tnsnames.ora-02-300x127.jpg 300w\" sizes=\"(max-width: 613px) 100vw, 613px\" \/><\/a><\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n<strong>Some useful SQL requests to see which sessions<\/strong> are online. Be connected as (sys\/test) as sysdba on base test.<\/p>\n<pre>SQL&gt;select s.osuser, s.username, s.sid, s.serial#, s.program \"Prog. Client\", p.program \"Prog. server\",s.server, s.terminal from v$session s, v$process p where s.paddr = p.addr and type &lt;&gt; 'BACKGROUND' and s.username not in ('SYSMAN','DBSNMP');<\/pre>\n<p>we can use this request too<\/p>\n<pre>SQL&gt;select username, terminal, serial#, sid, to_char(logon_time, 'DD-MM-YYYY hh24:mi:ss') \"Connect time\" from v$session where type &lt;&gt; 'BACKGROUND' and username not in ('SYSMAN','DBSNMP');<\/pre>\n<p>Alter system kill session &#8216;sid,serial#&#8217;;<\/p>\n<pre>alter system kill session '154,46';<\/pre>\n<p>&#8211; Do never kill an internal session where username is not null;<br \/>\n&#8211; Netmgr program is like tsadim and allow to manage all tns connections.<\/p>\n<p>Cheers<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Oracle SQL developer is free and is very powerful more. We can compare it to sql server management studio. To launch sqldeveloper under linux : $ORACLE_HOME\/sqldeveloper\/sqldeveloper.sh . A panel to create a connexion to&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":2845,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[240],"tags":[246,247,248],"youtube_video":null,"_links":{"self":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts\/1473"}],"collection":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1473"}],"version-history":[{"count":0,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts\/1473\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/media\/2845"}],"wp:attachment":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}