{"id":1067,"date":"2011-04-21T20:30:26","date_gmt":"2011-04-22T01:30:26","guid":{"rendered":"http:\/\/appcrawler.com\/wordpress\/?p=1067"},"modified":"2011-07-06T18:21:23","modified_gmt":"2011-07-06T23:21:23","slug":"mysql-mysqlbinlog-vs-oracle-logmnr","status":"publish","type":"post","link":"http:\/\/appcrawler.com\/wordpress\/2011\/04\/21\/mysql-mysqlbinlog-vs-oracle-logmnr\/","title":{"rendered":"MySQL mysqlbinlog vs. Oracle logmnr"},"content":{"rendered":"<p>MySQL provides the mysqlbinlog utility to parse binary transaction logs for any number of purposes which may include replication, auditing, or troubleshooting.  Oracle also provides this functionality through a PL\/SQL package called dbms_logmnr, more commonly referred to as &#8220;Log Miner&#8221;.<\/p>\n<p>MySQL is very convenient in that all you need to enter at the command line is&#8230;<\/p>\n<p>mysqlbinlog log_file_name<\/p>\n<p>With Oracle, you must do some more &#8220;work&#8221;, but it is arguably more flexible since it is an API that you can call from any number of front end applications.  See the <a href=http:\/\/appcrawler.com\/wordpress\/2010\/12\/10\/running-log-miner-from-python\/ target=\"_blank\">article on using python for an example.<\/a>  It can also be run from a remote server to aid in flexibility.<\/p>\n<pre lang=\"sql\" line=\"1\">\r\nbegin\r\n  dbms_logmnr.add_logfile(logfilename => '&log_file_name');\r\n  dbms_logmnr.start_logmnr(options => dbms_logmnr.dict_from_online_catalog + dbms_logmnr.no_rowid_in_stmt);\r\n  for cur in (select *\r\n                from v$logmnr_contents) loop\r\n    --do something with data\r\n  end loop;\r\nend;\r\n\/\r\n<\/pre>\n<p>Each has its own merits, and each are immensely useful.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQL provides the mysqlbinlog utility to parse binary transaction logs for any number of purposes which may include replication, auditing, or troubleshooting. Oracle also provides this functionality through a PL\/SQL package called dbms_logmnr, more commonly referred to as &#8220;Log Miner&#8221;.&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/appcrawler.com\/wordpress\/2011\/04\/21\/mysql-mysqlbinlog-vs-oracle-logmnr\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[19,22,29],"tags":[],"_links":{"self":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/1067"}],"collection":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1067"}],"version-history":[{"count":15,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/1067\/revisions"}],"predecessor-version":[{"id":1384,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/1067\/revisions\/1384"}],"wp:attachment":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1067"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}