+

Search Tips   |   Advanced Search

Set up an entry mapping repository, a property extension repository, or a custom registry database repository using wsadmin commands


We can set up an entry mapping repository, a property extension repository, or a custom registry database repository using wsadmin commands.

If setting up an entry mapping repository, begin with the steps described in Set an entry mapping repository in a federated repository configuration.

If we are setting up a property extension repository, begin with the steps described in Set a property extension repository in a federated repository configuration.

By creating a repository, use the appropriate wsadmin commands to define the database schema and to populate the database property definitions.

 

  1. Create the database. Use any relational database product.

    The following examples give you tips for specific vendors.

    1. For DB2, open a DB2 command window or command center and enter the following:

      db2 create database <name> using codeset UTF-8 territory US
      
      Enter the following database tuning commands:

      db2 update database configuration for <name> using applheapsz 1024 db2 update database configuration for <name> using stmtheap 4096  db2 update database configuration for <name> using app_ctl_heap_sz 2048 db2 update database configuration for <name> using locklist 1024 db2 update database configuration for <name> using indexrec RESTART  db2 update database configuration for <name> using logfilsiz 1000  db2 update database configuration for <name> using logprimary 12  db2 update database configuration for <name> using logsecond 10  db2 update database configuration for <name> using sortheap 2048 db2set DB2_RR_TO_RS=yes
      
      

    2. For Informix databases using dbaccess...

      CREATE DATABASE <name> WITH BUFFERED LOG
      

    3. For Oracle databases, the database should already exist during Oracle installation (for example, orcl).

  2. Run the setupIdMgrEntryMappingRepositoryTables command, the setupIdMgrPropertyExtensionRepositoryTables command, or the setupIdMgrDBTables command (for custom registry repositories) by doing the following:

    1. Start WAS.

    2. Open a command window and go to the <WAS>/Profiles/<PROFILE_NAME>bin directory.

    3. Start wsadmin.

    4. Type the necessary commands as described below.

 

Next steps

Use these commands, we can:

The -file option enables you to specify a file in which some or all of the parameters are specified. To use the -file argument on the command line, enter the full path to the file. Parameters in the file must be specified in key=value pairs and each must be on its own line. If a parameter is specified on both the command line and in the file, the value on the command line takes precedence.

Tips for diagnosing argument errors:

The setupIdMgrDBTables command:

The setupIdMgrDBTables command creates, and populates the tables in the database that you previously created. Required arguments are prefixed by a double start (**). Arguments are case-sensitive, both through the command line and the file. Parameters:

**schemaLocation (String)

The location of the <WAS>/etc/wim/setup directory.

dbPropXML (String)

The location of database repository property definition XML file.

**databaseType (String)

The type of database. Supported databases are db2, oracle, informix, derby, sqlserver, db2zos, and db2iseries.

**dbURL (String)

The database URL for direct access mode. For example: jdbc:db2:wim.

dbDriver (String)

The name of the database driver. For example: com.ibm.db2.jcc.DB2Driver.

dbAdminId (String)

The database administrator ID for direct access mode. For example: db2admin.

For a Apache Derby v10.2 embedded database, dbAdminId is not required.

dbAdminPassword (String)

The password associated with the dbAdminId.

For a Apache Derby v10.2 embedded database, dbAdminPassword is not required.

dn (String)

The default organization uniqueName to replace. For example: o=yourco. If it is not set, o=Default Organization is used.

wasAdminId (String)

The WAS admin user ID. The ID should be a short name, not a uniqueName. For example: wasadmin. After creation, the uniqueName is uid=wasadmin, <defaultOrg>.

wasAdminPassword (String)

The WAS admin user password. If wasAdminId is set, then this parameter is mandatory.

saltLength (Integer)

The salt length of the randomly generated salt for password hashing.

encryptionKey (String)

The password encryption key. Set the password encryption key to match the encryption key in the wimconfig.xml file for the repository. If the encryption key is not set, the default is used.

derbySystemHome (String)

The home location of the Apache Derby v10.2 system if we are setting up a Apache Derby v10.2 database.

reportSqlError (String)

Whether to report SQL errors while setting up databases.

file (String)

The full path to a file containing the input parameters. Each input parameter must match a corresponding parameter as it would be typed on the command line, and it must be placed in a key=value pair. Each pair must be on a separate line.

The deleteIdMgrDBTables command:

The deleteIdMgrDBTables command deletes the tables in the database. Parameters:

**schemaLocation (String)

The location of the <WAS>/etc/wim/setup directory.

**databaseType (String)

The type of database. Supported databases are db2, oracle, informix, derby, sqlserver, db2zos, and db2iseries.

**dbURL (String)

The database URL for direct access mode. For example: jdbc:db2:wim.

dbDriver (String)

The name of the database driver. For example: com.ibm.db2.jcc.DB2Driver.

dbAdminId (String)

