Question about Microsoft SQL Server 2000 Standard Edition for PC

2 Answers

Creating a new database using an MDF file

My database saves as MDF. I want to know what are the steps to restore or create a new database using a MDF file? I tried to restore as usual but it shows an error. Please help.

Posted by on

Ad

2 Answers

  • Level 1:

    An expert who has achieved level 1.

    New Friend:

    An expert that has 1 follower.

  • Contributor
  • 3 Answers

An MDF file isn't a backup file isn't the main data file (or master data file depending on who you ask) hence the file extension MDF. You can attach the MDF to the database by right clicking on the databases folder in Enterprise Manager (SQL 2000) or Management Studio (SQL 2005) then selecting all tasks and then Attach Database.
When you do this you will get an error about the log file missing. This shouldn't matter as SQL Server will simply create a new log file for you.
This will only work if the SQL Server was stopped when you copied the MDF file from the old SQL Server. If you copied the file while the SQL Server was running this file probably will not attach either and you will need to get a valid backup of the database.
Download help tool for sql database - SQL Server Restore Toolbox.
http://www.sqlserver.restoretools.com/
You can read up more on SQL Server here.
http://www.filerepairforum.com/forum/microsoft/microsoft-aa/sql-server/498-creating-a-new-database-using-an-mdf-file?_=1416149856104/

Posted on Nov 19, 2014

Ad
  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Social Spider:

    An expert who has shared 50 answers on their Facebook wall.

  • Microsoft Expert
  • 43 Answers

Try this

CREATE DATABASE Database1 ON
(FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQLSERVER12.MSSQLSERVER\MSSQL\DATA\testdb.mdf ')
FOR ATTACH_REBUILD_LOG

Reference:

Posted on May 23, 2016

Ad

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
A 6ya expert can help you resolve that issue over the phone in a minute or two.
Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
The service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
Good luck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

5 Answers

How do I recover data from .mdf file


Detach you database. Overwrite the mdf and ldf files you've restored from your backup with your files from the D: drive. Reattach the database.
There is no guarantee that this will work or if it works, that your database is in a state where you can continue to work with.
If that doesn't work then there is an option to try to restore database using SQL Server Recovery Toolbox. It is a powerful tool for data recovery. They have a demo version. So you can check it works in your situation or not.
http://www.oemailrecovery.com/sql_repair.html

Jan 19, 2016 | Microsoft SQL Server 2008 Enterprise Full...

3 Answers

How to restore MySQL database Windows tool?


You can restore corrupt and delete SQL database file in few steps for MySQL Restore Toolbox. With this software you can also recover triggers, keys, indexes and table. Software support multiple MDF file recovery option. Software is supported by all Windows operating system. Get more ideas and download free trial version from -http://www.filerepairforum.com/forum/databases/databases-aa/mysql/1162-dump-mysql-database-file-is-error

May 29, 2015 | Sun MySQL

2 Answers

Attach a database without the corrupted log file


There might be other options out there. This is something that worked for me once but there are no guarantees that it will work at all times.

Stop SQL Server instance -> Copy MDF and LDF files to another location -> Delete original MDF and LDF files -> Start SQL Server instance again -> Create new database with exact same name and file names -> Stop SQL Server -> overwrite newly created MDF and LDF.

After this your database should be back online. If it is then go ahead and put it into EMERGANCY mode and SINGLE USER mode.

Finally go ahead and execute DBCC CHECKDB like this

DBCC CHECKDB (databaseName, REPAIR_ALLOW_DATA_LOSS) WITH NO_INFOMSGS

More information you can dig out from resources directly connected with SQL Server databases and database corruption in MS SQL Server any version...
http://itknowledgeexchange.techtarget.com/itanswers/how-to-restore-mdf-file-as-bakcup-databe/
https://www.repairtoolbox.com/sqlserverrepair.html SQL Server Repair Toolbox

May 15, 2015 | Microsoft SQL Server 2008 Enterprise Full...

5 Answers

Import damaged SQL MDF file


I would like to suggest you to use of MDF Repair Kit. An exciting new product from Repair Kit, this MS SQL MDF repair tool is an absolutely indispensable tool for anyone who wants to know how to repair MDF files in minutes. The program is based on a powerful analysis core and uses a convenient wizard-driven UI.

For more: http://www.mdf.repair/

Apr 25, 2015 | Microsoft SQL Server 2005 Enterprise...

5 Answers

How to recover deleted Microsoft SQL server MDF files?


Recover and repair MDF files with simple and efficetive tool to repair and recover MDF files from corrupt and damaged SQL server, which tool support all king of SQL server version and Windows OS. Visit here: http://www.en.mdfrepair.net
Read blog post: http://exchangerecovery.hubpages.com/hub/How-to-perform-SQL-Database-Recovery Corrupt MDF File Repair Utility

Apr 17, 2014 | Computers & Internet

5 Answers

Need Help to backup SQL database in safe mode


kindly choose the option safe mode with networking and then try.

Sep 10, 2009 | Microsoft Computers & Internet

Not finding what you are looking for?
Microsoft SQL Server 2000 Standard Edition for PC Logo

314 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Computers & Internet Experts

micky dee

Level 3 Expert

2992 Answers

Piyal Perera
Piyal Perera

Level 3 Expert

528 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18424 Answers

Are you a Microsoft Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...