Previous Topic: Download the SiteMinder Schema Files

Next 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.

To create SiteMinder 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.

    The policy and key store schema is created.

    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 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.