Solved

to move mdf and ldf files

Posted on 2010-08-23
13
537 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

896 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

18 Experts available now in Live!

Get 1:1 Help Now