I have a SQL Server 2005 database *.mdf file that I would like to import into another SQL Server 2005 engine on another computer. I don't see how to do this.
How can I import a *.mdf file to create a copy of an exiisting database from another computer?
Thanks.
Hi there,If you want a copy of the database on both servers then you can use the Copy Database Wizard. On the server that hosts the DB you want to copy, right click on the "Databases" node in Object Explorer then go Tasks > Copy Database.
If you only want a database on one server, you can detach the database by right clicking on the "Databases" node in Object Explorer then going Tasks > Detach. If you're .mdf file isn't currently attached to a database, then ignore this bit and see below.
After detaching you can copy the .mdf and .ldf files to your target server and in Mangement Studio on your target server you can right click on the "Databases" node in Object Explorer then select the Attach option (it's either Attach or Tasks > Attach, one of those anyway)
Hope that helps a bit, but sorry if it doesn't
|||
Using Attach in the Object Explorer did the trick.
Why can't they make this easier and more consistent with other software? Why can't the us Import or Add From File under Databases or something as equally obvious? Why doesn't the documentation have help on Importing *.mdf files?
Thanks Very Much for the Assistance.
|||Hi,
I'm trying to open a *.mdf with Microsoft SQL Server 2005 Express on Vista. The Tasks menu does not appear when I click databases in Object Explorer. How do I see my databases?
Any hints appreciated. I've tried 'restore database' but get the error message below.
HS
TITLE: Microsoft SQL Server Management Studio Express
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
ADDITIONAL INFORMATION:
The media family on device '*.Mdf' is incorrectly formed. SQL Server cannot process this media family.
RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=3241&LinkId=20476
BUTTONS:
OK
No comments:
Post a Comment