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

to move mdf and ldf files

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
teodor76
Asked:
teodor76
  • 8
  • 2
  • 2
  • +1
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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
 
Bhavesh ShahLead AnalysistCommented:

One more suggestion.
If u dont want to stop database then u can take backup and just restore in new server.
0
 
ThakurVinayCommented:
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
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
Bhavesh ShahLead AnalysistCommented:
You need to stop the server first.
then move datafiles.
0
 
Bhavesh ShahLead AnalysistCommented:

Sory....

For using attach & detach method, u no need to stop the server.
0
 
Bhavesh ShahLead AnalysistCommented:

Sory....

For using attach & detach method, u no need to stop the server.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>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
 
teodor76Author Commented:
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
 
Bhavesh ShahLead AnalysistCommented:
No....

you no need to stop.

You can directly moved.
0
 
Bhavesh ShahLead AnalysistCommented:
You need to stop server only if you are trying directly without detachig data files.
0
 
Bhavesh ShahLead AnalysistCommented:
You need to stop server only if you are trying to move data files directly without detachig data files.
0
 
teodor76Author Commented:
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
 
Bhavesh ShahLead AnalysistCommented:

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

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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