Create an External Connection to a MySQL or SQL Server Database
Create a connection to an external MySQL or SQL Server database. Then, you can map a Business Object to the connection, and import data into the Business Object.
MySQL Connector 6.9.4 must be installed to create, edit, or use MySQL external connections. The MySQL Connector can be downloaded from https://downloads.mysql.com/archives/c-net/.
An external connection connects CSM to an external database. These steps are specifically for an external connection between CSM and a SQL Database.
To create an External Connection to a MySQL or SQL Server Database:
- Open or create a Blueprint.
- Select Managers > External Connections to open the External Connections Manager.
- Select Create New to open the External Connection Wizard.
- Select Next.
- On the Login options page, select the Use Trusted Agents check box if you use the Trusted Agents feature and you want to control how the system logs in to the external data source.
- Select one of these options, and then select Next.
- Any Trusted Agent Group: Select to allow any group to handle requests for this external connection.
- Trusted Agent Group: Select a specific group to handle requests for this external connection.
- On the Data Source page, select MySQL or SQL Server, and then select Next.
The option to select MySQL is available only if the MySQL Connector 6.9.4 is installed.
- On the Database Location page, select the location of the SQL Database:
- Located on this machine: Select this option if running a local database. Typically, this is only for evaluation systems.
- Specific Server: Select this option to select a database installed on a named server, and then select the specific server in the drop-down list.
If the connection is to a named instance of SQL (a non-default instance of SQL), select the option and then specify the instance in the Specific Server value using the format: DatabaseServer\InstanceName.
- IP Address: Select this option to select a database installed on a server referenced by an IP address, and then provide the database server IP address.
- Select Next.
- On the Select Database page, select Browse.
The Login to server window opens.
- Select a login radio button to use either:
- Windows authentication: Use the stored Windows credentials (user name and password) for authentication.
- User ID and Password: Provide the server User ID and Password.
- Select OK. The system runs for a few minutes and the Choose a Value window opens.
- Select a database, select OK, and then select Next.
- On the Login Options page, if the database requires login information, select the Login Required check box and either:
- Windows Authentication: Uses the stored Windows credentials (user name and password) for authentication.
- User ID and PasswordProvide a user ID and password.
The account must have select rights for each table that is imported or linked to CSM. If CSM is allowed to update data in the database, this account must also have insert and update rights.
- Select Next.
- On the Database Owner or Schema page, select an option from the drop-down list or provide a database owner or schema. This field should be pre-populated.
Not all databases have this concept. If implemented and CSM is able to read the available owners, then they are listed in the drop-down list. If not, provide the owner name. If unsure, provide the default dbo.
- On the Pooling Options page, select a Connection Pooling option for the database:
- Select the Use default pooling options radio button.
- Select the Customize the pooling options radio button, and then provide the minimum and maximum pool size.
To improve performance, set the maximum pool size to three times the number of concurrent CSM licenses that are used in your organization. You may need to adjust this value, depending on usage of your system.
The Connection name page opens.
- On the Connection name page, provide a name and description (optional) of the database connection, and then select Next.
The Connection String page opens, showing the connection string that is used to connect to the database. Modify the connection string, if needed. Many examples of connection strings can be found at www.connectionstrings.com.
- Select Test Connection to verify the connection to the server/database. Text appears next to the button confirming the connection is successful.
- Select Finish. A connection now exists to the SQL Server database.
- Publish the Blueprint (File > Publish Blueprint) to commit the changes, or save the Blueprint (File > Save Blueprint) to continue making other changes.