Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server ASP
SQL Server ASP Discussions about ASP programming with Microsoft's SQL Server. For more ASP forums, see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 23rd, 2005, 06:06 PM
Registered User
Join Date: Jan 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Porting MSDE database to SQL server

In [u]Beginning ASP.Net Databases Using VB.Net </u>(p. 26), the authors say that an MSDE database "can be ported to the commercial distribution SQL Server with next to no effort." Can anyone tell me how to do that?

I asked the Support folks at my web host, but they could not help. (They said to use Enterprise Manager to make a backup database, but MSDE does not have Enterprise Manager.)

I am a beginner trying to teach myself to work with databases (so I am learning from an idiot). If anyone can help me out, I would be very grateful.


Old January 23rd, 2005, 07:44 PM
Friend of Wrox
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc

using SQL 7, 200 (Query Analyzer)

sp_detach_db [ @dbname = ] 'dbname' 

to attach use the stored proc 
sp_attach_db [ @dbname = ] 'dbname' 
    , [ @filename1 = ] 'filename_n' 

EXEC sp_attach_db @dbname = N'pubs', 
   @filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf', 
   @filename2 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs_log.ldf'
using VB

Private Sub Attach_Database()

con.Execute "EXEC sp_attach_db 'pubs',  @filename1 = 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf',    @filename2 = 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs_log.ldf'"
End Sub

Private Sub Detach_Database()
    con.Execute "sp_detach_db 'pubs' "
End Sub
you should modify the functions and replace the names with the actual (file)names

Jaime E. Maccou
Old January 23rd, 2005, 08:03 PM
Registered User
Join Date: Jan 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

Hello Jaime E. Maccou,

Thank you very much for your help!! I was hopelessly lost, and your quick, clear advice is sure to get me back on track.

Many thanks.

Harvey Berman

Similar Threads
Thread Thread Starter Forum Replies Last Post
sql server connection problem in msde oldbig89 SQL Server 2000 1 February 8th, 2006 05:46 PM
SQL Server & MSDE reyboy SQL Server 2000 0 September 6th, 2004 10:15 PM
Porting data from SQL Server to Oracle over ODBC pankaj_daga Oracle 3 August 4th, 2004 05:19 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.