Previous Topic: Download the SOA Security Manager Schema Files

Next Topic: Configure a MySQL Data Source for SOA Security Manager

Create the SOA Security Manager Schema

You create the SOA Security Manager schema so that the MySQL database can store policy, key, and audit logging information.

To create SOA Security Manager schema in a MySQL database

  1. Navigate to path\MySQL.
    path

    Specifies the path to the schema files extracted from the tier 2 directory zip.

  2. Open the following file in a text editor:

    sm_mysql_ps.sql

  3. Locate the following lines:
    DROP FUNCTION IF EXISTS `databaseName`.`getdate` $$
    CREATE FUNCTION `databaseName`.`getdate` () RETURNS DATE
    
  4. Replace each instance of 'databaseName' with the name of the database functioning as the policy store.

    Example: If the name of the database is smpolicystore, the required update appears as follows:

    DROP FUNCTION IF EXISTS `smpolicystore`.`getdate` $$
    CREATE FUNCTION `smpolicystore`.`getdate` () RETURNS DATE
    
  5. Copy the contents of the entire file.
  6. Paste the file contents into a query and execute the query.

    Note: You can also use this schema file to create a stand–alone key store.

  7. (Optional) If the policy store is to store audit logs:

    Note: You can use a separate database to function as this type of SOA Security Manager data store.

    1. Open the following file in a text editor:

      sm_mysql_logs.sql

    2. Locate the following lines:
      DROP FUNCTION IF EXISTS `databaseName`.`getdate` $$
      CREATE FUNCTION `databaseName`.`getdate` () RETURNS DATE
      
    3. Replace each instance of 'databaseName' with the name of the database functioning as the audit store.
    4. Copy the contents of the entire file.
    5. Paste the file contents into a query and execute the query.

      The audit store schema is created.

  8. (Optional) If the policy store is to function as a SOA Security Manager sample user store:

    Note: You can use a separate database to function as this type of SOA Security Manager data store.

    1. Open the following file in a text editor:

      smsampleusers_mysql.sql

    2. Locate the following lines:
      DROP FUNCTION IF EXISTS `databaseName`.`getdate` $$
      CREATE FUNCTION `databaseName`.`getdate` () RETURNS DATE
      
    3. Replace each instance of 'databaseName' with the name of the database functioning as the SOA Security Manager sample user store.
    4. Copy the contents of the entire file.
    5. Paste the file contents into a query and execute the query.

      The SOA Security Manager sample user store schema is created.

  9. Navigate to path\xps\MySQL
    path

    Specifies the path to the schema files extracted from the tier 2 directory zip.

  10. Open the following file in a text editor and copy the contents of the entire file:

    MySQL.sql

  11. Paste the file contents into a query.
  12. Use the MySQL command line tool to exectute the query.

    The policy store schema is created.