hi, do you have any idea on how to enable transation logging?
my database crushed and cant recover it becuase it has no transaction.
thank you very much!
regards.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi, thank you very much for the reply.
i look into opening the database with an environment. unfortunately im encountering this berkeley exception "Invalid argument". the code goes like this.
Env dbEnv = new Env(EnvCreateFlags.None); ;
dbEnv.ErrorPrefix = "Env_Err";
dbEnv.ErrorStream = new FileStream(System.IO.Path.Combine(dbPath, "Env_Err"),
FileMode.OpenOrCreate, FileAccess.ReadWrite);
hi, do you have any idea on how to enable transation logging?
my database crushed and cant recover it becuase it has no transaction.
thank you very much!
regards.
You must enable transactions before the crash. Now it won't help you anymore, your database cannot be restored without the log from before the crash.
Anyway, look at the flags for opening an environment or database.
Karl
hi, i was able to set the transaction successfully.
thank you very much!
have a nice day. =)
hi, thank you very much for the reply.
i look into opening the database with an environment. unfortunately im encountering this berkeley exception "Invalid argument". the code goes like this.
Env dbEnv = new Env(EnvCreateFlags.None); ;
dbEnv.ErrorPrefix = "Env_Err";
dbEnv.ErrorStream = new FileStream(System.IO.Path.Combine(dbPath, "Env_Err"),
FileMode.OpenOrCreate, FileAccess.ReadWrite);
dbEnv.Open(dbPath, Env.OpenFlags.Create | Env.OpenFlags.InitLog
| Env.OpenFlags.InitMPool | Env.OpenFlags.InitTxn, 0);
Db db = new Db(dbEnv, this.dbCreate);
db.ErrorPrefix = "Db_Err";
DbFile dbFile = db.Open(null, "Db", null, BerkeleyDb.DbType.BTree,
Db.OpenFlags.Create, 0);
im sorry about that, i accidentally press the Post Comment button.
the following is the complete code.
Env dbEnv = new Env(EnvCreateFlags.None); ;
dbEnv.ErrorPrefix = "Env_Err";
dbEnv.ErrorStream = new FileStream(System.IO.Path.Combine(dbPath, "Env_Err"),
FileMode.OpenOrCreate, FileAccess.ReadWrite);
dbEnv.Open(dbPath, Env.OpenFlags.Create | Env.OpenFlags.InitLog
| Env.OpenFlags.InitMPool | Env.OpenFlags.InitTxn, 0);
Db db = new Db(dbEnv, this.dbCreate);
db.ErrorPrefix = "Db_Err";
DbFile dbFile = db.Open(null, "Db", null, BerkeleyDb.DbType.BTree,
Db.OpenFlags.Create | Db.OpenFlags.AutoCommit, 0);
the error occurs in the db.Open. am i missing some flags?
maybe if you could please help me out. thank you very much!
have a nice day.