You are here: Advanced Features > Enhancement Tools > Db4otool > Db4oTool Usage

Db4oTool Usage

Db4oTool is a command line utility. The general syntax is the following:

Usage: Db4oTool [options] <assembly>

[options] parameter allows to specify a list of options.

<assembly> parameter allows to pass an assembly, which should be optimized.

Both parameters are optional.

Running Db4oTool.exe without any parameters will bring you a short usage hint. This is equivalent to running Db4oTool with -? or -help parameter. Additional help information can be retrieved with -help2 or -usage parameters.

The table below gives an explanation of all Db4oTool options.

-by-attribute:PARAM

Filter types to be instrumented by attribute:

Db4oTool -ta -byattribute:Activatable MyAssembly.exe

-by-filter:PARAM

Custom type filter:

Db4oTool -ta -byfilter:IActivatable MyAssembly.exe

-by-name:PARAM

Filter types by name (with regular expression syntax):

Db4oTool -ta -byname:MyCompany.MyProduct MyAssembly.exe

-not

Negate the last filter

Db4oTool -ta -byname:Db4objects.Db4o -not MyAssembly.exe

-case-sensitive

Specifies if optimized queries should be case-sensitive. This option should be used in conjunction with query optimization option (nq):

Db4oTool -nq -case-sensitive MyAssembly.exe

-collections

Instrument native collections for transparent activation/persistence.

Db4oTool -collections -tp MyAssembly.exe

-debug

Preserves the debug information, to step through enhanced assemblies with the debugger.

Db4oTool -debug -tp -byattribute:Activatable MyAssembly.exe

-fake

Fake operation mode, assembly won't be written. This option can be used for testing before the actual run.

Db4oTool -nq -fake MyAssembly.exe

-? -help

Show standard help list:

Db4oTool -help

-help2

Show an additional help list (development use):

Db4oTool -help2

-install-performance-counters

Enables performance counters for this assembly:

Db4oTool -install-performance-counters MyAssembly.exe

-instrumentation:PARAM

Use custom instrumentation type.

PARAM is a string with a full class definition, like

Db4oTool.AbstractAssemblyInstrumentation, Db4oTool.exe.

This class must implement Db4oTool.IAssemblyInstrumentation interface. To make the creation of a custom instrumentation class easier db4o provides Db4oTool.AbstractAssemblyInstrumentation class, which can be used as a template. For an example implementation see Db4oTool.TAInstrumentation class.

-nq

Optimize Native Queries

Db4oTool -nq MyAssembly.exe

-ta

Instrument classes to support Transparent Activation:

Db4oTool -ta MyAssembly.exe

-tp

Instrument classes to support Transparent Persistence (Transparent Activation support is included implicitly):

Db4oTool -tp MyAssembly.exe

-statistics:PARAM Shows statistic information about the database. For example Db4oTool -statistics databaseFile.db4o

-usage

Show usage syntax and exit:

Db4oTool -usage

-v -verbose

Verbose operation mode. Should be combined with the other options:

Db4oTool -ta -v MyAssembly.exe

-V -version

Display version and licensing information:

Db4oTool -V

-vv

Pretty verbose operation mode:

Db4oTool -ta -vv MyAssembly.exe