Previous Topic: How to Configure the Policy StoreNext Topic: Configure a MySQL Data Source for SiteMinder


Create the SiteMinder Schema

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

Follow these steps:

  1. Navigate to siteminder_home\db\tier2\MySQL.
    siteminder_home

    Specifies the Policy Server installation path.

  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 in to a query and execute the query.

    Note: You can also use this schema file to create a seperate 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 SiteMinder 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 SiteMinder sample user store:

    Note: You can use a separate database to function as this type of SiteMinder 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 SiteMinder sample user store.
    4. Copy the contents of the entire file.
    5. Paste the file contents into a query and execute the query.

      The SiteMinder sample user store schema is created.

  9. Navigate to siteminder_home\xps\db\tier2\MySQL
    siteminder_home

    Specifies the Policy Server installation path.

  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.