{"id":118,"date":"2011-04-26T12:34:09","date_gmt":"2011-04-26T12:34:09","guid":{"rendered":"http:\/\/eldar.pro\/?p=118"},"modified":"2019-07-18T22:06:12","modified_gmt":"2019-07-18T22:06:12","slug":"moving-resource-database-in-sql-server-2008-r2","status":"publish","type":"post","link":"https:\/\/eldar.pro\/?p=118","title":{"rendered":"Moving Resource Database in SQL Server 2008 R2"},"content":{"rendered":"<p>In SQL Server 2005 we able to change the location of the resource database files <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms345408(v=sql.90).aspx\"> what is stated in msdn.<\/a><br \/>\n<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms345408(v=sql.105).aspx\"> If we look the same on the SQL Server 2008 R2 <\/a>, we read:<br \/>\n<strong>The resource database cannot be moved.<\/strong><\/p>\n<p>Let&#8217;s be curious, and try to do the same, as described in msdn for SQL Server 2005:<\/p>\n<pre data-enlighter-language=\"msdos\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"msdos\">C:\\&gt;NET START MSSQLSERVER \/f \/T3608<\/code><\/pre>\n<p>Version check:<\/p>\n<pre data-enlighter-language=\"sql\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\">select @@version<\/code><\/pre>\n<p><em>Microsoft SQL Server 2008 R2 (SP2) &#8211; 10.50.4000.0 (X64) Jun 28 2012 08:36:30 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.1(Build 7601: Service Pack 1) (Hypervisor)<\/em>Specifying a new location:<\/p>\n<pre class=\"brush: sql; gutter: false EnlighterJSRAW\" data-enlighter-language=\"sql\">ALTER DATABASE mssqlsystemresource\n MODIFY FILE (NAME=data, FILENAME= 'C:\\DATA\\mssqlsystemresource.mdf');\n ALTER DATABASE mssqlsystemresource\n MODIFY FILE (NAME=log, FILENAME= 'C:\\DATA\\mssqlsystemresource.ldf');<\/pre>\n<p><em>The file &#8220;data&#8221; has been modified in the system catalog. The new path will be used the next time the database is started.<br \/>\nThe file &#8220;log&#8221; has been modified in the system catalog. The new path will be used the next time the database is started.<\/em>Move the database mssqlsystemresource files:<\/p>\n<pre data-enlighter-language=\"msdos\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"msdos\">C:\\&gt;move \"C:\\Program Files\\Microsoft SQL Server\\MSSQL10_50.MSSQLSERVER\\MSSQL\\Binn\\mssqlsystemresource.*\" C:\\DATA\\<\/code><\/pre>\n<p><em>C:\\Program Files\\Microsoft SQL Server\\MSSQL10_50.MSSQLSERVER\\MSSQL\\Binn\\mssqlsystemresource.ldf<br \/>\nC:\\Program Files\\Microsoft SQL Server\\MSSQL10_50.MSSQLSERVER\\MSSQL\\Binn\\mssqlsystemresource.mdf<br \/>\n2 file(s) moved.<\/em>And restart the SQL Server &#8211; it works.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In SQL Server 2005 we able to change the location of the resource database files what is stated in msdn. If we look the same on the SQL Server 2008 R2 , we read: The resource database cannot be moved. Let&#8217;s be curious, and try to do the same, as described in msdn for SQL [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[],"class_list":["post-118","post","type-post","status-publish","format-standard","hentry","category-s-sql-server-en"],"_links":{"self":[{"href":"https:\/\/eldar.pro\/index.php?rest_route=\/wp\/v2\/posts\/118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eldar.pro\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eldar.pro\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eldar.pro\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eldar.pro\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=118"}],"version-history":[{"count":6,"href":"https:\/\/eldar.pro\/index.php?rest_route=\/wp\/v2\/posts\/118\/revisions"}],"predecessor-version":[{"id":475,"href":"https:\/\/eldar.pro\/index.php?rest_route=\/wp\/v2\/posts\/118\/revisions\/475"}],"wp:attachment":[{"href":"https:\/\/eldar.pro\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eldar.pro\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eldar.pro\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}