Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server ASP
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 23rd, 2005, 06:06 PM
Registered User
 
Join Date: Jan 2005
Location: , , .
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.

Thanks.

Reply With Quote
  #2 (permalink)  
Old January 23rd, 2005, 07:44 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: Lehigh Acres, FL, USA.
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

using SQL 7, 200 (Query Analyzer)

Code:
sp_detach_db [ @dbname = ] 'dbname' 

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

eg
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

Code:
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
Reply With Quote
  #3 (permalink)  
Old January 23rd, 2005, 08:03 PM
Registered User
 
Join Date: Jan 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 10:39 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.