|
Dbloader/DbUnload database management toolsDbLoaderThe reference implementation of uPortal's data storage interfaces requires a relational database. uPortal provides a tool, DbLoader, to load a relational database with the required uPortal tables and sample data. DbLoader performs the following tasks:
DbLoader can be configured by modifying properties/dbloader.xml. Because DbLoader relies on database metadata supplied by a JDBC driver, it may be necessary (for some combinations of drivers and databases) to supply a datatype mapping inside dbloader.xml. If this is necessary, DbLoader will print an error message with instructions. To run DbLoader, type "ant db" from the uPortal base directory. The "db" target accepts command line arguments which override values read from the dbloader.xml file. The "db" target can be invoked thusly: To use /properties/mytables.xml instead of the tables file specified in dbloader.xml: ant db -Dusetable=-t -Dtablefile=/properties/mytables.xml
To use /properties/mydata.xml instead of the data file specified in dbloader.xml: ant db -Dusedata=-d -Ddatafile=/properties/mydata.xml
Note: the tables and data files can both be overridden by combining the arguments. The usetable and tablefile must be used in tandem and sequentially on the command line. Similarly, usedata and datafile must but used in tandem. Addtionally, several other boolean flags may be overridden.
To set createScript=true ant db -Dcreatescript=-c
To set createScript=false ant db -Dcreatescript=-nc
To set dropTables=true ant db -Ddroptables=-D
To set dropTables=false ant db -Ddroptables=-nD
To set createTables=true ant db -Dcreatetables=-C
To set createTables=false ant db -Dcreatetables=-nC
To set populateTables=true ant db -Dpopulatetables=-P
To set populateTables=false ant db -Dpopulatetables=-nP
The -c, -nc, -D, -nD, -C, -nC, -P, -nP arguements may all be used independantly or in any combination although it would not make sense to, for example, use both -c and -nc. DbUnloadDbUnload, can read an existing database table and serialize it into an xml file similar to tables.xml. This file can then be used in place of tables.xml to load another database. To run this target, you must specify the table name and output file parameters ant dbunload -Dtablename=up_channel -Dxmlfile=mytables.xml
|
JA-SIG Home About uPortal FAQ Download Documentation Getting Involved Code Repository Reporting Bugs License |