{"id":2455,"date":"2013-03-01T13:57:39","date_gmt":"2013-03-01T13:57:39","guid":{"rendered":"http:\/\/enjoyasp.net\/?p=2455"},"modified":"2013-03-01T13:58:37","modified_gmt":"2013-03-01T13:58:37","slug":"%e6%9f%a5%e7%9c%8b%e5%89%a9%e4%bd%99%e6%89%a7%e8%a1%8c%e6%97%b6%e9%97%b4","status":"publish","type":"post","link":"https:\/\/enjoyasp.net\/index.php\/2013\/03\/01\/%e6%9f%a5%e7%9c%8b%e5%89%a9%e4%bd%99%e6%89%a7%e8%a1%8c%e6%97%b6%e9%97%b4\/","title":{"rendered":"\u67e5\u770b\u5269\u4f59\u6267\u884c\u65f6\u95f4"},"content":{"rendered":"<p>\u5728\u521b\u5efa\u7d22\u5f15\uff0c\u6570\u636e\u5e93\u6062\u590d\u7b49\u8017\u65f6\u64cd\u4f5c\u65f6\uff0c\u53ef\u901a\u8fc7\u4ee5\u4e0b\u65b9\u6cd5\u67e5\u770b\u5269\u4f59\u65f6\u95f4<\/p>\n<ol style=\"padding: 0px; margin: 0px 0px 0px 3em; list-style-position: outside; font-family: 'Courier New', Monaco, 'Andale Mono', Courier, mono; font-size: 12px; line-height: 15.59375px; background-color: rgb(255, 255, 255);\">\n<li class=\"li1\" style=\"padding: 0px 5px; margin: 0px; line-height: 16px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(239, 239, 239); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(153, 153, 153);\">\n\t\t<span style=\"padding: 0px; margin: 0px; color: rgb(0, 0, 255);\">SELECT<\/span><\/li>\n<li class=\"li2\" style=\"padding: 0px 5px; margin: 0px; background-color: rgb(249, 249, 249); line-height: 16px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(239, 239, 239); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(153, 153, 153);\">\n\t\t&nbsp; &nbsp; d.<span style=\"padding: 0px; margin: 0px; color: rgb(32, 32, 32);\">PERCENT_COMPLETE<\/span>&nbsp;<span style=\"padding: 0px; margin: 0px; color: rgb(0, 0, 255);\">AS<\/span>&nbsp;<span style=\"padding: 0px; margin: 0px; color: rgb(128, 128, 128);\">[<\/span>%Complete<span style=\"padding: 0px; margin: 0px; color: rgb(128, 128, 128);\">]<\/span>,<\/li>\n<li class=\"li1\" style=\"padding: 0px 5px; margin: 0px; line-height: 16px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(239, 239, 239); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(153, 153, 153);\">\n\t\t&nbsp; &nbsp; d.<span style=\"padding: 0px; margin: 0px; color: rgb(32, 32, 32);\">TOTAL_ELAPSED_TIME<\/span>\/<span style=\"padding: 0px; margin: 0px;\">60000<\/span>&nbsp;<span style=\"padding: 0px; margin: 0px; color: rgb(0, 0, 255);\">AS<\/span>&nbsp;ElapsedTimeMin,<\/li>\n<li class=\"li2\" style=\"padding: 0px 5px; margin: 0px; background-color: rgb(249, 249, 249); line-height: 16px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(239, 239, 239); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(153, 153, 153);\">\n\t\t&nbsp; &nbsp; d.<span style=\"padding: 0px; margin: 0px; color: rgb(32, 32, 32);\">ESTIMATED_COMPLETION_TIME<\/span>\/<span style=\"padding: 0px; margin: 0px;\">60000<\/span>&nbsp; &nbsp;<span style=\"padding: 0px; margin: 0px; color: rgb(0, 0, 255);\">AS<\/span>&nbsp;TimeRemainingMin,<\/li>\n<li class=\"li1\" style=\"padding: 0px 5px; margin: 0px; line-height: 16px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(239, 239, 239); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(153, 153, 153);\">\n\t\t&nbsp; &nbsp; d.<span style=\"padding: 0px; margin: 0px; color: rgb(32, 32, 32);\">TOTAL_ELAPSED_TIME*<\/span><span style=\"padding: 0px; margin: 0px;\">0.00000024<\/span>&nbsp;<span style=\"padding: 0px; margin: 0px; color: rgb(0, 0, 255);\">AS<\/span>&nbsp;ElapsedTimeHours,<\/li>\n<li class=\"li2\" style=\"padding: 0px 5px; margin: 0px; background-color: rgb(249, 249, 249); line-height: 16px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(239, 239, 239); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(153, 153, 153);\">\n\t\t&nbsp; &nbsp; d.<span style=\"padding: 0px; margin: 0px; color: rgb(32, 32, 32);\">ESTIMATED_COMPLETION_TIME*<\/span><span style=\"padding: 0px; margin: 0px;\">0.00000024<\/span>&nbsp;&nbsp;<span style=\"padding: 0px; margin: 0px; color: rgb(0, 0, 255);\">AS<\/span>&nbsp;TimeRemainingHours,<\/li>\n<li class=\"li1\" style=\"padding: 0px 5px; margin: 0px; line-height: 16px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(239, 239, 239); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(153, 153, 153);\">\n\t\t&nbsp; &nbsp; s.<span style=\"padding: 0px; margin: 0px; color: rgb(0, 0, 255);\">text<\/span>&nbsp;<span style=\"padding: 0px; margin: 0px; color: rgb(0, 0, 255);\">AS<\/span>&nbsp;Command<\/li>\n<li class=\"li2\" style=\"padding: 0px 5px; margin: 0px; background-color: rgb(249, 249, 249); line-height: 16px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(239, 239, 239); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(153, 153, 153);\">\n\t\t<span style=\"padding: 0px; margin: 0px; color: rgb(0, 0, 255);\">FROM<\/span>&nbsp; &nbsp;&nbsp;<span style=\"padding: 0px; margin: 0px; color: rgb(0, 175, 0);\">sys<\/span>.<span style=\"padding: 0px; margin: 0px; color: rgb(0, 175, 0);\">dm_exec_requests<\/span>&nbsp;d<\/li>\n<li class=\"li1\" style=\"padding: 0px 5px; margin: 0px; line-height: 16px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(239, 239, 239); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(153, 153, 153);\">\n\t\tCROSS APPLY&nbsp;<span style=\"padding: 0px; margin: 0px; color: rgb(0, 175, 0);\">sys<\/span>.<span style=\"padding: 0px; margin: 0px; color: rgb(0, 175, 0);\">dm_exec_sql_text<\/span><span style=\"padding: 0px; margin: 0px; color: rgb(128, 128, 128);\">(<\/span>d.<span style=\"padding: 0px; margin: 0px; color: rgb(32, 32, 32);\">sql_handle<\/span><span style=\"padding: 0px; margin: 0px; color: rgb(128, 128, 128);\">)<\/span><span style=\"padding: 0px; margin: 0px; color: rgb(0, 0, 255);\">as<\/span>&nbsp;s<\/li>\n<li class=\"li2\" style=\"padding: 0px 5px; margin: 0px; background-color: rgb(249, 249, 249); line-height: 16px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(239, 239, 239); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(153, 153, 153);\">\n\t\t<span style=\"padding: 0px; margin: 0px; color: rgb(0, 0, 255);\">WHERE<\/span>&nbsp;&nbsp;d.<span style=\"padding: 0px; margin: 0px; color: rgb(32, 32, 32);\">COMMAND<\/span>&nbsp;LIKE&nbsp;<span style=\"padding: 0px; margin: 0px; color: rgb(255, 0, 0);\">&#39;RESTORE DATABASE%&#39;<\/span><\/li>\n<li class=\"li1\" style=\"padding: 0px 5px; margin: 0px; line-height: 16px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(239, 239, 239); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(153, 153, 153);\">\n\t\t<span style=\"padding: 0px; margin: 0px; color: rgb(0, 0, 255);\">ORDER<\/span>&nbsp; &nbsp;<span style=\"padding: 0px; margin: 0px; color: rgb(0, 0, 255);\">BY<\/span>&nbsp;<span style=\"padding: 0px; margin: 0px;\">2<\/span>&nbsp;<span style=\"padding: 0px; margin: 0px; color: rgb(0, 0, 255);\">desc<\/span>,&nbsp;<span style=\"padding: 0px; margin: 0px;\">3<\/span>&nbsp;<span style=\"padding: 0px; margin: 0px; color: rgb(0, 0, 255);\">DESC&nbsp;&nbsp;&nbsp;&nbsp;<\/span><\/li>\n<li class=\"li1\" style=\"padding: 0px 5px; margin: 0px; line-height: 16px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(239, 239, 239); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(153, 153, 153);\">\n<p>\n\t\t\t\u53ef\u7edf\u8ba1\u4e3a\u4ee5\u4e0b\u547d\u4ee4\u5b8c\u6210\u7684\u5de5\u4f5c\u7684\u767e\u5206\u6bd4\uff1a<\/p>\n<ul>\n<li>\n\t\t\t\tALTER INDEX REORGANIZE<br \/>\n\t\t\t\t&nbsp;<\/li>\n<li>\n\t\t\t\tAUTO_SHRINK \u9009\u9879\uff08\u5e26 ALTER DATABASE\uff09<br \/>\n\t\t\t\t&nbsp;<\/li>\n<li>\n\t\t\t\tBACKUP DATABASE<br \/>\n\t\t\t\t&nbsp;<\/li>\n<li>\n\t\t\t\tCREATE INDEX<br \/>\n\t\t\t\t&nbsp;<\/li>\n<li>\n\t\t\t\tDBCC CHECKDB<br \/>\n\t\t\t\t&nbsp;<\/li>\n<li>\n\t\t\t\tDBCC CHECKFILEGROUP<br \/>\n\t\t\t\t&nbsp;<\/li>\n<li>\n\t\t\t\tDBCC CHECKTABLE<br \/>\n\t\t\t\t&nbsp;<\/li>\n<li>\n\t\t\t\tDBCC INDEXDEFRAG<br \/>\n\t\t\t\t&nbsp;<\/li>\n<li>\n\t\t\t\tDBCC SHRINKDATABASE<br \/>\n\t\t\t\t&nbsp;<\/li>\n<li>\n\t\t\t\tDBCC SHRINKFILE<br \/>\n\t\t\t\t&nbsp;<\/li>\n<li>\n\t\t\t\tKILL (Transact-SQL)<br \/>\n\t\t\t\t&nbsp;<\/li>\n<li>\n\t\t\t\tRESTORE DATABASE,<br \/>\n\t\t\t\t&nbsp;<\/li>\n<li>\n\t\t\t\tUPDATE STATISTICS.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u521b\u5efa\u7d22\u5f15\uff0c\u6570\u636e\u5e93\u6062\u590d\u7b49\u8017\u65f6\u64cd\u4f5c\u65f6\uff0c\u53ef\u901a\u8fc7\u4ee5\u4e0b\u65b9\u6cd5\u67e5\u770b\u5269\u4f59\u65f6\u95f4 SELECT &nbsp; &nbsp; d. [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-2455","post","type-post","status-publish","format-standard","hentry","category-sql-server"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/posts\/2455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/comments?post=2455"}],"version-history":[{"count":0,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/posts\/2455\/revisions"}],"wp:attachment":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/media?parent=2455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/categories?post=2455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/tags?post=2455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}