{"id":976,"date":"2014-04-07T11:15:30","date_gmt":"2014-04-07T09:15:30","guid":{"rendered":"http:\/\/marwin.e-blog.cz\/?p=976"},"modified":"2014-05-26T15:08:45","modified_gmt":"2014-05-26T13:08:45","slug":"jak-pripojit-sqldeveloper-k-oracledb-skolni-projekt","status":"publish","type":"post","link":"https:\/\/svobodma.cz\/?p=976","title":{"rendered":"Jak p\u0159ipojit SQLDeveloper k OracleDB &#8211; \u0161koln\u00ed projekt; How Connect SQLDeveloper to OracleDB"},"content":{"rendered":"<h2>Toto je n\u00e1vod jak p\u0159ipojit SQLDeveloper k OracleDB &#8211; Express .(V m\u00e9m p\u0159\u00edpad\u011b b\u011b\u017e\u00ed Oracle DB na Oracle Linuxu, kter\u00fd je virtualizovan\u00fd a b\u011b\u017e\u00ed na stejn\u00e9m \u017eeleze, ze kter\u00e9ho se budu p\u0159ipojovat (notebook) Hyper-V)<\/h2>\n<p><a href=\"http:\/\/marwin.e-blog.cz\/?attachment_id=996\" rel=\"attachment wp-att-996\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-996\" alt=\"Oracle\" src=\"http:\/\/marwin.e-blog.cz\/marwin.e-blog.cz\/httpdocs\/wp-content\/uploads\/Oracle.png\" width=\"663\" height=\"291\" \/><\/a><\/p>\n<p>1. Je pot\u0159eba m\u00edt z po\u010d\u00edta\u010de\u00a0ze kter\u00e9ho se budete p\u0159ipojovat k OracleDB TCP\/IP\u00a0spojen\u00ed. (ping v\u00e1m toto spojen\u00ed ov\u011b\u0159\u00ed) <strong>VMWARE Player umo\u017enuje NAT<\/strong><\/p>\n<p>2. Pokava\u010f toto spojen\u00ed nem\u00e1te, je pot\u0159eba nastavit si s\u00edtovou kartu na obou stran\u00e1ch a b\u00fdt v stejn\u00e9m subnetu.<\/p>\n<p>kontrola stavu s\u00edtov\u00e9 karty na Lunxu Oracle DB:<\/p>\n<p><a href=\"http:\/\/marwin.e-blog.cz\/?attachment_id=977\" rel=\"attachment wp-att-977\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-977\" alt=\"IP\" src=\"http:\/\/marwin.e-blog.cz\/marwin.e-blog.cz\/httpdocs\/wp-content\/uploads\/IP.png\" width=\"676\" height=\"421\" \/><\/a><\/p>\n<p>Te\u010f si nastav\u00edme Hosts file<\/p>\n<p>IP v hosts mus\u00ed samoz\u0159ejm\u011b odpov\u00eddat va\u0161\u00ed lok\u00e1ln\u00ed IP<\/p>\n<p>#vi \/etc\/hosts<\/p>\n<p><a href=\"http:\/\/marwin.e-blog.cz\/?attachment_id=1033\" rel=\"attachment wp-att-1033\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1033\" alt=\"hosts\" src=\"http:\/\/marwin.e-blog.cz\/marwin.e-blog.cz\/httpdocs\/wp-content\/uploads\/hosts.png\" width=\"722\" height=\"86\" \/><\/a><\/p>\n<p>Proto\u017ee jsem si zm\u011bnil glob\u00e1ln\u00ed jm\u00e9nu db na ORACLEDBA (nen\u00ed nutn\u00e9, ale pro jistotu ud\u00e1v\u00e1m v\u0161echny zm\u011bny v nastaven\u00ed)<\/p>\n<p>Prov\u00e1d\u00ed se z SQLPLUS.<\/p>\n<p>#su &#8211; oracle<\/p>\n<p>#sqlplus \/ as sysdba<\/p>\n<p><a href=\"http:\/\/marwin.e-blog.cz\/?attachment_id=978\" rel=\"attachment wp-att-978\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-978\" alt=\"renameGlobalName\" src=\"http:\/\/marwin.e-blog.cz\/marwin.e-blog.cz\/httpdocs\/wp-content\/uploads\/renameGlobalName.png\" width=\"476\" height=\"50\" \/><\/a><\/p>\n<p><a href=\"http:\/\/marwin.e-blog.cz\/?attachment_id=979\" rel=\"attachment wp-att-979\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-979\" alt=\"renamedGlobalName\" src=\"http:\/\/marwin.e-blog.cz\/marwin.e-blog.cz\/httpdocs\/wp-content\/uploads\/renamedGlobalName.png\" width=\"737\" height=\"118\" \/><\/a><\/p>\n<p>Vysko\u010d\u00edme z SQLPLUS p\u0159\u00edkazem #exit<\/p>\n<p>Vlezeme si do adres\u00e1\u0159e, kde m\u00e1me ulo\u017een\u00e9 soubory <strong>listener.ora<\/strong> a<strong> tnsnames.ora<\/strong><\/p>\n<p><a href=\"http:\/\/marwin.e-blog.cz\/?attachment_id=983\" rel=\"attachment wp-att-983\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-983\" alt=\"oracleSettings\" src=\"http:\/\/marwin.e-blog.cz\/marwin.e-blog.cz\/httpdocs\/wp-content\/uploads\/oracleSettings.png\" width=\"889\" height=\"184\" \/><\/a><\/p>\n<p>Uprav\u00edme listener.ora dle obr\u00e1zku (pozor na mezery a znaky, velikost znaku v z\u00e1vork\u00e1ch, chyb\u011bj\u00edc\u00ed mezera t\u0159eba p\u0159ed = v\u00e1m zad\u011bl\u00e1 na probl\u00e9my :))<\/p>\n<p><a href=\"http:\/\/marwin.e-blog.cz\/?attachment_id=984\" rel=\"attachment wp-att-984\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-984\" alt=\"listener.ora\" src=\"http:\/\/marwin.e-blog.cz\/marwin.e-blog.cz\/httpdocs\/wp-content\/uploads\/listener.ora_.png\" width=\"621\" height=\"496\" \/><\/a><\/p>\n<p>A nyn\u00ed tnsname.ora<\/p>\n<p><a href=\"http:\/\/marwin.e-blog.cz\/?attachment_id=985\" rel=\"attachment wp-att-985\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-985\" alt=\"tnsname.ora\" src=\"http:\/\/marwin.e-blog.cz\/marwin.e-blog.cz\/httpdocs\/wp-content\/uploads\/tnsname.ora_.png\" width=\"585\" height=\"443\" \/><\/a><\/p>\n<p>Ted m\u016f\u017eeme vyzkou\u0161et, \u017ee n\u00e1m b\u011b\u017e\u00ed listener, viz. obr\u00e1zek m\u011b u\u017e nyn\u00ed b\u011b\u017e\u00ed v po\u0159\u00e1dku.<\/p>\n<p>#lsnrctl start listener<\/p>\n<p><a href=\"http:\/\/marwin.e-blog.cz\/?attachment_id=986\" rel=\"attachment wp-att-986\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-986\" alt=\"lsnrctl_start\" src=\"http:\/\/marwin.e-blog.cz\/marwin.e-blog.cz\/httpdocs\/wp-content\/uploads\/lsnrctl_start.png\" width=\"850\" height=\"322\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Nyn\u00ed si vytvo\u0159\u00edme u\u017eivatele, kter\u00e9ho budeme pou\u017e\u00edvat pro p\u0159ipojen\u00ed do Oracle DB z SQLDeveloperu. M\u016f\u017eete pou\u017e\u00edt i implicitn\u00edho u\u017eivatele &#8222;admin&#8220;, ale pro n\u00e1\u0161 \u0161koln\u00ed projekt bude lep\u0161\u00ed, kdy\u017e u\u017eivatel nebude obsahovat \u017e\u00e1dn\u00e9 tabulky. Ty si pot\u00e9 budeme moci vytvo\u0159it z SQLDeveloperu. &#8222;U\u017eivateli mus\u00edme p\u0159i\u0159adit opr\u00e1vn\u011bn\u00ed &#8222;<strong>connect, resource, dba<\/strong>&#8222;. V na\u0161em p\u0159\u00edpad\u011b mu d\u00e1me nejvy\u0161\u0161\u00ed opr\u00e1vn\u011bn\u00ed &#8222;<strong>dba<\/strong>&#8222;, ale standartn\u011b by to tak b\u00fdt n\u011bm\u011blo&#8220;<\/p>\n<p>Dostaneme se op\u011bt do SQLPLUS (tu\u010dn\u00e9 si zadejte dle uv\u00e1\u017een\u00ed, posledn\u00ed <strong>root <\/strong>p\u0159edstavuje heslo u\u017eivatele<strong> martin<\/strong>)<\/p>\n<p>#sqlplus \/ as sysdba<\/p>\n<p>#create user <strong>martin<\/strong> identified by <strong>root<\/strong><\/p>\n<p><a href=\"http:\/\/marwin.e-blog.cz\/?attachment_id=987\" rel=\"attachment wp-att-987\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-987\" alt=\"create_user\" src=\"http:\/\/marwin.e-blog.cz\/marwin.e-blog.cz\/httpdocs\/wp-content\/uploads\/create_user.png\" width=\"859\" height=\"384\" \/><\/a><\/p>\n<p>Nyn\u00ed je \u010das nastavit si SQLDeveloper. viz obr.<\/p>\n<p><a href=\"http:\/\/marwin.e-blog.cz\/?attachment_id=988\" rel=\"attachment wp-att-988\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-988\" alt=\"SQLDeveloper\" src=\"http:\/\/marwin.e-blog.cz\/marwin.e-blog.cz\/httpdocs\/wp-content\/uploads\/SQLDeveloper.png\" width=\"752\" height=\"392\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/marwin.e-blog.cz\/?attachment_id=989\" rel=\"attachment wp-att-989\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-989\" alt=\"SQLDeveloperConnect\" src=\"http:\/\/marwin.e-blog.cz\/marwin.e-blog.cz\/httpdocs\/wp-content\/uploads\/SQLDeveloperConnect.png\" width=\"906\" height=\"695\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Toto je n\u00e1vod jak p\u0159ipojit SQLDeveloper k OracleDB &#8211; Express .(V m\u00e9m p\u0159\u00edpad\u011b b\u011b\u017e\u00ed Oracle DB na Oracle Linuxu, kter\u00fd je virtualizovan\u00fd a b\u011b\u017e\u00ed na stejn\u00e9m \u017eeleze, ze kter\u00e9ho se budu p\u0159ipojovat (notebook) Hyper-V) 1. Je pot\u0159eba m\u00edt z po\u010d\u00edta\u010de\u00a0ze &hellip; <a href=\"https:\/\/svobodma.cz\/?p=976\">Cel\u00fd p\u0159\u00edsp\u011bvek <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-976","post","type-post","status-publish","format-standard","hentry","category-others"],"_links":{"self":[{"href":"https:\/\/svobodma.cz\/index.php?rest_route=\/wp\/v2\/posts\/976","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/svobodma.cz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/svobodma.cz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/svobodma.cz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/svobodma.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=976"}],"version-history":[{"count":16,"href":"https:\/\/svobodma.cz\/index.php?rest_route=\/wp\/v2\/posts\/976\/revisions"}],"predecessor-version":[{"id":981,"href":"https:\/\/svobodma.cz\/index.php?rest_route=\/wp\/v2\/posts\/976\/revisions\/981"}],"wp:attachment":[{"href":"https:\/\/svobodma.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/svobodma.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/svobodma.cz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}