The database administrator ID for direct access mode. For example: db2admin.

For a Apache Derby v10.2 embedded database, dbAdminId is not required.

dbAdminPassword (String)

The password associated with the dbAdminId.

For a Apache Derby v10.2 embedded database, dbAdminPassword is not required.

derbySystemHome (String)

The home location of the Apache Derby v10.2 system if we are setting up a Apache Derby v10.2 database.

reportSqlError (String)

Whether to report SQL errors while setting up databases.

file (String)

The full path to a file containing the input parameters. Each input parameter must match a corresponding parameter as it would be typed on the command line, and it must be placed in a key=value pair. Each pair must be on a separate line.

The setupIdMgrPropertyExtensionRepositoryTables command:

The setupIdMgrPropertyExtensionRepositoryTables command sets up the property extension repository, which includes creating and populating the tables in the database. Parameters:

**schemaLocation (String)

The location of the <WAS>/etc/wim/setup directory.

laPropXML (String)

The location of the property extension repository definition XML file.

**databaseType (String)

The type of database. Supported databases are db2, oracle, informix, derby, sqlserver, db2zos, and db2iseries.

**dbURL (String)

The database URL for direct access mode. For example: jdbc:db2:wim.

dbAdminId (String)

The database administrator ID for direct access mode. For example: db2admin.

For a Apache Derby v10.2 embedded database, dbAdminId is not required.

dbAdminPassword (String)

The password associated with the dbAdminId.

For a Apache Derby v10.2 embedded database, dbAdminPassword is not required.

derbySystemHome (String)

The home location of the Apache Derby v10.2 system if we are setting up a Apache Derby v10.2 database.

reportSqlError (String)

Whether to report SQL errors while setting up databases.

file (String)

The full path to a file containing the input parameters. Each input parameter must match a corresponding parameter as it would be typed on the command line, and it must be placed in a key=value pair. Each pair must be on a separate line.

The deleteIdMgrPropertyExtensionRepositoryTables command:

The deleteIdMgrPropertyExtensionRepositoryTables command deletes the tables in the property extension database. Parameters:

**schemaLocation (String)

The location of the <WAS>/etc/wim/setup directory.

**databaseType (String)

The type of database. Supported databases are db2, oracle, informix, derby, sqlserver, db2zos, and db2iseries.

**dbURL (String)

The database URL for direct access mode. For example: jdbc:db2:wim.

dbDriver (String)

The name of the database driver. For example: com.ibm.db2.jcc.DB2Driver.

dbAdminId (String)

The database administrator ID for direct access mode. For example: db2admin.

For a Apache Derby v10.2 embedded database, dbAdminId is not required.

dbAdminPassword (String)

The password associated with the dbAdminId.

For a Apache Derby v10.2 embedded database, dbAdminPassword is not required.

derbySystemHome (String)

The home location of the Apache Derby v10.2 system if we are setting up a Apache Derby v10.2 database.

reportSqlError (String)

Whether to report SQL errors while setting up databases.

file (String)

The full path to a file containing the input parameters. Each input parameter must match a corresponding parameter as it would be typed on the command line, and it must be placed in a key=value pair. Each pair must be on a separate line.

The setupIdMgrEntryMappingRepositoryTables command:

The setupIdMgrEntryMappingRepositoryTables command sets up the entry mapping repository, which includes creating and populating the tables of the repository. Parameters:

**schemaLocation (String)

The location of the <WAS>/etc/wim/setup directory.

**databaseType (String)

The type of database. Supported databases are db2, oracle, informix, derby, sqlserver, db2zos, and db2iseries.

**dbURL (String)

The database URL for direct access mode. For example: jdbc:db2:wim.

dbDriver (String)

The name of the database driver. For example: com.ibm.db2.jcc.DB2Driver.

dbAdminId (String)

The database administrator ID for direct access mode. For example: db2admin.

For a Apache Derby v10.2 embedded database, dbAdminId is not required.

dbAdminPassword (String)

The password associated with the dbAdminId.

For a Apache Derby v10.2 embedded database, dbAdminPassword is not required.

derbySystemHome (String)

The home location of the Apache Derby v10.2 system if we are setting up a Apache Derby v10.2 database.

reportSqlError (String)

Whether to report SQL errors while setting up databases.

file (String)

The full path to a file containing the input parameters. Each input parameter must match a corresponding parameter as it would be typed on the command line, and it must be placed in a key=value pair. Each pair must be on a separate line.

The deleteIdMgrEntryMappingRepositoryTables command:

The deleteIdMgrEntryMappingRepositoryTables command deletes the tables in the entry mapping repository. Parameters:

**schemaLocation (String)

The location of the <WAS>/etc/wim/setup directory.

**databaseType (String)

The type of database. Supported databases are db2, oracle, informix, derby, sqlserver, db2zos, and db2iseries.

**dbURL (String)

