{"id":155,"date":"2009-07-11T14:19:19","date_gmt":"2009-07-11T05:19:19","guid":{"rendered":"http:\/\/www.typea.info\/blog\/index.php\/2009\/07\/11\/apachesqlloaderoracle\/"},"modified":"2009-07-11T14:19:19","modified_gmt":"2009-07-11T05:19:19","slug":"apachesqlloaderoracle","status":"publish","type":"post","link":"https:\/\/www.typea.info\/blog\/index.php\/2009\/07\/11\/apachesqlloaderoracle\/","title":{"rendered":"Apache\u306e\u30a2\u30af\u30bb\u30b9\u30ed\u30b0\u3092SQL*Loader\u3067Oracle\u306b\u30ed\u30fc\u30c9"},"content":{"rendered":"<p>\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u7b49\u3092Oracle\u3092\u4f7f\u3063\u3066\u9069\u5f53\u306b\u5206\u6790\u3057\u305f\u3044\u3068\u304d\u306a\u3093\u304b\u306b\u4fbf\u5229\u3063\u307d\u3044\u306e\u3067\u30e1\u30e2\u3002<\/p>\n<p>\u9069\u5f53\u306b\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210(\u3061\u3083\u3093\u3068\u3057\u305f\u3044\u5834\u5408\u306f\u4ed5\u69d8\u3092\u8abf\u3079\u308b)<\/p>\n<pre class=\"prettyprint linenums\">SQL&gt; create table apache_access_log (\r\n  2    ip_address     char(20)     ,\r\n  3    user_inf       char(20)     ,\r\n  4    user_id        char(20)     ,\r\n  5    req_date       char(60)     ,\r\n  6    request        varchar2(512),\r\n  7    status_cd      char(10)     ,\r\n  8    res_size       char(10)     ,\r\n  9    referer        varchar2(256),\r\n 10    user_agent     varchar2(256)\r\n 11  )\r\n 12 \/<\/pre>\n<p>SQL*Loader \u5236\u5fa1\u30d5\u30a1\u30a4\u30eb(apache_access_log.ctl)\u306e\u4f5c\u6210<\/p>\n<pre class=\"prettyprint linenums\">-- appache access logfile load sample control file\r\nload data                            -- \u65b0\u3057\u304f\u30c7\u30fc\u30bf\u30ed\u30fc\u30c9\u304c\u958b\u59cb\u3055\u308c\u308b\r\ninfile  'access_log'                 -- \u30ed\u30fc\u30c9\u3059\u308b\u30c7\u30fc\u30bf\u304c\u5165\u3063\u3066\u3044\u308b\u30d5\u30a1\u30a4\u30eb\u540d\r\nbadfile 'access_log.bad'             -- \u62d2\u5426\u30ec\u30b3\u30fc\u30c9\u304c\u66f8\u304d\u8fbc\u307e\u308c\u308b\u30d5\u30a1\u30a4\u30eb\u540d\r\ndiscardfile 'access_log.dsc'         -- \u5ec3\u68c4\u30ec\u30b3\u30fc\u30c9\u304c\u66f8\u304d\u8fbc\u307e\u308c\u308b\u30d5\u30a1\u30a4\u30eb\u540d\r\ninsert                               -- \u3059\u3067\u306b\u30c7\u30fc\u30bf\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306e\u30aa\u30d7\u30b7\u30e7\u30f3 APPEND,REPLACE,TRUNCATE\r\ninto table exam.apache_access_log    -- \r\n(  ip_address   position(*) char terminated by whitespace                 \r\n , user_inf     position(*) char terminated by whitespace\r\n , user_id      position(*) char terminated by whitespace  \r\n , req_date     position(*) char enclosed by '[' and ']'         \r\n , request      position(*) char enclosed by '&quot;' and '&quot;'\r\n , status_cd    position(*) char terminated by whitespace\r\n , res_size     position(*) char terminated by whitespace\r\n , referer      position(*) char enclosed by '&quot;' and '&quot;'\r\n , user_agent   position(*) char enclosed by '&quot;' and '&quot;'\r\n)<\/pre>\n<p>\u5b9f\u884c<\/p>\n<pre class=\"prettyprint linenums\">$sqlldr userid\/passwd apache_access_log.ctl \r\n\r\nSQL*Loader: Release 10.2.0.1.0 - Production on Sat Jul 11 22:05:04 2009 \r\n\r\nCopyright (c) 1982, 2005, Oracle.  All rights reserved.\r\n\r\nCommit point reached - logical record count 64\r\nCommit point reached - logical record count 128\r\n                :<\/pre>\n<p>\u53d6\u308a\u8fbc\u307e\u308c\u305f<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/ApacheSQLLoaderOracle_C4F7\/ora_sqlldr02.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" border=\"0\" alt=\"ora_sqlldr02\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/ApacheSQLLoaderOracle_C4F7\/ora_sqlldr02_thumb.jpg\" width=\"514\" height=\"274\" \/><\/a> <\/p>\n<p>\u3082\u3046\u5c11\u3057\u7d30\u304b\u3044\u30e1\u30e2 <a title=\"\/tips\/wiki.cgi?page=Oracle+Database10g+SQL*Loader\" href=\"\/tips\/wiki.cgi?page=Oracle+Database10g+SQL*Loader\">\/tips\/wiki.cgi?page=Oracle+Database10g+SQL*Loader<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u7b49\u3092Oracle\u3092\u4f7f\u3063\u3066\u9069\u5f53\u306b\u5206\u6790\u3057\u305f\u3044\u3068\u304d\u306a\u3093\u304b\u306b\u4fbf\u5229\u3063\u307d\u3044\u306e\u3067\u30e1\u30e2\u3002 \u9069\u5f53\u306b\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210(\u3061\u3083\u3093\u3068\u3057\u305f\u3044\u5834\u5408\u306f\u4ed5\u69d8\u3092\u8abf\u3079\u308b) SQL&gt; create table apache_access_log [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[7,8],"tags":[],"class_list":["post-155","post","type-post","status-publish","format-standard","hentry","category-oracle","category-server"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=155"}],"version-history":[{"count":0,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/155\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}