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

Added exception handling for missing tables and DMVs #26

Closed zippy1981 closed 10 years ago

zippy1981 commented 10 years ago

Some base tables and DMVs don't seem to be in my master.mdf. Its possibly because I am looking at an empty database. Regardless, this is good error handling to have.

improvedk commented 10 years ago

Interesting. And this is a vanilla 2008 R2 database that wasn't upgraded from earlier versions? Fix looks fine, but I'm more interesting in the root cause :)

zippy1981 commented 10 years ago

Brand new 32 bit 2008 express edition on 64 bit win 8.1. On Mar 3, 2014 7:52 AM, "Mark S. Rasmussen" notifications@github.com wrote:

Interesting. And this is a vanilla 2008 R2 database that wasn't upgraded from earlier versions? Fix looks fine, but I'm more interesting in the root cause :)

Reply to this email directly or view it on GitHubhttps://github.com/improvedk/OrcaMDF/pull/26#issuecomment-36507223 .

zippy1981 commented 10 years ago

I'll try again with r2 tonight

improvedk commented 10 years ago

Let me know how it goes. I know from experience that there are minor differences, which is why I've only proclaimed it to work with 2008 R2. Likewise I've even seen issues with 2008 R2 databases that have been upgraded from 2005 or vanilla 2008.

improvedk commented 10 years ago

No matter the result, it doesn't matter to have the exception handling. Can you remove the "OrcaMDF.sln.cache" from the commit and perhaps add that to gitignore? Then I'll merge it in :)

zippy1981 commented 10 years ago

Done