Archived
This forum has been archived. Please start a new discussion on GitHub.
how can i set the value of env-name?
fanson
in Help Center
something about Freeze.DbEnv.env-name.xxx of Freeze Properties in my ICE config file.
i can create a connection like this:
for example, my data file are stored in /opt/btsys/ (absolute pathname), and there are several freeze maps in this directory. what's the corresponding env-name? is Freeze.DbEnv./opt/btsys/.xxx ok? i just don't know how to do this in my config file.
i can create a connection like this:
Freeze::createConnection(_communicator, "opt/btsys/");"/opt/btsys/" is the env-name here. am i right?
for example, my data file are stored in /opt/btsys/ (absolute pathname), and there are several freeze maps in this directory. what's the corresponding env-name? is Freeze.DbEnv./opt/btsys/.xxx ok? i just don't know how to do this in my config file.
0
Comments
-
Hi,
Yes, by default, the location of the database environment home directory is the environment name. However, you can use a simpler environment name and set the Freeze.DbEnv.env‑name.DbHome property instead (for example, you can use "MyDB" as the environment name and set Freeze.DbEnv.MyDB.DbHome to "/opt/btsys").
See the Ice manual for more information.
Cheers,
Benoit.0 -
benoit wrote: »You can use the -h option to specify the location of the database environment with db_stat.
Cheers,
Benoit.
i use this command line:db_stat -h /opt/btsys -m
error occurs: db_stat: DB_ENV->open: /opt/btsys: No such file or directory. but i am quite sure the directory exists and permissions are ok.0 -
That's most likely because the database environment files don't exist in the directory pointed by the "-h" option.
You need to run your Freeze server (with the Freeze.DbEnv.<dbenv>.DbPrivate property set to 0) first in order to be able to run db_stat. I recommend looking at the BerkeleyDB documentation for more information.
Cheers,
Benoit.0 -
benoit wrote: »That's most likely because the database environment files don't exist in the directory pointed by the "-h" option.
You need to run your Freeze server (with the Freeze.DbEnv.<dbenv>.DbPrivate property set to 0) first in order to be able to run db_stat. I recommend looking at the BerkeleyDB documentation for more information.
Cheers,
Benoit.
i do it like thisFreeze.DbEnv.bt.DbHome=/opt/btsys/ Freeze.DbEnv.bt.DbPrivate=0
but still no effect0 -
benoit wrote: »Is your Freeze application also running when you run db_stat? Do you have files prefixed with "__db.00" in the database environment directory?
Cheers,
Benoit.
1.yes. my application is running when i run db_stat
2.no. there are no such files (__db.xxx) in my database environment directory.0 -
If you don't have these files, it most likely indicates that your database environment is still private. How do you create the Freeze connection in your program? Are you correctly using "bt" for the database environment parameter?
Also, which Ice version are you using?
Cheers,
Benoit.0 -
benoit wrote: »If you don't have these files, it most likely indicates that your database environment is still private. How do you create the Freeze connection in your program? Are you correctly using "bt" for the database environment parameter?
Also, which Ice version are you using?
Cheers,
Benoit.
thanks very much.
i've found the problem. when i created the Freeze connection i used "/opt/btsys" as the database environment parameter. but that should be "bt".
such a stupid mistake
thanks for your response0
