How to read or validate database mdf file when sql server is not running or offline

I have detached one database from Sql server . I have database( .mdf and .ldf ) files with me. Now how can i read that database file. I want to validate that database is good or not. Means i want the similar to DBCC CHECKDB command to check the database with out attaching it to Sql server.

Is there any way or any FREE tool provided by microsoft .

Thanks in advance

more ▼

asked Jan 20, 2010 at 02:37 AM in Default

avatar image

1 1 1 2

(comments are locked)
10|1200 characters needed characters left

3 answers: sort voted first

If you're only using an instance of SQL Server for DR purposes (and not using it for production at all), then it doesn't need to be licensed. So the free tool you can use is another copy of SQL Server itself.

But you might have been better off taking a backup and restoring that. If a restored database successfully passes DBCC CHECKDB, then the original one must be fine too.

more ▼

answered Jan 20, 2010 at 03:50 AM

avatar image

Rob Farley
5.8k 16 22 28

Rob - hadnt heard about this ability to install SQL without a license if its only for DR, other than as a mirror server. What can you do - log shipping, backup/restore? Or is it only allowed to be a running server with no DBs online? Is there a Miscrosoft page to read about it?

Jan 20, 2010 at 05:35 AM Fatherjack ♦♦

FatherJack.. Passive/Standby servers do not need licensing. Be sure to read the "Passive/Failure" section, as it include some restrictions with regards to how long the standby server can be Active.


Jan 20, 2010 at 06:02 AM sp_lock

Hi Rob, My requirement is like need to validate the database files without attaching to sqlserver. Before attaching it to sql server i need to check or validate is that database is in good state or any corruption happend. Microsoft is providing Eseutil.exe for Exchange to do Offline validation. Like that is there any tool for SQLServer provided by Microsoft. (Or ) any other method to do this check.

thanks Santhosh

Jan 20, 2010 at 06:18 AM Santhosh_y

Jonlee: that page states that a passive server requires licensing if 'queries are being run' - does DBCC constitute a query? (Hmm.. this may need taking off this question and asked elsewhere.....)

Jan 20, 2010 at 06:38 AM Kev Riley ♦♦
(comments are locked)
10|1200 characters needed characters left

A suggestion: Instead of de-taching it in the first place; do a backup of the database, and run RESTORE VERIFYONLY ... on the backup.

It does take up extra diskspace, but your database stays online all the time.


Henrik Staun Poulsen www.stovi.com

more ▼

answered Jan 20, 2010 at 10:11 AM

avatar image

Henrik Staun Poulsen
589 14 17 20

(comments are locked)
10|1200 characters needed characters left

The best way is probably to bring it into a copy of SQL Server. If you need to verify it before it gets to a production machine, you can use a copy on test server. If it is smaller than 4 GB you can use SQL Server Express for free.

I am not aware of anything besides SQL Server that can do the equivalent of MDCC commands to a SQL Server file.

more ▼

answered Jan 20, 2010 at 10:40 AM

avatar image

15.6k 22 57 38

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Jan 20, 2010 at 02:37 AM

Seen: 4029 times

Last Updated: Jan 20, 2010 at 02:37 AM

Copyright 2018 Redgate Software. Privacy Policy