These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Problems importing static data export in MSSQL 2012 LocalDB

Author
Snus Mumriken
Deep Core Mining Inc.
Caldari State
#1 - 2012-11-20 08:15:28 UTC
I tried to import the Inferno 1.2 dump into LocalDB yesterday but always got the same error. I used the T-SQL that others suggested here on the forums:

  1. RESTORE DATABASE inferno76477
  2. FROM DISK = 'g:\projects\eve\inferno_1.2_76477_db\DATADUMP201208080939.bak'
  3. WITH
  4. REPLACE,
  5. RECOVERY,
  6. MOVE 'ebs_DATADUMP' TO 'g:\databases\inferno76477.mdf',
  7. MOVE 'ebs_DATADUMP_log' TO 'g:\databases\inferno76477.ldf',
  8. STATS = 5
  9. GO

But this always resulted in the same error, which did not make sense to me as the file clearly was exported:

  • Processed 57144 pages for database 'inferno76477', file 'ebs_DATADUMP' on file 1.
  • Processed 2 pages for database 'inferno76477', file 'ebs_DATADUMP_log' on file 1.
  • The logical database file 'ebs_DATADUMP_log' cannot be found. Specify the full path for the file.


Then I came up with another idea: Drop the database, but keep the files and create a new database using these files. Since it was in restore mode that brought some difficulties, but in the end it worked. It properly upgraded the database version. Then I could browse the tables which also contained data - so everything seems to be fine.

The final result is this pastie.
If anyone has a better idea, I'm open for suggestions!


One remark: I want to use LocalDB to be able to easily import (and convert/export) a new static data export via scripts, without the need to run a "full" SQL server service etc.

I'm on Twitter.