{"id":1302,"date":"2016-03-15T08:53:23","date_gmt":"2016-03-15T11:53:23","guid":{"rendered":"http:\/\/www.franklinjr.com\/blog\/?p=1302"},"modified":"2016-03-15T08:53:23","modified_gmt":"2016-03-15T11:53:23","slug":"limpar-banco-tempdb-do-sql-server","status":"publish","type":"post","link":"https:\/\/www.franklinjr.com\/blog\/index.php\/2016\/03\/15\/limpar-banco-tempdb-do-sql-server\/","title":{"rendered":"Limpar banco tempdb do sql server"},"content":{"rendered":"<p>O banco tempdb estava consumindo um espa\u00e7o absurdo do sql server. Pesquisando achei a seguinte solu\u00e7\u00e3o.<\/p>\n<pre lang=\"tsql\" >\r\n-- write everything from your buffers to the disc!\r\nCHECKPOINT; \r\nGO\r\n-- Clean all buffers and caches\r\nDBCC DROPCLEANBUFFERS; \r\nDBCC FREEPROCCACHE;\r\nDBCC FREESYSTEMCACHE('ALL');\r\nDBCC FREESESSIONCACHE;\r\nGO\r\n-- Clean tempdb\r\nUSE [tempdb]\r\nGO\r\nDBCC SHRINKFILE (N'tempdev' , 0, TRUNCATEONLY)\r\nGO\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>O banco tempdb estava consumindo um espa\u00e7o absurdo do sql server. Pesquisando achei a seguinte solu\u00e7\u00e3o. &#8212; write everything from your buffers to the disc! CHECKPOINT; GO &#8212; Clean all buffers and caches DBCC DROPCLEANBUFFERS; DBCC FREEPROCCACHE; DBCC FREESYSTEMCACHE(&#8216;ALL&#8217;); DBCC FREESESSIONCACHE; GO &#8212; Clean tempdb USE [tempdb] GO DBCC SHRINKFILE (N&#8217;tempdev&#8217; , 0, TRUNCATEONLY) GO<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[506,441],"tags":[475,430,548],"class_list":["post-1302","post","type-post","status-publish","format-standard","hentry","category-sql-2","category-sql-server-2","tag-mssql","tag-sql-server","tag-sqlserver"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\r\n<title>Limpar banco tempdb do sql server - Franklin Jr.<\/title>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/www.franklinjr.com\/blog\/index.php\/2016\/03\/15\/limpar-banco-tempdb-do-sql-server\/\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.franklinjr.com\\\/blog\\\/index.php\\\/2016\\\/03\\\/15\\\/limpar-banco-tempdb-do-sql-server\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\\\/\\\/www.franklinjr.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Limpar banco tempdb do sql server\"}]}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Limpar banco tempdb do sql server - Franklin Jr.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.franklinjr.com\/blog\/index.php\/2016\/03\/15\/limpar-banco-tempdb-do-sql-server\/","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/www.franklinjr.com\/blog\/index.php\/2016\/03\/15\/limpar-banco-tempdb-do-sql-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/www.franklinjr.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Limpar banco tempdb do sql server"}]}]}},"_links":{"self":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1302"}],"version-history":[{"count":2,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1302\/revisions"}],"predecessor-version":[{"id":1305,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1302\/revisions\/1305"}],"wp:attachment":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}