{"id":3304,"date":"2020-04-26T01:43:10","date_gmt":"2020-04-25T16:43:10","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=3304"},"modified":"2023-06-17T07:43:05","modified_gmt":"2023-06-16T22:43:05","slug":"db2%ef%bc%88v11-5%ef%bc%89%e3%81%a7%e3%82%aa%e3%83%b3%e3%83%a9%e3%82%a4%e3%83%b3%e3%83%90%e3%83%83%e3%82%af%e3%82%a2%e3%83%83%e3%83%97%e3%81%8b%e3%82%89%e3%83%87%e3%83%bc%e3%82%bf%e3%83%99%e3%83%bc","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/3304","title":{"rendered":"Db2\uff08V11.5\uff09\u3067\u30aa\u30f3\u30e9\u30a4\u30f3\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u304b\u3089\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u30ea\u30b9\u30c8\u30a2\u3059\u308b\uff01"},"content":{"rendered":"<p>Db2\uff08V11.5\uff09\u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u53d6\u5f97\u3057\u3066\u3044\u308b\u74b0\u5883\u306b\u304a\u3044\u3066\u3001DB\u306e\u30ea\u30b9\u30c8\u30a2\u3092\u884c\u3044\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>\u4f7f\u7528\u74b0\u5883<\/h2>\n<ul>\n<li>CentOS 8.1 (Server with GUI)<\/li>\n<li>Db2 V11.5<\/li>\n<\/ul>\n<h2>\u30ea\u30b9\u30c8\u30a2\u306b\u6700\u4f4e\u9650\u5fc5\u8981\u306a\u30a2\u30fc\u30ab\u30a4\u30d6\u30ed\u30b0\u306e\u78ba\u8a8d<\/h2>\n<p>\u30aa\u30f3\u30e9\u30a4\u30f3\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u304b\u3089\u306e\u30ea\u30b9\u30c8\u30a2\u306b\u3001\u6700\u4f4e\u9650\u5fc5\u8981\u3068\u306a\u308b\u30a2\u30fc\u30ab\u30a4\u30d6\u30ed\u30b0\u304c\u5b58\u5728\u3059\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,43]; title: ; notranslate\" title=\"\">\r\n$ db2 list history backup all for db db01\r\n\r\n                    List History File for db01\r\n\r\nNumber of matching file entries = 2\r\n\r\n\r\n Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log  Backup ID\r\n -- --- ------------------ ---- --- ------------ ------------ --------------\r\n  B  D  20200426000918001   N    D  S0000008.LOG S0000008.LOG                \r\n ----------------------------------------------------------------------------\r\n  Contains 3 tablespace(s):\r\n\r\n 00001 SYSCATSPACE\r\n 00002 USERSPACE1\r\n 00003 SYSTOOLSPACE\r\n ----------------------------------------------------------------------------\r\n    Comment: DB2 BACKUP DB01 ONLINE\r\n Start Time: 20200426000918\r\n   End Time: 20200426000922\r\n     Status: A\r\n ----------------------------------------------------------------------------\r\n  EID: 21 Location: \/home\/db2inst1\/db2backups\r\n\r\n\r\n Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log  Backup ID\r\n -- --- ------------------ ---- --- ------------ ------------ --------------\r\n  B  D  20200426001741001   N    D  S0000009.LOG S0000009.LOG                \r\n ----------------------------------------------------------------------------\r\n  Contains 3 tablespace(s):\r\n\r\n 00001 SYSCATSPACE\r\n 00002 USERSPACE1\r\n 00003 SYSTOOLSPACE\r\n ----------------------------------------------------------------------------\r\n    Comment: DB2 BACKUP DB01 ONLINE\r\n Start Time: 20200426001741\r\n   End Time: 20200426001745\r\n     Status: A\r\n ----------------------------------------------------------------------------\r\n  EID: 23 Location: \/home\/db2inst1\/db2backups\r\n\r\n$ ls -l \/home\/db2inst1\/db2arclogs\/db2inst1\/DB01\/NODE0000\/LOGSTREAM0000\/C0000000\r\ntotal 228\r\n-rw-r-----. 1 db2inst1 db2iadm1  12288 Apr 26 00:09 S0000008.LOG\r\n-rw-r-----. 1 db2inst1 db2iadm1  12288 Apr 26 00:17 S0000009.LOG\r\n-rw-r-----. 1 db2inst1 db2iadm1 208896 Apr 26 01:16 S0000010.LOG\r\n<\/pre>\n<h2>\u30aa\u30f3\u30e9\u30a4\u30f3\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u304b\u3089\u306e\u30ea\u30b9\u30c8\u30a2<\/h2>\n<p>\u30aa\u30f3\u30e9\u30a4\u30f3\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u304b\u3089DB\u3092\u30ea\u30b9\u30c8\u30a2\u3057\u307e\u3059\u3002\u4e16\u4ee3\u7ba1\u7406\u3055\u308c\u3066\u3044\u308b\u3069\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u304b\u3089\u3082\u5fa9\u65e7\u3067\u304d\u308b\u306e\u3067\u3001\u300ctaken at\u300d\u3067\u5bfe\u8c61\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u30ea\u30b9\u30c8\u30a2\u5f8c\u3001DB\u306f\u30ed\u30fc\u30eb\u30d5\u30a9\u30fc\u30ef\u30fc\u30c9\u30da\u30f3\u30c7\u30a3\u30f3\u30b0\u306e\u72b6\u614b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,3,8,10,15]; title: ; notranslate\" title=\"\">\r\n$ db2 deactivate db db01\r\nDB20000I  The DEACTIVATE DATABASE command completed successfully.\r\n$ ls -l $HOME\/db2backups\r\ntotal 53128\r\n-rw-------. 1 db2inst1 db2iadm1 27201536 Apr 26 00:09 DB01.0.db2inst1.DBPART000.20200426000918.001\r\n-rw-------. 1 db2inst1 db2iadm1 27201536 Apr 26 00:17 DB01.0.db2inst1.DBPART000.20200426001741.001\r\ndrwxr-xr-x. 2 db2inst1 db2iadm1       58 Apr 25 23:14 tmp\r\n$ db2 restore db db01 from $HOME\/db2backups taken at 20200426000918\r\nSQL2539W  The specified name of the backup image to restore is the same as the \r\nname of the target database.  Restoring to an existing database that is the \r\nsame as the backup image database will cause the current database to be \r\noverwritten by the backup version.\r\nDo you want to continue ? (y\/n) y\r\nDB20000I  The RESTORE DATABASE command completed successfully.\r\n$ db2 get db cfg for db01 | grep -i rollforward\r\n Rollforward pending                                     = DATABASE\r\n<\/pre>\n<h2>\u30ed\u30fc\u30eb\u30d5\u30a9\u30fc\u30ef\u30fc\u30c9\u306e\u5b9f\u65bd\uff08\u6700\u65b0\u306e\u72b6\u614b\u307e\u3067\u56de\u5fa9\uff09<\/h2>\n<p>\u30ed\u30fc\u30eb\u30d5\u30a9\u30fc\u30ef\u30fc\u30c9\u3092\u5b9f\u65bd\u3057\u3066\u6700\u65b0\u306e\u72b6\u614b\u307e\u3067\u56de\u5fa9\u3055\u305b\u3066\u3001\u30ed\u30fc\u30eb\u30d5\u30a9\u30fc\u30ef\u30fc\u30c9\u30da\u30f3\u30c7\u30a3\u30f3\u30b0\u306e\u72b6\u614b\u3092\u89e3\u9664\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ db2 rollforward db db01 to end of logs and stop\r\n\r\n                                 Rollforward Status\r\n\r\n Input database alias                   = db01\r\n Number of members have returned status = 1\r\n\r\n Member ID                              = 0\r\n Rollforward status                     = not pending\r\n Next log file to be read               =\r\n Log files processed                    = S0000008.LOG - S0000009.LOG\r\n Last committed transaction             = 2020-04-25-15.43.02.000000 UTC\r\n\r\nDB20000I  The ROLLFORWARD command completed successfully.\r\n<\/pre>\n<h2>\u6700\u65b0\u306e\u72b6\u614b\u4ee5\u5916\u306e\u6642\u70b9\u3078\u306e\u30ea\u30ab\u30d0\u30ea\u65b9\u6cd5<\/h2>\n<p>\u623b\u3057\u305f\u3044DB\u306e\u6642\u70b9\u306b\u3088\u3063\u3066\u3001\u4ee5\u4e0b\u306e\u30ea\u30b9\u30c8\u30a2\u30b3\u30de\u30f3\u30c9\u3082\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u30ed\u30fc\u30eb\u30d5\u30a9\u30fc\u30ef\u30fc\u30c9\u306e\u5b9f\u65bd\uff08\u6307\u5b9a\u6642\u9593\u307e\u3067\uff09<\/h3>\n<p>\u6307\u5b9a\u6642\u9593\uff08yyyy-mm-dd-hh.mm.ss\uff09\u307e\u3067\u306e\u30ea\u30ab\u30d0\u30ea\u304c\u53ef\u80fd\u3067\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u3042\u308b\u6642\u70b9\u306b\u623b\u3057\u305f\u3044\u6642\u306b\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,2]; title: ; notranslate\" title=\"\">\r\n$ db2 rollforward db db01 to yyyy-mm-dd-hh.mm.ss using local time\r\n$ db2 rollforward db db01 stop\r\n<\/pre>\n<h3>\u30ed\u30fc\u30eb\u30d5\u30a9\u30fc\u30ef\u30fc\u30c9\u306e\u5b9f\u65bd\uff08\u6700\u5c0f\u56de\u5fa9\u6642\u9593\u307e\u3067\uff09<\/h3>\n<p>DB\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u53d6\u5f97\u3057\u305f\u76f4\u5f8c\u306e\u72b6\u614b\u306b\u623b\u3057\u305f\u3044\u5834\u5408\u306b\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u304c\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,2]; title: ; notranslate\" title=\"\">\r\n$ db2 rollforward db db01 to end of backup\r\n$ db2 rollforward db db01 stop\r\n<\/pre>\n<h2>HADR\u74b0\u5883\u306e\u5834\u5408\uff08\u30d7\u30e9\u30a4\u30de\u30ea\u969c\u5bb3\u3067\u30d7\u30e9\u30a4\u30de\u30ea\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u30ea\u30b9\u30c8\u30a2\uff09<\/h2>\n<p>HADR\u74b0\u5883\u306e\u5834\u5408\u3001\u6700\u65b0\u306e\u72b6\u614b\u307e\u3067\u623b\u3059\u5834\u5408\u306f\u3001\u518d\u63a5\u7d9a\u3067\u304d\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u518d\u63a5\u7d9a\u304c\u3067\u304d\u306a\u3044\u5834\u5408\u306f\u30b9\u30bf\u30f3\u30d0\u30a4\u5074\u3067\u3082DB\u306e\u30ea\u30b9\u30c8\u30a2\u3092\u884c\u3063\u3066\u304b\u3089HADR\u306e\u63a5\u7d9a\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<h2>HADR\u74b0\u5883\u306e\u5834\u5408\uff08\u30d7\u30e9\u30a4\u30de\u30ea\u969c\u5bb3\u3067\u30b9\u30bf\u30f3\u30d0\u30a4\u306eDB\u3092\u30ea\u30b9\u30c8\u30a2\uff09<\/h2>\n<p>HADR\u74b0\u5883\u306e\u5834\u5408\u3001\u30d7\u30e9\u30a4\u30de\u30ea\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u304c\u4f7f\u7528\u3067\u304d\u306a\u3044\u5834\u5408\u3067\u3082\u3001\u30b9\u30bf\u30f3\u30d0\u30a4\u5074\u306eDB\u3092\u300cTAKE OVER BY FORCE\u300d\u3067\u30d7\u30e9\u30a4\u30de\u30ea\u5207\u308a\u66ff\u3048\u3001\u672c\u6765\u306e\u30d7\u30e9\u30a4\u30de\u30ea\u5074\u306b\u30b9\u30bf\u30f3\u30d0\u30a4\u5074\u306eDB\u30ea\u30b9\u30c8\u30a2\u3057\u3066HADR\u63a5\u7d9a\u5f8c\u3001\u901a\u5e38\u306eTAKEOVER\u3067\u30d7\u30e9\u30a4\u30de\u30ea\u3068\u30b9\u30bf\u30f3\u30d0\u30a4\u3092\u5207\u308a\u66ff\u3048\u3066\u5fa9\u65e7\u3055\u305b\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>DB\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u3057\u3063\u304b\u308a\u7ba1\u7406\u3055\u308c\u305f\u72b6\u614b\u3067\u53d6\u5f97\u3067\u304d\u3066\u3044\u308c\u3070\u3001DB\u306e\u30ea\u30b9\u30c8\u30a2\u306f\u6bd4\u8f03\u7684\u5bb9\u6613\u306b\u5b9f\u65bd\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u53c2\u8003\u60c5\u5831<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.ibm.com\/docs\/en\/db2\" target=\"_blank\" rel=\"noopener\">IBM Db2 documentation<\/a><\/li>\n<\/ul>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/4286\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Db2\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2022\/12\/eyecatch_db2_02-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Db2\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01<\/div><div class=\"substr\">Db2\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304b\u3089\u6d3b\u7528\u306b\u95a2\u3059\u308b\u8a18\u4e8b\u306e\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n<h2>Db2\u66f8\u7c4d\uff08Amazon\uff09<\/h2>\n<h3>\u5373\u6226\u529b\u306eDB2\u7ba1\u7406\u8853\u3000\uff5e\u4ed5\u7d44\u307f\u304b\u3089\u308f\u304b\u308b\u52b9\u7387\u7684\u7ba1\u7406\u306e\u30ce\u30a6\u30cf\u30a6<\/h3>\n<p><iframe style=\"width: 120px; height: 240px;\" sandbox=\"allow-popups allow-scripts allow-modals allow-forms allow-same-origin\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&amp;bc1=000000&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=infotecr-22&amp;language=ja_JP&amp;o=9&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=as_ss_li_til&amp;asins=B07FC6JDJF&amp;linkId=78a998dac5b175577ad0fd2f81956839\"><\/iframe><\/p>\n<h3>DB2 10 \u30a8\u30d0\u30ea\u30e5\u30a8\u30fc\u30b7\u30e7\u30f3\u30fb\u30ac\u30a4\u30c9\u30d6\u30c3\u30af<\/h3>\n<p><iframe style=\"width: 120px; height: 240px;\" sandbox=\"allow-popups allow-scripts allow-modals allow-forms allow-same-origin\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&amp;bc1=000000&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=infotecr-22&amp;language=ja_JP&amp;o=9&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=as_ss_li_til&amp;asins=479813189X&amp;linkId=f11cfb121245f63214f653b5812fa0cb\"><\/iframe><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Db2\uff08V11.5\uff09\u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u53d6\u5f97\u3057\u3066\u3044\u308b\u74b0\u5883\u306b\u304a\u3044\u3066\u3001DB\u306e\u30ea\u30b9\u30c8\u30a2\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":6945,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[106],"tags":[522,480,523,511],"class_list":["post-3304","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-db2","tag-db","tag-db2","tag-523","tag-511"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/3304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=3304"}],"version-history":[{"count":1,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/3304\/revisions"}],"predecessor-version":[{"id":10349,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/3304\/revisions\/10349"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/6945"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=3304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=3304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=3304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}