Wednesday, March 28, 2012
Import mdf file to server
I have my *.mdf and *.ldf file and need to import it to my new sqlserver 2000.
Can anybody tell me how to do it
BEST REGARDS
BadleifEasy, you only need to attach the database. You can use the sp_attach_db system prodedure or go with the enterprise manager: right click on
your_server_name/databases
and the select "Attach Database"
and it's finished.
import MDF and LDF backup from SQL2000 to SQL2005
hi,
i have six files ( 3 MDF and 3 LDF) from a backup of a MS SQL 2000 server.
I installed MS SQL 2005 and wanted to Restore these Dataset. but they cant be accessed. doesnt SQL 2005 support these files ?
How can i use these files to access them with SQL 2005 ?
Thx,
Hello -
The files you're talking about are the "raw" data files that SQL Server uses, not a backup. When you take a backup from within SQL Server, files are acutally packaged a little differently, into a .bak file. When you use the BACKUP DATABASE command in SQL Server, it will create these files for you, which inlcude all of the "raw" files. You can then use the RESTORE DATABASE command to restore them to another (or the same) SQL Server.
All is not lost, however. If you have the MDF and LDF files, you can "adopt" these files directly into a running SQL Server system. That is called "attaching" a database. You can read more about that here:
http://msdn2.microsoft.com/en-us/library/ms190794.aspx
Buck Woody
http://www.buckwoody.com
Monday, March 12, 2012
Import data from MDF/LDF (not attach)
These files were 'attach'ed into our running MS SQL Server 2000
instance with no problems.
A few weeks later, I now have another set of MDF/LDF files, an
incremental set of data that needs to be fed into the original
database.
What's the best way to import this data? Is there a cool little
stored procedure or somesuch, or will I be attaching these as a
separate, temporary database, and doing a INSERT ... SELECT * for each
table?
Thanks!This is a multi-part message in MIME format.
--=_NextPart_000_069A_01C3AD22.EE05D9C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
You'll likely have to attach that separately and then run a bunch of INSERT
SELECT WHERE NOT EXISTS (...) statements - one for each table.
--
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Wendell" <ojailoop@.yahoo.com> wrote in message
news:e77bc23a.0311171248.6e9258bf@.posting.google.com...
I have a rather large database that was shipped as an MDF/LDF pair.
These files were 'attach'ed into our running MS SQL Server 2000
instance with no problems.
A few weeks later, I now have another set of MDF/LDF files, an
incremental set of data that needs to be fed into the original
database.
What's the best way to import this data? Is there a cool little
stored procedure or somesuch, or will I be attaching these as a
separate, temporary database, and doing a INSERT ... SELECT * for each
table?
Thanks!
--=_NextPart_000_069A_01C3AD22.EE05D9C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
You'll likely have to attach that =separately and then run a bunch of INSERT SELECT WHERE NOT EXISTS (...) statements - =one for each table.
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"Wendell"
--=_NextPart_000_069A_01C3AD22.EE05D9C0--