Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Microsoft SQL 2008 EXPRESS Server Import mdf

Posted on 2009-04-14
12
Medium Priority
?
1,722 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

610 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