Solved

to move mdf and ldf files

Posted on 2010-08-23
13
542 Views
Last Modified: 2012-05-10
we have a mdf and ldf file of a database which is in Sql Server Express and I would like to move these files to the sql Server 2005 and want to use this database in Sql server 2005..how can we move these database to the sql server 2005?
0
Comment
Question by:teodor76
[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
  • 8
  • 2
  • 2
  • +1
13 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 33499026
to move databases within a instance can also be done to move to another instance:
http://support.microsoft.com/kb/224071

note: you can only move to same or higher version, you cannot go backwards
0
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 33499110

One more suggestion.
If u dont want to stop database then u can take backup and just restore in new server.
0
 
LVL 5

Expert Comment

by:ThakurVinay
ID: 33499237
just try to copy these mdf and ldf file to new server and try to attach. see if it works.
ELSE
just backup and resotre on new server.

HTH
Vinay
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 33499295
You need to stop the server first.
then move datafiles.
0
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 33499304

Sory....

For using attach & detach method, u no need to stop the server.
0
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 33499305

Sory....

For using attach & detach method, u no need to stop the server.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 33499309
>You need to stop the server first.
surely not. because if you stop the server and move the files, the original server will not know where his files are gone.
using detach method will make sure the server does know that they are no longer under it's responsibilities.

you could, of course, stop the server, and COPY the files ...
0
 

Author Comment

by:teodor76
ID: 33499553
I got the database file mdf and ldf with respect to database in sql Express and I copied them to the server on which sql server 2005 is installed..now I want to move them to the E:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data..in this case, should we need to stop MS Sql Service on the new server sql 2005 server?
0
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 33499608
No....

you no need to stop.

You can directly moved.
0
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 33499617
You need to stop server only if you are trying directly without detachig data files.
0
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 33499621
You need to stop server only if you are trying to move data files directly without detachig data files.
0
 

Author Comment

by:teodor76
ID: 33499918
ok I copied them to the E:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data now how will I create this database on this server?
0
 
LVL 19

Accepted Solution

by:
Bhavesh Shah earned 250 total points
ID: 33499954

You no need to create database.

 Open your SQL SERVER MGMT STUDIO.
 Right click on database, select attach database. and give your mdf file name.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

739 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