<?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: Schimbarea locatie de stocare a unei baze de date</title><link>http://sqlserver.ro/forums/thread/802.aspx</link><pubDate>Wed, 08 Nov 2006 12:26:03 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:802</guid><dc:creator>ggciubuc</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/802.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=802</wfw:commentRss><description>&lt;p&gt;Mai trebuie facut un lucru inainte de mutare : si anume anunt pentru utilizatorii aplicatiilor cu acces la acea baza de date&lt;br /&gt;sa intrerupa conexiunea la baza de date (aceasta devine offline). E un lucru de tinut minte pentru situatiile de urgenta ce apar&lt;br /&gt;in timpul programului, chiar daca majoritatea operatiunilor de intretinere se prefera in afara orelor de program.&lt;/p&gt;</description></item><item><title>Re: Schimbarea locatie de stocare a unei baze de date</title><link>http://sqlserver.ro/forums/thread/793.aspx</link><pubDate>Wed, 08 Nov 2006 09:10:32 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:793</guid><dc:creator>xmldeveloper</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/793.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=793</wfw:commentRss><description>Si attach/detach este o metoda insa am vrut sa ilustrez aceasta noua facilitate a SQL Server 2005 care permite mutarea locatiei fisierelor fara detasarea bazei de date.</description></item><item><title>Re: Schimbarea locatie de stocare a unei baze de date</title><link>http://sqlserver.ro/forums/thread/790.aspx</link><pubDate>Wed, 08 Nov 2006 08:40:11 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:790</guid><dc:creator>pmoldovan</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/790.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=790</wfw:commentRss><description>O&amp;nbsp;metoda mult mai simpla e sa detasam baza, sa mutam fisierele si sa o atasam inapoi. Procedura (mai greoaie) de mai sus este necesara doar daca fisirele de date si fisierul de log se muta pe discuri diferite.</description></item><item><title>Re: Schimbarea locatie de stocare a unei baze de date</title><link>http://sqlserver.ro/forums/thread/789.aspx</link><pubDate>Tue, 07 Nov 2006 21:46:22 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:789</guid><dc:creator>SorinT</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/789.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=789</wfw:commentRss><description>&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New';"&gt;--Am facut experimentul cu mutarea bazei de date&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New';"&gt;--Prima comanda ne ajuta sa aflam datele exacte despre baza de date in cauza&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;execute&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; &lt;span style="color:maroon;"&gt;sp_helpdb&lt;/span&gt;&lt;span style="color:red;"&gt;&amp;#39;BlueComp&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New';"&gt;--In acest pas baza de date devine offline&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;alter&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; &lt;span style="color:blue;"&gt;database&lt;/span&gt; BlueComp &lt;span style="color:blue;"&gt;set&lt;/span&gt; offline&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New';"&gt;--Acum se foloseste copy si paste pt a muta fisierele in noua locatie&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New';"&gt;--In urmatorul pas se seteaza noua locatie a fisierelor&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;alter&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; &lt;span style="color:blue;"&gt;database&lt;/span&gt; BlueComp modify &lt;span style="color:blue;"&gt;file&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:blue;"&gt;name&lt;/span&gt;&lt;span style="color:gray;"&gt;=&lt;/span&gt;BlueComp&lt;span style="color:gray;"&gt;,&lt;/span&gt;&lt;span style="color:blue;"&gt;filename&lt;/span&gt;&lt;span style="color:gray;"&gt;=&lt;/span&gt;&lt;span style="color:red;"&gt;&amp;#39;H:\BlueCompDB\BlueComp.mdf&amp;#39;&lt;/span&gt;&lt;span style="color:gray;"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;alter&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; &lt;span style="color:blue;"&gt;database&lt;/span&gt; BlueComp modify &lt;span style="color:blue;"&gt;file&lt;/span&gt;&lt;span style="color:gray;"&gt;(&lt;/span&gt;&lt;span style="color:blue;"&gt;name&lt;/span&gt;&lt;span style="color:gray;"&gt;=&lt;/span&gt;BlueComp_Log&lt;span style="color:gray;"&gt;,&lt;/span&gt;&lt;span style="color:blue;"&gt;filename&lt;/span&gt;&lt;span style="color:gray;"&gt;=&lt;/span&gt;&lt;span style="color:red;"&gt;&amp;#39;H:\BlueCompDB\BlueComp_log.ldf&amp;#39;&lt;/span&gt;&lt;span style="color:gray;"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New';"&gt;--In continuare baza de date devine online si este din nou utilizabila&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;alter&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; &lt;span style="color:blue;"&gt;database&lt;/span&gt; BlueComp &lt;span style="color:blue;"&gt;set&lt;/span&gt; online&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span style="font-size:10pt;color:green;font-family:'Courier New';"&gt;--Multumesc Cristi pt ajutor acum pot spune ca stiu sa modific locatia unei baze de date :)&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Re: Schimbarea locatie de stocare a unei baze de date</title><link>http://sqlserver.ro/forums/thread/743.aspx</link><pubDate>Sun, 05 Nov 2006 13:40:15 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:743</guid><dc:creator>xmldeveloper</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/743.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=743</wfw:commentRss><description>&lt;ol&gt;&lt;li&gt;executati urmatoarea instructiune: &lt;strong&gt;ALTER DATABASE numebaza SET OFFLINE;&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;Mutati cele doua fisiere in&amp;nbsp;noua locatie (Cut - Paste din Windows Explorer).&lt;/li&gt;&lt;li&gt;Presupunand ca numele logice pentru cele doua fisiere sunt &lt;strong&gt;numebaza_DATA&lt;/strong&gt; si &lt;strong&gt;numebaza_LOG&lt;/strong&gt; rulati: &lt;/li&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;ALTER DATABASE numebaza MODIFY FILE ( NAME = numebaza_DATA, FILENAME = &amp;#39;E:\Date\numebaza.mdf&amp;#39; );&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;ALTER DATABASE numebaza MODIFY FILE ( NAME = numebaza_LOG, FILENAME = &amp;#39;F:\Loguri\numebaza_log.ldf&amp;#39; );&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;Daca nu stiti numele logice le puteti afla cu:&lt;/li&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;SELECT name, physical_name AS CurrentLocation FROM sys.master_files WHERE database_id = DB_ID(N&amp;#39;numebaza&amp;#39;);&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;(sau) &lt;strong&gt;EXECUTE sp_helpdb &amp;#39;numebaza&amp;#39;;&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;rulati: &lt;strong&gt;ALTER DATABASE numebaza SET ONLINE;&lt;br /&gt;&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;</description></item><item><title>Schimbarea locatie de stocare a unei baze de date</title><link>http://sqlserver.ro/forums/thread/740.aspx</link><pubDate>Sat, 04 Nov 2006 21:03:10 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:740</guid><dc:creator>SorinT</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/740.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=740</wfw:commentRss><description>&lt;p&gt;Am creat o baza de date care este stocata in locatia default HDD0 C:\Program Files\etc\numebaza.mdf si numebaza_log.ldf&lt;/p&gt;&lt;p&gt;As vrea sa o mut in alta locatie adica HDD1 E:\Date\numebaza.mdf&amp;nbsp; si HDD2 F:\Loguri\numebaza_log.ldf &lt;/p&gt;&lt;p&gt;Cum se poate face acest lucru?&lt;/p&gt;&lt;p&gt;Multumesc pt. raspunsuri.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>