?
Solved

Microsoft SQL 2008 EXPRESS Server Import mdf

Posted on 2009-04-14
12
Medium Priority
?
1,716 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

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
 
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 2000 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

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

800 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