Products Downloads


French version


 

The Database management tool can be run in automatic mode from a command file. The parameters specify the default values of the fields in the graphical interface. If "auto" mode or "no_gui" mode is specified, all the necessary parameters must be entered; alternatively, the user can enter details in the GUI.


The database management tool in batch mode only exists in the Java version, with functional restrictions: the administration tools are not available and "via middleware" mode is not implemented.

The Java command line syntax is as follows: 

java <javaOpts> com.hardis.adelia.dbtool.DbTool -<command>-descfile:<file_name> -database:<url_base>... 


The CLASSPATH must be configured to include the Adelia Java runtime, the configuration scripts and the necessary JDBC drivers. 


The following considerations must, however, be taken into account: 

  • To maximize compatibility with the Windows version, the text file encodings correspond by default to Windows Western settings (code page 1252 for the ANSI character set). However, the character set to use for no-BOM SQL scripts can be chosen via Java command line parameters:

- DansiCharset=<charset>  

Charset for ANSI inputs/outputs (scripts, delimited ASCII imports and IXF files). 

By default "Cp1252" ("ISO-8859-1" if not supported by the JVM). 


  • The log level and information displayed can be controlled by the command line (INFO by default):

- Dverbose  

Displays the detail of exceptions when there is an error.  

- Ddebug  

Enables DEBUG level in loggers.  

- Dtrace  

Enables TRACE level in loggers.  

- Dlog4j.external.configuration = true  

By default, the tool uses a LOG4J simplified configuration to limit the display to the relevant messages. 

If this option is specified, the log4j configuration will not be initialized by the tool (log4j2.xml loaded from the CLASSPATH). 



  • Generally speaking, the parameters indicating a file or directory name must be adapted to correspond to the syntax of the platform's file names (path separator, drive letters, etc.).
  • The Java version only works in batch mode and only supports a sub-assembly of features in the Windows version.
  • Administration tools are not supported: create/backup database, in particular create, backup, restore and delete options.
  • The "via middleware" execution mode is not supported.
  • Windows-specific instructions in the scripts are not implemented (registry test escape sequence).



If a utility is specified, but not in automatic mode, the tool will start directly on the page associated with the requested action.


Parameters are set generically on the command line:


-param

for parameters not requiring a value.

-param:integer_value

for parameters taking a numerical value.

-param:"string value"

for parameters taking a string value.


The valid parameters are summarized in the tables below:

(X : Mandatory)

(O : Optional)

(Blank : ignored)


Utilities

Parameter

Description

Cr

Ct

Bk

Rs

Dl

E

I

C

U

Dt

create*

Creates a database

X










create_tables

Creates table structures


X









backup*

Saves a database



X








restore*

Restores a database




X







delete*

Deletes a database





X






export

Exports a database






X





import

Imports a database







X




copy

Copys data between two databases








X



update

Updates table structures









X


drop_tables

Deletes table structures










X

* Not supported in the Java version


General parameters

Parameter

Description

Cr

Ct

Bk

Rs

Dl

E

I

C

U

Dt

descfile

Full name of the database's file description

X

X

X

X

X

X

X

X

X

X

logfile

Full name of the log file

O

O

O

O

O

O

O

O

O

O

dbm*

Name of the database manager

Possible values: "db2", "oracle", sql server", "btrieve", "ODBC", "AS400", "MySQL"

The "oracle7" and "oracle8" values are supported for compatibility reasons.

X

X

X

X

X

X

X

X

X

X

database

Name or the URL access of the source database or name of the AS/400 database by default

X

X

X

X

X

X

X

X

X

X

user

Connection profile to the origin database


O




O

O

O

O

O

password

Password for the connection


O




O

O

O

O

O

dest_dbm*

Name of the destination database manager

Possible values: "db2", "oracle", sql server", "btrieve", "ODBC", "AS400", "MySQL"

The "oracle7" and "oracle8" values are supported for compatibility reasons.








X



dest_database

Name of the destination database








X



dest_user

Connection profile to the destination database








O



dest_password

Password for the connection








O



bt_dir*

Directory for source files (Btrieve database)


X




X

X

X


X

dest_bt_dir*

Directory for destination files (Btrieve database)






X

X

X



directory*

Directory for import/export operations






X

X
















no_gui*

No graphical interface ("auto" is mandatory)

O

O

O

O

O

O

O

O

O

O

auto*

Starts running the tool with no user interaction

O

O

O

O

O

O

O

O

O

O

report_mode*

Monitors the message box display: full, sum of authorized message types (1: complete, 2: warning, 4: error) 

O

O

O

O

O

O

O

O

O

O

no_input*

No user action. Shortcut for
(-report_mode:0 -auto)

O

O

O

O

O

O

O

O

O

O

host*

Host name of the server (AS/400 or via Middleware - 910 by default)

O

