improvedk / OrcaMDF

A C# parser for MDF files. Allows you to read tables, metadata and indexes from MDF files without it being attached to a running SQL Server instance.
http://improve.dk/archive/2011/05/03/introducing-orcamdf.aspx
GNU General Public License v3.0
181 stars 74 forks source link

Some error #17

Closed afshinhamilton closed 11 years ago

afshinhamilton commented 11 years ago

Error log on my corrupted MDF:

7/15/2013 1:41:35 PM

System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.Collections.Generic.Dictionary2.get_Item(TKey key) at OrcaMDF.Core.Engine.Pages.FileHeaderPage.parseFileHeaderRecord() in d:\C# Projects\OrcaMDF-master\OrcaMDF-master\src\OrcaMDF.Core\Engine\Pages\FileHeaderPage.cs:line 31 at OrcaMDF.Core.Engine.Pages.FileHeaderPage..ctor(Byte[] bytes, Database database) in d:\C# Projects\OrcaMDF-master\OrcaMDF-master\src\OrcaMDF.Core\Engine\Pages\FileHeaderPage.cs:line 15 at OrcaMDF.Core.Engine.Database..ctor(IEnumerable1 files) in d:\C# Projects\OrcaMDF-master\OrcaMDF-master\src\OrcaMDF.Core\Engine\Database.cs:line 49 at OrcaMDF.OMS.Main.openToolStripMenuItem1_Click(Object sender, EventArgs e) in d:\C# Projects\OrcaMDF-master\OrcaMDF-master\src\OrcaMDF.OMS\Main.cs:line 60

improvedk commented 11 years ago

Can you confirm the database is a pure 2008 R2 database? That is, not upgraded from an earlier version, etc. Is it a test database (that I might potentially get a copy of) or a production one?

afshinhamilton commented 11 years ago

Hi Mark,

The database is a pure 2008 R2, I created it from scratch in 2008 R2. But it is about 60 GB and I can't upload it but can do some tests or give you remote access via Teamviewer if you tend.

Regards, Afshin Hamilton

On Mon, Jul 15, 2013 at 8:47 PM, Mark S. Rasmussen <notifications@github.com

wrote:

Can you confirm the database is a pure 2008 R2 database? That is, not upgraded from an earlier version, etc. Is it a test database (that I might potentially get a copy of) or a production one?

— Reply to this email directly or view it on GitHubhttps://github.com/improvedk/OrcaMDF/issues/17#issuecomment-21019592 .

afshinhamilton commented 11 years ago

I have forgotten to say that it is a corrupted mdf file. Now I can not attach it to SQL Server.

improvedk commented 11 years ago

Ah, that explains it then. Currently OrcaMDF will only read functional MDF files, all corrupt files will basically yield an undefined result. I've done some experiements in the corruption and thewalkingdead branches, but neither are functional or automatic. OrcaMDF may read parts of corrupted MDF files, but it will require you to code the reading manually to extract just the parts you're interested in, without having OrcaMDF parsing the whole base table structure for metadata.