Moving Data Dir

1,834 views
Skip to first unread message

Matt

unread,
May 31, 2010, 2:23:25 AM5/31/10
to ravendb
working on the laptop today. This morning I copied data onto a USB key
and now in the coffee shop copied over to RavenDB on the laptop. Now I
get this?

C:\ravendb\Server>RavenDb.exe
System.InvalidOperationException: Could not open transactional
storage: C:\raven
db\Server\Data\Data --->
Microsoft.Isam.Esent.Interop.EsentErrorException: Error
AttachedDatabaseMismatch (JET_errAttachedDatabaseMismatch, An
outstanding datab
ase attachment has been detected at the start or end of recovery, but
database i
s missing or does not match attachment info)
at Microsoft.Isam.Esent.Interop.Api.Fail(Int32 err)
at Microsoft.Isam.Esent.Interop.Api.Check(Int32 err)
at Microsoft.Isam.Esent.Interop.Api.JetInit(JET_INSTANCE& instance)
at Raven.Database.Storage.TransactionalStorage.Initialize()
--- End of inner exception stack trace ---
at Raven.Database.Storage.TransactionalStorage.Initialize()
at Raven.Database.DocumentDatabase..ctor(RavenConfiguration
configuration)
at Raven.Server.RavenDbServer..ctor(RavenConfiguration settings)
at Raven.Server.Program.RunInDebugMode(Nullable`1
anonymousUserAccessMode)
at Raven.Server.Program.InteractiveRun(String[] args)
at Raven.Server.Program.Main(String[] args)

C:\ravendb\Server>

Matt

unread,
May 31, 2010, 4:16:50 AM5/31/10
to ravendb
Okay, I cant drive home at the moment, so trying to fix the data
myself.

Be warned do not run eseutil (from exchange) on it, I think the
versions are very specific and hence its makes things worse.

Ayende Rahien

unread,
May 31, 2010, 4:49:38 AM5/31/10
to rav...@googlegroups.com
Is it possible that you copied from different OS version?

Matt

unread,
May 31, 2010, 4:53:09 AM5/31/10
to ravendb
Both Windows7/64bit.

Trying to get someone to send me Ese.Dll/Eseutil.exe from an exchange
2007/svr2008/64bit install.

Should of copied using the backup but I was in a rush on first try it
errored - couldnt find the responder (didnt have time to investigate
so just copied Data dir to USB)



On May 31, 3:49 pm, Ayende Rahien <aye...@ayende.com> wrote:
> Is it possible that you copied from different OS version?
>

Ayende Rahien

unread,
May 31, 2010, 4:54:36 AM5/31/10
to rav...@googlegroups.com
Huh? You don't need that.

esentutl.exe (comes with windows) is the tool to use.
We aren't using the Exchange version.

Matt

unread,
May 31, 2010, 5:02:17 AM5/31/10
to ravendb
Grrr..

Why werent you awake 2 hours ago... :) Google fault - too many
articles and error messages relating Esent to Exchange.

esentutl worked. Back up and running.. Great !

Did recovert /r rvn /i first but didnt work, had to do repair (more
dangerous i believe) but seems to have worked well

Thanks



On May 31, 3:54 pm, Ayende Rahien <aye...@ayende.com> wrote:
> Huh? You don't need that.
>
> esentutl.exe (comes with windows) is the tool to use.
> We aren't using the Exchange version.
>

Ayende Rahien

unread,
May 31, 2010, 5:07:56 AM5/31/10
to rav...@googlegroups.com
Can you do a write up on what you did, so we can add it to the FAQ?

Laurion Burchall

unread,
May 31, 2010, 1:02:26 PM5/31/10
to ravendb
This is likely to happen if you move a database that hasn't been
shutdown cleanly. When ESENT is initialized it automatically runs
database recovery using the logfiles in the configured logfile path.
Logfiles store the full path to the database and recovery opens the
database using the path which is stored in the logfiles. That means
recovery won't work if you move the database has been moved.

Starting with Windows Server 2003 you can set the
AlternateDatabaseRecoveryPath to give ESENT a different place to look
for databases if they can't be found in the original path. I suggest
setting InstanceParameters.AlternateDatabaseRecoveryPath to the
current database directoy before initializing ESENT. That will let
recovery work on moved databases.
InstanceParameters.AlternateDatabaseRecoveryPath is ignored on Windows
XP.

--Laurion

Ayende Rahien

unread,
May 31, 2010, 5:55:20 PM5/31/10
to rav...@googlegroups.com
Thanks, the change will be pushed shortly
Reply all
Reply to author
Forward
0 new messages