improvedk/OrcaMDF

can't open db

Closed this issue · 6 comments

im testing calling database function over visual studio 2010...i have 2 problems.

1- I can´t see RawDatabase function on reference over load.

2- only can use Database function, then when I load mdf.. dump:.

Loading Boot Page
Loading Boot Page
Loading Primary Record Page (1:20)
Loading Primary Record Page (1:90)
Loading Primary Record Page (1:425)
Loading Primary Record Page (1:583)
Loading Primary Record Page (1:17)
Loading Primary Record Page (1:412)
Loading Primary Record Page (5:191468)

Parameter name: File with ID 5 is not part of this database.

Is this a working database or a corrupt one? Does the database consist of more than one datafile? Judging from the error there are two usual causes:

  • Corrupt database
  • Database has multiple data files and it's trying to load page 191468 from the file with ID 5, but it hasn't been provided to the Database() constructor

As for RawDatabase - you should be able to just create a new RawDatabase(path) - does that not work?

Sorry 4 my poor explication.

Exactly This Is a corrupt DB, I can't mount in sql server (suspect mode) and I need read ONLY the last month from 3 tables ... please helpme.

The FIles are:

I3_IC_Data.mdf 116GB
I3_IC_DATA_2.ndf 3GB
I3_IC_Log111.ldf 400MB
IC_DATA4.ndf 104GB
IC_DATA_3.ndf 9.76GB

now I install from nuget in visual 2012, and call using OrcaMDF.Core.Engine;
where is the correct namespace to call RawDatabase?

image

Gotcha!

In that case you'll definitely need RawDatabase, seeing as Database won't work in any work with corrupt databases. Unfortunately RawDatabase isn't available through NuGet yet, so you'll have to clone the source directly.

For a general intro to RawDatabase:
http://improve.dk/orcamdf-rawdatabase-a-swiss-army-knife-for-mdf-files/

And for a walkthrough of recovering data:
http://improve.dk/sql-server-corruption-recovery-when-all-else-fails/

Do note that RawDatabase currently only supports files up to 2GB due to using File.ReadAllBytes, but if you modify that to read from the file directly, it'll support any size files.

thks ! im load correctly RawDatabase in my proyect VS2012, What mean "but if you modify that to read from the file directly" ??

how can I load big data in Rawdatabase function ?

Im trying doing, but VS dump: The file is too long. This operation is currently limited to supporting files less than 2 gigabytes in size.

image

If you pull the latest source it should support any size files. I haven't tested much, besides running the test suite, but please let me know if it works any better for you :)

Closing this one - let me know if there's any update :)