<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlserver.ro/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Intrebari generale</title><link>http://sqlserver.ro/forums/16/ShowForum.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Re: Sql2005-move system database</title><link>http://sqlserver.ro/forums/thread/8073.aspx</link><pubDate>Fri, 26 Feb 2010 18:37:54 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:8073</guid><dc:creator>B_gd_n[ ]Sahlean</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/8073.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=8073</wfw:commentRss><description>Vezi &lt;a href="http://blogs.msdn.com/sql_protocols/archive/2005/10/22/483684.aspx"&gt;aici&lt;/a&gt;.&lt;br&gt;</description></item><item><title>Sql2005-move system database</title><link>http://sqlserver.ro/forums/thread/8072.aspx</link><pubDate>Fri, 26 Feb 2010 11:13:14 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:8072</guid><dc:creator>muraruadrian</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/8072.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=8072</wfw:commentRss><description>Buna ziua,&lt;br&gt;&lt;br&gt;Din motive de mentenanta, sunt nevoit sa reloc bazele de date pe alta partitie. Pentru bazele de date utilizator si cele system exceptand 'master' si 'mssqlsystemresource' totul a fost ok(detalii sunt in BOL). Adica, &lt;br&gt;&lt;ol&gt;&lt;li&gt;For each file to be moved, run the following statement.&lt;br&gt;&lt;div class="code"&gt;&lt;span&gt;&lt;table cellpadding="0" cellspacing="0"&gt;&lt;tr&gt;&lt;th align="left"&gt;&lt;br&gt;&lt;/th&gt;&lt;th align="right"&gt;&lt;span style="cursor:default;" class="copyCode"&gt;&lt;/span&gt;&lt;br&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="2"&gt;&lt;pre&gt;ALTER DATABASE database_name MODIFY FILE ( NAME = logical_name , FILENAME = 'new_path\os_file_name' )&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;&lt;li&gt;Stop the instance of SQL Server or shut down the system to perform 
maintenance. For more information, see Stopping 
Services.&lt;br&gt;&lt;br&gt;
&lt;/li&gt;&lt;li&gt;Move the file or files to the new location.&lt;br&gt;&lt;br&gt;
&lt;/li&gt;&lt;li&gt;Restart the instance of SQL Server or the server.&lt;br&gt;&lt;br&gt;
&lt;/li&gt;&lt;li&gt;Verify the file change by running the following query.&lt;br&gt;&lt;div class="code"&gt;&lt;span&gt;&lt;table cellpadding="0" cellspacing="0"&gt;&lt;tr&gt;&lt;th align="left"&gt;&lt;br&gt;&lt;/th&gt;&lt;th align="right"&gt;&lt;span style="cursor:default;" class="copyCode"&gt;&lt;br&gt;&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="2"&gt;&lt;pre&gt;SELECT name, physical_name AS CurrentLocation, state_desc&lt;br&gt;FROM sys.master_files&lt;br&gt;WHERE database_id = DB_ID(N'&amp;lt;database_name&amp;gt;');&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;Problema apare la mutarea lui 'master' si 'mssqlsystemresource'. Acestea, in final trebuie sa fie in aceeasi locatie. Pentru 'master', relocarea functioneaza. Adica, cf BOL:&lt;ol&gt;&lt;li&gt;Start-All Programs-Microsoft SQL Server 2005-Configuration Tools-SQL Server Configuration Manager.&lt;br&gt;
&lt;/li&gt;&lt;li&gt;SQL Server 2005 Services node, right-click MSSQLSERVER-Properties.&lt;br&gt;
&lt;/li&gt;&lt;li&gt;In SQL Server&lt;b&gt; &lt;/b&gt;(&lt;i&gt;MSSQLSERVER&lt;/i&gt;) Properties-Advanced tab. &lt;br&gt;&lt;/li&gt;&lt;li&gt;Modificam Startup Parameters pentru noua locatie a bazei 'master'.&lt;div class="code"&gt;&lt;span&gt;&lt;table cellpadding="0" cellspacing="0"&gt;&lt;tr&gt;&lt;th align="left"&gt;&lt;br&gt;&lt;/th&gt;&lt;th align="right"&gt;&lt;br&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Oprire instanta SQL Server.&lt;br&gt;&lt;br&gt;
&lt;/li&gt;&lt;li&gt;Mutare fisiere master.mdf si mastlog.ldf in noua locatie.&lt;br&gt;&lt;br&gt;
&lt;/li&gt;&lt;li&gt;Repornire instanta of SQL Server in master-only recovery mode&lt;br&gt;
&lt;ul&gt;&lt;li&gt;&lt;div class="code"&gt;&lt;span&gt;&lt;table cellpadding="0" cellspacing="0"&gt;&lt;tr&gt;&lt;th align="left"&gt;&lt;br&gt;&lt;/th&gt;&lt;th align="right"&gt;&lt;br&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;pre&gt;NET START MSSQLSERVER /f /T3608&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;&lt;li&gt;&lt;div class="code"&gt;&lt;span&gt;&lt;table cellpadding="0" cellspacing="0"&gt;&lt;tr&gt;&lt;th align="left"&gt;&lt;br&gt;&lt;/th&gt;&lt;th align="right"&gt;&lt;br&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;Pana aici, totul e ok. Ce nu functioneaza de fapt? Acum ar trebui sa rulez din Sqlcmd comanda de realocare a bazei mssqlsystemresource, urmata de mutarea fisierelor in noua locatie:&lt;br&gt;&lt;br&gt;
&lt;div class="code"&gt;&lt;span&gt;
&lt;table cellpadding="0" cellspacing="0"&gt;

&lt;tr&gt;
&lt;th align="left"&gt;&lt;br&gt;&lt;/th&gt;
&lt;th align="right"&gt;&lt;span style="cursor:default;" class="copyCode"&gt;&lt;br&gt;&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="2"&gt;&lt;pre&gt;ALTER DATABASE mssqlsystemresource &lt;br&gt;    MODIFY FILE (NAME=data, FILENAME= 'new_path_of_master\mssqlsystemresource.mdf');&lt;br&gt;GO&lt;br&gt;ALTER DATABASE mssqlsystemresource &lt;br&gt;    MODIFY FILE (NAME=log, FILENAME= 'new_path_of_master\mssqlsystemresource.ldf');&lt;br&gt;GO&lt;br&gt;&lt;br&gt;Practic, nici nu ma mai pot conecta cu sqlcmd. Mesajul este:&lt;br&gt;&lt;br&gt;HResult 0xE9, Level 16, State 1&lt;br&gt;Shared Memory Provider: No process is on the other end of the pipe.&lt;br&gt;Sqlcmd: Error: Microsoft SQL Native Client : Communication link failure.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;&lt;/ol&gt;&lt;br&gt;</description></item></channel></rss>