ycherkes / OrcaSql

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
17 stars 7 forks source link

System.ArgumentOutOfRangeException #5

Closed atrdev-rgb closed 1 year ago

atrdev-rgb commented 1 year ago

System.ArgumentOutOfRangeException:The specified argument is out of range.

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

in OrcaSql.Core.Engine.BufferManager.GetPageBytes(Int16 fileID, Int64 pageID, Boolean putResultToCache) BufferManager.cs:string 36 in OrcaSql.Core.Engine.Database.GetPageBytes(PagePointer pagePointer, Boolean putResultsToCache) Database.cs:string 138 in OrcaSql.Core.Engine.Database.GetPfsPage(PagePointer loc) Database.cs:string 236 in OrcaSql.Core.Engine.DataScanner.d8.MoveNext() DataScanner.cs:string 164 in OrcaSql.Core.Engine.DataScanner.d7.MoveNext() DataScanner.cs:string 149 in System.Linq.Enumerable.d17`2.MoveNext() in System.Linq.Enumerable.d251.MoveNext() in OrcaSql.OSMS.Main.ShowRows(IEnumerable1 rows, Row schemaRow, String tableName, Int64 rowCount) Main.cs:string 514 in OrcaSql.OSMS.Main.LoadTable(String table, Nullable`1 schemaId, Int64 rowCount) Main.cs:string 450

sql server 2014 i open mdf file

here it crashes for me: rows = scanner.ScanTable(table, schemaId, false).Take(takeRowCount)

I also have a LogCur.ndf file for this project

ycherkes commented 1 year ago

Hi, have you tried choosing multiple files (mdf+ndf) in the open dialog?

atrdev-rgb commented 1 year ago

I'm sorry I didn't notice for that, tomorrow I will definitely look and writing

ycherkes commented 1 year ago

I'm sorry I didn't notice for that, tomorrow I will definitely look and writing

Yeah, this tool is not such smart as SQL Server. So you must explicitly specify all the files.