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

2 Answers

  • Level 1:

    An expert who has achieved level 1.

  • 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

  • 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

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.
goodluck!

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...

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

8 Answers

How can i fix the problem by error message 262,level 14,state 1,line 1 CREATE DATABASE permission denied in database 'master' in sql server 2005


RecoveryFix for SQL server database recovery utility is a very powerful utilty to fastly short out your all problems to MS SQL database. By using this application, user can simply repair SQL database. Read more: http://www.sqlrecovery.org/download.html
For more information read this post: http://diskdatarecovery.jimdo.com/2013/07/23/how-to-restore-lost-data-on-server-while-running-sql-server/

Jun 22, 2010 | Microsoft SQL Server 2005 Enterprise...

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

4 Answers

Restoring files from the database


I suggest you use the Enterprise manager (gui tool to manage SQL).
Restoring a single table is not an option.
You can however restore a file or filegroup.
Make sure to backup before you start and NOT to restore database to its original name or original file location, to avoid acidents.
Normally you will have databases with only 2 files: the data at its Primary file group, and log file.
You may wish to create a new file group and move tables to the new group by recreating them there and exporting data from old table to new table. Then recreate indexes. This may prove to be complex as all tables and indexes have unique names and can't coexist with exact duplicate of them.

oh yea..... did I say backup?
well just in case backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup backup
but dont overwrite that backup

Feb 11, 2008 | Microsoft SQL Server 2000 Standard Edition...

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

284 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Computers & Internet Experts

micky dee

Level 3 Expert

2658 Answers

Piyal Perera
Piyal Perera

Level 3 Expert

528 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18389 Answers

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

Answer questions

Manuals & User Guides

Loading...