ASP.NET Step: Move / Export Database from Microsoft SQL Server 2008 to mdf File
1. Download SQL Server Management Studio
from VWD website
2. Read the followings doc
http://www.windows-tech.info/15/206f0457374acafb.php
3. Follow Steps in
How to: Detach a Database (SQL Server Management Studio)
http://msdn.microsoft.com/en-us/library/ms191491.aspx
4. Copy the mdf to VWD website's App_Data Folder
from
C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA
5. Open Web.config
Replace the connection String as we detached the database from server
and run it as standalone file
<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\db.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
2009年7月11日星期六
訂閱:
發佈留言 (Atom)
沒有留言:
發佈留言