The database URL for direct access mode. For example: jdbc:db2:wim.

dbDriver (String)

The name of the database driver. For example: com.ibm.db2.jcc.DB2Driver.

dbAdminId (String)

The database administrator ID for direct access mode. For example: db2admin.

For a Apache Derby v10.2 embedded database, dbAdminId is not required.

dbAdminPassword (String)

The password associated with the dbAdminId.

For a Apache Derby v10.2 embedded database, dbAdminPassword is not required.

derbySystemHome (String)

The home location of the Apache Derby v10.2 system if we are setting up a Apache Derby v10.2 database.

reportSqlError (String)

Whether to report SQL errors while setting up databases.

file (String)

The full path to a file containing the input parameters. Each input parameter must match a corresponding parameter as it would be typed on the command line, and it must be placed in a key=value pair. Each pair must be on a separate line.

Sample command line usage: To set up a database using the command line, enter the following:

$AdminTask setupIdMgrDBTables {-schemaLocation "C:\WAS7\etc\wim\setup" -dbPropXML 
"C:\WAS7\etc\wim\setup\wimdbproperties.xml" -databaseType db2
-dbURL jdbc:db2:wim -dbAdminId db2admin 
-dbDriver com.ibm.db2.jcc.DB2Driver -dbAdminPassword db2adminPwd 
-reportSqlError true}

To delete database tables using the command line, enter the following:

$AdminTask deleteIdMgrDBTables {-schemaLocation "C:\WAS7\etc\wim\setup" 
-databaseType db2  -dbURL jdbc:db2:wim -dbAdminId db2admin 
-dbDriver com.ibm.db2.jcc.DB2Driver -dbAdminPassword db2adminPwd 
-reportSqlError true}


To set up a property extension repository using the command line, enter the following:

$AdminTask setupIdMgrPropertyExtensionRepositoryTables {-schemaLocation 
"C:\WAS7\etc\wim\setup"
-laPropXML "C:\WAS7\etc\wim\setup\wimlaproperties.xml" -databaseType db2 
-dbURL jdbc:db2:wim -dbAdminId db2admin -dbDriver com.ibm.db2.jcc.DB2Driver 
-dbAdminPassword db2adminPwd -reportSqlError true}


To delete a property extension repository using the command line, enter the following:

$AdminTask deleteIdMgrPropertyExtensionRepositoryTables {-schemaLocation "C:\WAS7\etc\wim\setup " 
-databaseType db2 -dbURL jdbc:db2:wim -dbAdminId db2admin -dbDriver  com.ibm.db2.jcc.DB2Driver -dbAdminPassword db2adminPwd -reportSqlError true}


To set up an entry mapping repository using the command line, enter the following:

$AdminTask setupIdMgrEntryMappingRepositoryTables {-schemaLocation "C:\WAS7\etc\wim\setup" 
-databaseType db2 -dbURL jdbc:db2:wim -dbAdminId db2admin -dbDriver  com.ibm.db2.jcc.DB2Driver -dbAdminPassword db2adminPwd -reportSqlError true}


To delete an entry mapping repository using the command line, enter the following:

$AdminTask deleteIdMgrEntryMappingRepositoryTables {-schemaLocation "C:\WAS7\etc\wim\setup" 
-databaseType db2 -dbURL jdbc:db2:wim -dbAdminId db2admin -dbDriver  com.ibm.db2.jcc.DB2Driver -dbAdminPassword db2adminPwd -reportSqlError true}


Sample CLI Usage using -file option: To set up a database with the -file option using the example params.txt file below, enter the following:

$AdminTask setupIdMgrDBTables {–file C:\params.txt -dbPropXML 
"C:\OverrideDBPropParam\wimdbproperties.xml"}


Params.txt

schemaLocation=C:\WAS7\etc\wim\setup dbPropXML=C:\Program Files\IBM\WebSphere\AppServer\profiles\default
\config\cells\mycell\wim\config\wimdbproperties.xml laPropXML=C:\Program Files\IBM\WebSphere\AppServer\profiles\default
\config\cells\mycell\wim\config\wimlaproperties.xml databaseType=db2 dbURL=jdbc:db2:wim dbDriver=com.ibm.db2.jcc.DB2Driver reportSqlError=true dn=o=db.com dbAdminId=db2admin dbAdminPassword=dbPassword wasAdminId=wasadmin wasAdminPassword=wasadmin1

To set up a database with the -file option using a file only, enter the following:

$AdminTask setupIdMgrDBTables {-file C:\params.txt}


The use of a file only works if -file is the only parameter specified on the command line. If other parameters are specified then the file is completely ignored, and only the parameters on the command line are used to execute the command.

 

Related tasks


Set the WAS data source
Set an entry mapping repository in a federated repository configuration
Set a property extension repository in a federated repository configuration

 

Related


Entry mapping repository settings
Property extension repository settings