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

You can set up an entry-mapping repository, a property extension repository, or a custom registry database repository by using the commands in the IdMgrDBSetup command group.

Before you begin

If you are setting up an entry-mapping repository, begin with the steps that are described in Configuring an entry mapping repository in a federated repository configuration.

If you are setting up a property extension repository, begin with the steps that are described in Configuring a property extension repository in a federated repository configuration.

About this task

When you create a repository, use the appropriate wsadmin commands to define the database schema and to populate the database property definitions.

Procedure

  1. Create the database.
    You can use any relational database product. The following examples offer 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 db cfg for <name> using sheapthres_shr MANUAL
      db2 update database configuration for <name> using sortheap 2048
    2. Optional: For Informix® databases using dbaccess, enter the following command:
      CREATE DATABASE <name> WITH BUFFERED LOG
    3. Optional: For Oracle databases, the database already exists 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 WebSphere® Application Server.
    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 in the next section.

What to do next

Using these commands, you can:
  • Specify the arguments on the command line.
  • Specify the arguments in a file.

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:

  • If an argument is not properly specified on the command line or in the file, a message is returned which states that the argument was not properly specified. This might mean that the argument was not specified at all or was required for a given configuration but was not specified.
  • If the argument was not specified at all, check that the parameter is specified on the command line or in the file, and that it is properly spelled and has matching case.
  • If the argument was required for a configuration but was not specified, it is possible that a value is not required solely by the command but is required for the type of database and configuration you are setting.

    For example, if you set the dn, wasAdminId, or wasAdminPassword parameters, you must also specify the dbDriver parameter.

    Additionally, if the dn, wasAdminId or wasAdminPassword parameters are specified, and the databaseType is not an Apache Derby v10.2 database, then the dbAdminId and dbAdminPassword parameters must also be specified.

Command line examples:

  • deleteIdMgrDBTables
To set up a database using the command line, enter the following:
$AdminTask setupIdMgrDBTables {-schemaLocation "C:/WAS/etc/wim/setup" -dbPropXML 
"C:/WAS/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:/WAS/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:/WAS/etc/wim/setup"
-laPropXML "C:/WAS/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:/WAS/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:/WAS/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:/WAS/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 following example params.txt file, enter the following lines:
$AdminTask setupIdMgrDBTables {-file C:/params.txt -dbPropXML 
"C:/OverrideDBPropParam/wimdbproperties.xml"}

Params.txt
schemaLocation=C:/WAS/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}

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