Building the SAS MDM Repository

Overview

This section explains the process of creating a new SAS MDM repository. You must have access to a relational database system and have read, write, and table creation permissions. This database system can be either local or on a network.
The first steps in creating a repository are as follows:
  1. Create a user or schema named MDM defining common privileges (for example, table reads) as well as the following:
    • create procedure
    • create sequence
    • create table
    • create view
    • create trigger
  2. (Optional) Grant extra tablespace to this schema, depending on your database configuration.
  3. (Optional) Create a temporary user or schema for development activities that can add, modify, and drop database objects as needed in that schema.
Note: For Oracle installations, a separate schema must be created to manage encryption. The user name mdm_secure and table name mdm_secure_info must not be changed. Database limitations for encryption also apply.

Creating Databases and Tablespaces

Overview

The creation of databases should use the standards and best practices of your organization. The commands that follow are examples and can be modified to meet your requirements.

Oracle

For Oracle installations, you create tablespaces to hold data and indexes, modifying values as needed for your system. Note that the file mdm_oracle_ddl.sql is hardcoded to use QMDM_DATA and QMDM_INDICES as tablespace names. If you are not using the same tablespace names, then the file mdm_oracle_ddl.sql must be modified to match the tablespace names that you use. For more information, see your database documentation.
As the sysdba, execute the following SQL statements after modifying them as required for your installation:
-- create new tablespace

create tablespace qmdm_data datafile
'C:\oracle\product\11.2.0\oradata\sas\qmdm_data.dbf'   size
10M autoextend
on extent management local autoallocate; 

create tablespace qmdm_indices datafile
'C:\oracle\product\11.2.0\oradata\sas\qmdm_indices.dbf'   size
10M autoextend
on extent management local autoallocate;

-- create mdm user and grant privileges 

create user MDM identified by SASMDMpw1 default tablespace
qmdm_data quota unlimited on qmdm_data quota unlimited on qmdm_indices;
grant connect, resource, create table, create view, create procedure, 
create trigger, create session, create sequence to MDM;

SQL Server

For SQL Server installations, create a separate database for SAS MDM. Do not install it in the master database. For more information, see your database documentation.
As the sa user, execute the following SQL statements after modifying them as required for your installation:
--Create database and login
create database mdm
create login mdm with password = 'SASMDMpw1',CHECK_POLICY=OFF;
go

-- Create user
use mdm;
create user mdm for login mdm with default_schema=mdm;
grant connect, create table, create view, create procedure, create schema,showplan to mdm;
grant execute on schema::dbo to mdm;
go

--Create schema

create schema mdm authorization mdm;
go

Setting Databases for Encryption

Overview

SAS MDM provides the ability to encrypt data being stored in the hub. This feature requires additional settings and grants for Oracle and SQL Server. Even if you do not use encryption, you must set your SAS MDM database environment to support it.

Oracle

For Oracle installations, you must create a separate user to manage encryption. The user name mdm_secure and table name mdm_secure_info must not be changed. Database limitations for encryption also apply.
To create the separate user, execute the following code:
-- create mdm_secure schema

create user mdm_secure identified by SASMDMpw1 default tablespace
qmdm_data quota unlimited on qmdm_data quota unlimited on qmdm_indices;
grant connect, resource, create table to mdm_secure;
grant execute on UTL_RAW to mdm_secure;

-- create secure info table

create table mdm_secure.MDM_SECURE_INFO
(
MDM_ENCRYPTION_KEY RAW(2000)
)
tablespace QMDM_DATA;

-- Insert key into table

insert into mdm_secure.mdm_secure_info
 select utl_raw.cast_to_raw('sasmdm') from dual;

-- Grant privileges to MDM user 

grant execute on DBMS_CRYPTO to MDM;
grant execute on UTL_RAW to MDM;
grant select on mdm_secure.mdm_secure_info to MDM;

SQL Server

For SQL Server installations, you must create an encryption key and certificate. The key name qMDMKey and certificate name qMDMCer must not be changed. Database limitations for encryption also apply.
As the sa user, execute the following code
use mdm;

-- Create encryption certificate and key

create master key encryption by password='SASMDMpw1';
create certificate qMDMCer with subject='sasmdm';
create symmetric key qMDMKey with algorithm=triple_des encryption
by certificate qMDMCer;
go
grant control on certificate :: [qMDMCer] to [mdm];
grant view definition on symmetric key :: [qMDMKey] to [mdm]; go

Creating a Data Source

SAS MDM accesses DataFlux services on Data Management Server, and those services access the relational database that hosts the SAS MDM database. To access a database with Data Management Studio, an Open Database Connectivity (ODBC) driver for the specified DBMS must be installed, and the database must be configured as an ODBC data source. When this has been completed successfully, the database name appears in the Data Connections folder on the Data Management Studio riser.
The SAS MDM installation and configuration process creates the required data source names (DSNs) for you. DSNs are created using the DataFlux ODBC Wire Protocol drivers for either Oracle or SQL Server with the correct driver options set. These two drivers are the only ones supported for communicating with the SAS MDM target database from the SAS MDM and SAS Data Quality software offerings.
If you enter incorrect information during the installation process for your SAS MDM target database, you can manually create DSNs as needed using the appropriate mechanism as documented in the ODBC Reference documentation that is available in every Data Management Studio installation. In the Data Management Studio Search riser, search for DSN, and then view the topics Adding ODBC Connections and Maintaining Data Connections for the Server.
Remember to use the saved connection functionality in Data Management Server and Data Management Studio once you have added or amended the SAS MDM database DSN settings.

Creating a Data Source for VA Reports

SAS MDM is installed using SAS provided ODBC drivers, which must be used with SAS MDM. For SAS Visual Analytics reports, the SAS provided ODBC drivers cannot be used when connecting to SQL Server databases containing the SAS MDM data for the reports. You must create a new data source name (DSN) using ODBC drivers supplied by your database vendor to connect to data in SAS MDM from the SAS Visual Analytics environment. For SQL Server, you need a new connection using the vendor-supplied ODBC driver. Use this ODBC connection name as the DB_NAME value when you use the SAS MDM tool for creating SAS Visual Analytics HubOverview report. See DB_NAME in the SAS MDM: User’s Guide for more information.

Special Database Driver Considerations

Because SAS MDM uses stored procedures in the target database, you must enable these procedures using ODBC Connection Manager when configuring your database connections. These settings are applied for you during the SAS MDM installation and configuration process and are shown here for reference. For example, if you want to use the Oracle Wire Protocol Driver, you must enable the following settings:
Driver Settings
Advanced Settings
Performance Settings
Application Using Threads
Use Current Schema for SQL Procedures
Enable Procedure Returns Results
Catalog Functions Include Synonyms
Enable SQLDescribeParam
Enable Scrollable Cursors
Describe at Prepare
Wire Protocol Mode: 2
Enable N-Char Support
Note:
  • The DSN must be configured in the mdm_macros.cfg file. The SAS MDM installer default DSN is SASMDM, but the DSN can be edited as needed. If you edit the DSN, ensure that the mdm_macros.cfg file is updated with the new name (including the copy on the Data Management Server).
  • Additional driver settings can be configured for optimum performance. For more information, see your database driver documentation.
Last updated: April 19, 2017