Solved

to move mdf and ldf files

Posted on 2010-08-23
13
536 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
  • 8
  • 2
  • 2
  • +1
13 Comments
 
LVL 142

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
 
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 142

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

760 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

22 Experts available now in Live!

Get 1:1 Help Now