Solved

Microsoft SQL 2008 EXPRESS Server Import mdf

Posted on 2009-04-14
12
1,675 Views
Last Modified: 2012-05-06
I have a database I'm trying to import and get setup into Express 2008 and I don't know how to do this.  I've copied it from(file.mdf)  a remote (local dev. environment) to the webserver.  Now, how do I get 2008 to recognize it as a db?  And, just for fun, can anyone answer why is this so hard?  I'm sure it has something to do with security, but darn...

Thanks,

Wend
0
Comment
Question by:wkolasa
  • 4
  • 3
  • 3
  • +1
12 Comments
 
LVL 15

Expert Comment

by:MohammedU
ID: 24140590
First make sure you have SQL Server 2008 installed on your destination server and then use the following instructions to attach a db...

http://msdn.microsoft.com/en-us/library/ms165673.aspx
http://www.kodyaz.com/articles/sql-server-attach-database-mdf-file.aspx
http://technet.microsoft.com/en-us/library/ms190209.aspx
0
 

Author Comment

by:wkolasa
ID: 24140656
I have sql2008 EXPRESS on destination server... I'm getting the database (local machine) from 2005 Express
0
 
LVL 15

Expert Comment

by:MohammedU
ID: 24140674
Then follow the instrunctions from http://msdn.microsoft.com/en-us/library/ms165673.aspx
OR
Backup the database from source server then Restore it...
Check the Books online for backup and restore command.
0
 

Author Comment

by:wkolasa
ID: 24141147
This is actually what I was looking for:

Open SQL Management Studio Express and log in to the server to which you want to attach the database. In the 'Object Explorer' window, right-click on the 'Databases' folder and select 'Attach...' The 'Attach Databases' window will open; inside that window click 'Add...' and then navigate to your .MDF file and click 'OK'. Click 'OK' once more to finish attaching the database and you are done. The database should be available for use.
0
 
LVL 51

Expert Comment

by:Mark Wills
ID: 24143209
when going from 2005 to 2008 better to use the SQL backup and restore. You will also want to update statistics, possibly update indexes, especially if you are now using sql 2008 compatability mode.

Also those links from mohammedU were pretty good, not sure why you have not awarded the accepted solution to the first post, they lead directly to http://msdn.microsoft.com/en-us/library/ms191491.aspx  which is the SSMS way,,,
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24144490
>>not sure why you have not awarded the accepted solution to the first post<<
But the author is awarding MohammedU's a whoppng 50 points for their trouble. :)
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 51

Expert Comment

by:Mark Wills
ID: 24144800
Yeah, very generous a 10% award for at least an 80% answer (had to click on a link or two inside the posted links), that lead to the 100% solution that the asker awarded themselves. Cool.

BTW acperkins, how do you find these interesting ones ?
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24147506
>>BTW acperkins, how do you find these interesting ones ?<<
I just read the opening question and I can tell the way it is going to end up.  Re-read this one and you can see what I mean.
0
 

Author Comment

by:wkolasa
ID: 24150703
I didn't award the full points b/c the solution I posted was the exact solution I was looking for.  Also, 500 points for a link(s).  I can google solutions as well.  There's more discussion about how many points I award than about an actual solution.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24150757
>>There's more discussion about how many points I award than about an actual solution.<<
And why do you think that is the case?
0
 
LVL 51

Accepted Solution

by:
Mark Wills earned 500 total points
ID: 24150932
I count 5 posts to your original question (including my first one with those words of warning about indexes and stats), and only 3 about points...

Yes you could have googled, but didn't, it can be tricky to get the search to return such a succinct and directed list. Sometimes the link paints a prettier picture rather than simply copy and paste from Books On Line - might be a link, but never underestimate the value of those links, often saved as our own useful bits.  And the art is in knowing what question to ask...

Besides which there is relevant associated information as to upgrading, a few gotcha's, replication, full text searching, what to do with metadata, and so on. There is potentially more than just attaching a database, and we do not know what you have in that database.

Nobody has objected to your request to close that way.
0
 

Author Closing Comment

by:wkolasa
ID: 31570047
You get all the points for two reasons.  A) I want to close this question B) You're nice about all of this.

Thanks ~ Wendi
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

     When we have to pass multiple rows of data to SQL Server, the developers either have to send one row at a time or come up with other workarounds to meet requirements like using XML to pass data, which is complex and tedious to use. There is a …
Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
This video discusses moving either the default database or any database to a new volume.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now