{"id":831,"date":"2017-12-14T12:07:14","date_gmt":"2017-12-14T12:07:14","guid":{"rendered":"https:\/\/pandorafms.com\/library\/?p=831"},"modified":"2017-12-14T12:10:24","modified_gmt":"2017-12-14T12:10:24","slug":"oracle-wsqlplus","status":"publish","type":"post","link":"https:\/\/pandorafms.com\/library\/oracle-wsqlplus\/","title":{"rendered":"Oracle w\/SQLPlus"},"content":{"rendered":"<p class=\"description_pui\">This command is used to make a query to oracle using SQL Plus and a username\/password\/host. Prior you need to define Oracle enviroment variables.<\/p>\n<h2>Module data<\/h2>\n<p>Sample Oracle enviroments variables:\u00a0<\/p>\n<pre>\r\nexport ORACLE_HOME=\/usr\/lib\/oracle\/xe\/app\/oracle\/product\/10.2.0\/server\u00a0\r\nexport ORACLE_SID=XE\u00a0\r\nexport ORACLE_VER=10.2.0\u00a0\r\nexport PATH=$PATH:$ORACLE_HOME\/bin\u00a0<\/pre>\n<p>Sample query:\u00a0<\/p>\n<pre>\r\necho \"SELECT USER_ID FROM DEMO_USERS where USER_NAME = 'ADMIN';\" | \/usr\/lib\/oracle\/xe\/app\/oracle\/product\/10.2.0\/server\/bin\/sqlplus -S -L hr\/hr@localhost | tail -2 | head -1 | awk '{ print $1 }'\u00a0<\/pre>\n<p>Dont miss the final &#8220;;&#8221; at the end of SQL sentence<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This command is used to make a query to oracle using SQL Plus and a username\/password\/host. Prior you need to define Oracle enviroment variables. Module data Sample Oracle enviroments variables:\u00a0 export ORACLE_HOME=\/usr\/lib\/oracle\/xe\/app\/oracle\/product\/10.2.0\/server\u00a0 export ORACLE_SID=XE\u00a0 export ORACLE_VER=10.2.0\u00a0 export PATH=$PATH:$ORACLE_HOME\/bin\u00a0 Sample query:\u00a0 echo &#8220;SELECT USER_ID FROM DEMO_USERS where USER_NAME = &#8216;ADMIN&#8217;;&#8221; | \/usr\/lib\/oracle\/xe\/app\/oracle\/product\/10.2.0\/server\/bin\/sqlplus -S -L hr\/hr@localhost | [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[5,15,23],"tags":[193],"_links":{"self":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/831"}],"collection":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/comments?post=831"}],"version-history":[{"count":0,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/831\/revisions"}],"wp:attachment":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/media?parent=831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/categories?post=831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/tags?post=831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}