• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1726
  • Last Modified:

Microsoft SQL 2008 EXPRESS Server Import mdf

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
wkolasa
Asked:
wkolasa
  • 4
  • 3
  • 3
  • +1
1 Solution
 
MohammedUCommented:
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
 
wkolasaAuthor Commented:
I have sql2008 EXPRESS on destination server... I'm getting the database (local machine) from 2005 Express
0
 
MohammedUCommented:
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
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
wkolasaAuthor Commented:
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
 
Mark WillsTopic AdvisorCommented:
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
 
Anthony PerkinsCommented:
>>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
 
Mark WillsTopic AdvisorCommented:
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
 
Anthony PerkinsCommented:
>>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
 
wkolasaAuthor Commented:
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
 
Anthony PerkinsCommented:
>>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
 
Mark WillsTopic AdvisorCommented:
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
 
wkolasaAuthor Commented:
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

  • 4
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now