You can import the updated device repository into instances
of the Multi-Channel Server (MCS)
database.
About this task
Copy the updated device repository file to a
WebSphere® Portal server
and use the
mcsImport command to import the device
repository into a
DB2®,
Oracle, or Microsoft SQL Server database.
Note: This command is located
in the
wp_root/repository/bin directory
on the
WebSphere Portal server.
Procedure
- Run the following command to ensure
that the WebSphere environment is set up correctly:
- Use the appropriate database-specific commands
to add the JDBC driver to your current CLASSPATH environment
variable, as illustrated in the following examples:
(version
9.1 (with fix pack 5) or
9.5 (with fix pack 3))
CLASSPATH=db_root/db2instance/sqllib/java/db2jcc.jar:
db_root/db2instance/sqllib/java/db2jcc_license_cu.jar:$CLASSPATH
export CLASSPATH
(version
9.7)
CLASSPATH=db_root/db2instance/sqllib/java/db2jcc4.jar:
db_root/db2instance/sqllib/java/db2jcc_license_cu.jar:$CLASSPATH
export CLASSPATH
Note: If DB2 and WebSphere Portal are
not installed on the same machine, specify the path to where the files
are located on the WebSphere Portal server.
CLASSPATH=oracle_driver_path/ojdbc6.jar:$CLASSPATH
export CLASSPATH
MS SQLCLASSPATH=mssql_driver_path\sqljdbc4.jar:$CLASSPATH
export CLASSPATH
- Change your working directory to wp_root/wp.mobile/wp.mobile.mcs/repository/bin.
- To import the updated device repository, run the mcsImport command,
as in the following example:
mcsImport -vendor database-vendor-type
-host database-hostname
-port db-port-number
-source mcs-database-name
-user db-username
-password db-password
-device
-devicerepository device-repository-path
-updateall
-enableundo
-project mobile-portal
-srcdir directory
where:- database-vendor-type is
either db2-type4, oracle, mssql-ms (for Microsoft SQL 2000 or 2008),
or mssql-jsql (for Microsoft SQL 2005 or 2008 with the NetDirect JDBC
Driver).
- database-hostname is
the hostname of the database server for the Multi-Channel Server database
- db-port-number is the
port number used by the database driver to access the Multi-Channel
Server database
- mcs-database-name is
the name of the Multi-Channel Server database. If Oracle Database
is being used, this parameter is the Oracle SID.
- db-username is either the
user name of the DB2 instance user or the Multi-Channel Server Oracle
database user name.
- db-password is the password
of the database user.
- device-repository-path is
the path to the device repository file that ends with an .mdpr file
extension.
- directory is the path to the directory containing
the device repository file.
For a complete list of the command parameters, refer to the
topic Importing and exporting repositories in the Multi-Channel Server portion
of this information center.
What to do next
It is recommended that you distribute the updated device
repository file to users of the
Mobile Portal Toolkit who
are creating
MCS policies,
or who are testing their portlets in the toolkit test environment.
If the updated device repository file is renamed or placed in a new
location on the file system, the
Mobile Portal Toolkit user
must configure the
MCS runtime
and existing projects to find the new file. See the
Mobile Portal Toolkit online
help for more details.