{"id":713,"date":"2024-11-26T16:46:46","date_gmt":"2024-11-26T09:46:46","guid":{"rendered":"https:\/\/tisdoc.com\/?p=713"},"modified":"2024-11-26T16:46:46","modified_gmt":"2024-11-26T09:46:46","slug":"sua-loi-database-bi-suspect","status":"publish","type":"post","link":"https:\/\/tisdoc.com\/?p=713","title":{"rendered":"S\u1eeda l\u1ed7i database b\u1ecb (suspect)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">&#8212; sp_resetstatus t\u1eaft c\u1edd \u201csuspect\u201dtr\u00ean c\u01a1 s\u1edf d\u1eef li\u1ec7u<\/p>\n\n\n\n<pre class=\"has-copy-button language-javascript\" style=\"position: relative;\" class=\"wp-block-code\"><code>EXEC sp_resetstatus &#91;TIS.CPK_PROFILER]<\/code><button class=\"copy-button\"><i class=\"fa-regular fa-copy\"><\/i><\/button><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">&#8211;\u0110\u00e1nh d\u1ea5u c\u01a1 s\u1edf d\u1eef li\u1ec7u l\u00e0 READ_ONLY,<br>&#8211;T\u1eaft ghi Log v\u00e0 ch\u1ec9 gi\u1edbi h\u1ea1n quy\u1ec1n truy c\u1eadp cho quy\u1ec1n x\u1eed l\u00fd h\u1ec7 th\u1ed1ng sysadmin<\/p>\n\n\n\n<pre class=\"has-copy-button language-javascript\" style=\"position: relative;\" class=\"wp-block-code\"><code>ALTER DATABASE &#91;TIS.CPK_PROFILER] SET EMERGENCY<\/code><button class=\"copy-button\"><i class=\"fa-regular fa-copy\"><\/i><\/button><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">&#8211;Ki\u1ec3m tra t\u00ednh logic v\u00e0 v\u1eadt l\u00fd c\u1ee7a t\u1ea5t c\u1ea3 c\u00e1c \u0111\u1ed1i t\u01b0\u1ee3ng trong c\u01a1 s\u1edf d\u1eef li\u1ec7u c\u1ea7n x\u1eed l\u00fd<\/p>\n\n\n\n<pre class=\"has-copy-button language-javascript\" style=\"position: relative;\" class=\"wp-block-code\"><code>DBCC checkdb(&#91;TIS.CPK_PROFILER])<\/code><button class=\"copy-button\"><i class=\"fa-regular fa-copy\"><\/i><\/button><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">&#8211;C\u00e2u truy v\u1ea5n n\u00e0y s\u1ebd x\u1eed l\u00fd v\u00e0 kh\u00f4i ph\u1ee5c c\u00e1c giao d\u1ecbch \u0111ang ho\u1ea1t \u0111\u1ed9ng tr\u00ean database.<br>&#8211;\u0110\u01b0a CSDL SQL \u1edf ch\u1ebf \u0111\u1ed9 m\u1ed9t ng\u01b0\u1eddi s\u1eed d\u1ee5ng.<\/p>\n\n\n\n<pre class=\"has-copy-button language-javascript\" style=\"position: relative;\" class=\"wp-block-code\"><code>ALTER DATABASE &#91;TIS.CPK_PROFILER] SET SINGLE_USER WITH ROLLBACK IMMEDIATE<\/code><button class=\"copy-button\"><i class=\"fa-regular fa-copy\"><\/i><\/button><\/pre>\n\n\n\n<pre class=\"has-copy-button language-javascript\" style=\"position: relative;\" class=\"wp-block-code\"><code>DBCC CheckDB (&#91;TIS.CPK_PROFILER], REPAIR_ALLOW_DATA_LOSS)<\/code><button class=\"copy-button\"><i class=\"fa-regular fa-copy\"><\/i><\/button><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">&#8211;Thi\u1ebft l\u1eadp l\u1ea1i CSDL cho v\u1ec1 tr\u1ea1ng th\u00e1i ban \u0111\u1ea7u, cho ph\u00e9p login l\u1ea1i b\u00ecnh th\u01b0\u1eddng.<\/p>\n\n\n\n<pre class=\"has-copy-button language-javascript\" style=\"position: relative;\" class=\"wp-block-code\"><code>ALTER DATABASE &#91;TIS.CPK_PROFILER] SET MULTI_USER<\/code><button class=\"copy-button\"><i class=\"fa-regular fa-copy\"><\/i><\/button><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&#8212; sp_resetstatus t\u1eaft c\u1edd \u201csuspect\u201dtr\u00ean c\u01a1 s\u1edf d\u1eef li\u1ec7u &#8211;\u0110\u00e1nh d\u1ea5u c\u01a1 s\u1edf d\u1eef li\u1ec7u l\u00e0 READ_ONLY,&#8211;T\u1eaft ghi Log v\u00e0 ch\u1ec9 gi\u1edbi h\u1ea1n quy\u1ec1n truy c\u1eadp cho quy\u1ec1n x\u1eed l\u00fd h\u1ec7 th\u1ed1ng sysadmin &#8211;Ki\u1ec3m tra t\u00ednh logic v\u00e0 v\u1eadt l\u00fd c\u1ee7a t\u1ea5t c\u1ea3 c\u00e1c \u0111\u1ed1i t\u01b0\u1ee3ng trong c\u01a1 s\u1edf d\u1eef li\u1ec7u c\u1ea7n x\u1eed l\u00fd &#8211;C\u00e2u [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,7],"tags":[],"class_list":["post-713","post","type-post","status-publish","format-standard","hentry","category-faq","category-sql","no-post-thumbnail"],"_links":{"self":[{"href":"https:\/\/tisdoc.com\/index.php?rest_route=\/wp\/v2\/posts\/713","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tisdoc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tisdoc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tisdoc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tisdoc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=713"}],"version-history":[{"count":1,"href":"https:\/\/tisdoc.com\/index.php?rest_route=\/wp\/v2\/posts\/713\/revisions"}],"predecessor-version":[{"id":715,"href":"https:\/\/tisdoc.com\/index.php?rest_route=\/wp\/v2\/posts\/713\/revisions\/715"}],"wp:attachment":[{"href":"https:\/\/tisdoc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tisdoc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tisdoc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}