{"id":1900,"date":"2021-10-26T17:56:28","date_gmt":"2021-10-26T17:56:28","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=1900"},"modified":"2021-10-26T17:58:34","modified_gmt":"2021-10-26T17:58:34","slug":"how-to-connect-to-dbaccess-in-ksh-shell","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/unix\/how-to-connect-to-dbaccess-in-ksh-shell\/8875.html","title":{"rendered":"How To Connect To Dbaccess In Ksh Shell"},"content":{"rendered":"<p>Hi,<\/p>\n<p>I&#8217;m starting with ksh and I&#8217;m a bit lost.<br \/>\nI&#8217;m working on an ERP that runs on Oracle or Informix.<br \/>\nI often need to update these databases with a lot of sql scripts.<\/p>\n<p>I wrote a small shell that concatenate these files into a single script that connects to the Oracle database that I determine, and then run the script.<\/p>\n<p>Here the shell (which can be improved, I&#8217;m sure):<\/p>\n<p>echo &#8216;User:&#8217;<br \/>\nread USER<br \/>\necho &#8216;Pass:&#8217;<br \/>\nread PASS<br \/>\necho &#8216;DATABASE SID:&#8217;<br \/>\nread SID<br \/>\nLIST=`ls -1 *ora.sql`<br \/>\nfor i in $LIST<br \/>\ndo<br \/>\necho $i<br \/>\ncat $LIST &gt;oracle.sql<br \/>\ndone<\/p>\n<p>sqlplus $USER\/$PASS@$SID @oracle.sql<\/p>\n<p>I&#8217;d like to do the same thing to update my Informix database, but I do not know what commands to use to log in dbaccess and run the script.<\/p>\n<p>If anyone can help me, it would be nice.<\/p>\n<p>Thank you,<br \/>\nWilfried.<\/p>\n<p>And sorry for my English.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":0},"question-category":[64],"question_tags":[],"class_list":["post-1900","question","type-question","status-publish","hentry","question-category-unix"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/1900","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=1900"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=1900"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=1900"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=1900"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}