O



O

O

O

O

O

X

port*

Connection port on the server (AS/400 or via Middleware)

X

X



X

X

X

X

X

O

miduser*

User name for the connection to the server (AS/400 or via Middleware)

X

X



X

X

X

X

X

X

midpassword*

Password for the connection to the server (AS/400 or via Middleware)

X

X



X

X

X

X

X

X

curlib*

Default library or schema (AS/400)


O




O

O

O

O

O

logged*

Operation in logged mode (AS/400) – requires the tables to be explicitly logged or created in a collection on the AS/400.

In creation mode this parameter creates an SQL collection.

Autocommit mode (logged = 0) by default.


O




O

O

O

O

O

dest_host*

Host name of the server for the target AS/400 (AS/400 or via Middleware - 910 by default)








X



dest_port*

Connection port on the server for the target AS/400 (AS/400 or via Middleware)








X

O


dest_miduser*

User name for the connection to the target server (AS/400 or via Middleware)








X



dest_midpassword*

Password for the connection to the target server (AS/400 or via Middleware)








X



dest_curlib*

Default library or schema for the target AS/400 (AS/400)








O



* Not supported in the Java version


The following sections only apply to administration features (parameters to create, backup, restore and delete a database) and therefore, do not apply to the Java version.


AS/400 parameters

Parameter

Description

Cr

Ct

Bk

Rs

Dl

E

I

C

U

Dt

description

Description of the library

X










num_asp

ASP number (between 1 and 32; default value: 1)

O











DB2 parameters

Parameter

Description

Cr

Ct

Bk

Rs

Dl

E

I

C

U

Dt

database_unit

Disk unit for the database

X



X







database_comment

Comment about the database

O










backup_directory

Directory for the backup image



X

X







orig_database

Original name of the database corresponding to the backup image




X







timestamp

Timestamp for the backup image to be restored, in the form YYYYMMDDHHMISS




O







force_overwrite

Overwrites an existing database without confirmation




O








ORACLE parameters

Parameter

Description

Cr

Ct

Bk

Rs

Dl

E

I

C

U

Dt

database_sid

SID of the database
Warning: 4 characters if Oracle < 8.1

X



X







database_directory

Directory for the database

X



X







database_password

Internal password for the database

X


X

X

X






backup_directory

Directory for the backup image



X

X







database_init_file

Parameter file for the database



X

X

X






force_shutdown

Forces the shutdown of current sessions



O

O

O






force_overwrite

Overwrites an existing database without confirmation




O







data_tablespace

Table space for tables (and indexes if there is no specific configuration)

O

O







O


index_tablespace

Table space for indexes

O

O







O



SQL SERVER parameters

Parameter

Description

Cr

Ct

Bk

Rs

Dl

E

I

C

U

Dt

data_file

Name of the data file

X










data_file_size

Initial size of the data file

O










data_file_size_max

Maximum size of the data file (if -1, unlimited)

O










data_file_size_inc

Size of the data file's increments

O










log_file

Name of the log file

X










log_file_size

Initial size of the log file

O










log_file_size_max

Maximum size of the log file (if -1, unlimited)

O










log_file_size_inc

Size of the log file's increments

O










backup_device

Name of the backup device



X

X







backup_number

Backup number in the backup device



X

X







move_files

"Renaming" of files - series of pairs
origin name,new name separated by " ;"

Ex: "d:\data\test.dat,d:\data\test_bis.dat; d:\data\test.log,d:\data\test_bis.log"




O







force_overwrite

Overwrites an existing database without confirmation




O








MySQL parameters

Parameter

Description

Cr

Ct

Bk

Rs

Dl

E

I

C

U

Dt

user

User with MySQL server administration rights (eg: root)

X




X






password

User password

X




X







PostgreSQL parameters

Parameter

Description

Cr

Ct

Bk

Rs

Dl

E

I

C

U

Dt

user

User with PostgreSQL server administration rights (eg: postgres)

X




X






password

User password

X




X







ODBC (Access) parameters

Parameter

Description

Cr

Ct

Bk

Rs

Dl

E

I

C

U

Dt

database_directory

Directory in which the database file will be created (database_name.mdb)

X












Examples:

Creation of a DB2 TEST base on C, with no user interaction:

start /wait dbtool -descfile:"adelia.dbd" -create -dbm:"db2" -database:"TEST" -database_unit:C -database_comment:"test creation" -logfile:"c:\temp\test.log" -auto


Restoration of the DB2 TEST base on C from the BASETEST backup image on d:\backup, with no user interaction:

start /wait dbtool -descfile:"adelia.dbd" -restore -dbm:"db2" -database:"TEST" -database_unit:C -orig_database:"BASETEST" -backup_directory:"d:\backup" -logfile:"c:\temp\test.log" -auto


↑ Top of page

  • Aucune étiquette