Defining an ODBC data source Cisco IPIVR and ICM Environment ALINEiT LLC alineit.com OVERVIEW This guideline document provides the steps needed to create an ODBC data source for the Cisco IPIVR application. Once the ODBC data source is defined, then data retrieval from the data source can be used for customized call routing. Table of Contents DEFINING AN ODBC DATA SOURCE 3 TASKS TO COMPLETE ON IPIVR SERVERS STEP 1 OPEN THE ODBC DATA SOURCE ADMINISTRATOR STEP 2 NAVIGATE TO SYSTEM DSN TAB STEP 3 ADD THE DATA SOURCE NAME (DSN) STEP 4 CREATE NEW DATA SOURCE STEP 5 CREATE A NEW DATA SOURCE TO SQL SERVER STEP 6 AUTHENTICATION SETUP STEP 7 CLIENT CONFIGURATION STEP 8 NETWORK LIBRARIES STEP 9 USER NAME AND USER PASSWORD STEP 10 ODBC MICROSOFT SQL SERVER CONNECTIVITY TESTING 3 3 4 4 5 5 6 6 6 6 7 LINKING THE ODBC DATA SOURCE IN IPIVR 9 STEP 1 STEP 2 STEP 3 STEP 4 NAVIGATE TO DATABASE MENU USING CISCO UNIFIED UCCX ADMINISTRATION ADD NEW DATA SOURCE ENTERPRISE DATABASE SUBSYSTEM CONFIGURATION APPENDIX – NOTES FOR CISCO CRS AND ODBC DATASOURCE Defining an ODBC data source alineit.com 9 9 9 10 12 Page 2 of 15 Defining an ODBC Data Source Before an application step can use information from a database, you must define an Open DataBase Connectivity (ODBC) data source name. This provides information to Microsoft Windows about how to connect the application server to an enterprise database, such as Microsoft SQL Server, Sybase, Oracle, or IBM DB2. To set up a data source name, perform the following steps outlined. This is a guide specific to using Cisco IPIVR with ICM, where the Cisco IPIVR server will need to have a defined external database using the ODBC source. This guide serves as notes, and may include implied steps, which are not specifically detailed. Please refer to the Cisco installation and administration guides as the primary source for setting up the ODBC resource for your specific environment. Tasks to Complete on IPIVR Servers This guided outline is specific to providing an overview of the steps needed on the IPIVR server to link to the external data source. In this guide the data source using ODBC will connect with a SQL server. The external database is Microsoft 2008 SQL Enterprise, though the flavor of the SQL server is not requested for this example ODBC implementation. The steps shown will walk through adding the ODBC data source. This will need to be done on both Cisco IPIVR A and B-side servers. Obviously, you will not be able to successfully access the external database if you forget these steps for the other server. Step 1 Open the ODBC Data Source Administrator The Cisco IPIVR Server uses the Microsoft 2003 Server operating system. Navigate to the ODBC Data Source Administrator. On the application server, in this case the Cisco IPIVR server, choose Start > Programs > Administrative Tools > Data Sources (ODBC). Once you open this item, you will see a dialog box like the one shown below. Defining an ODBC data source alineit.com Page 3 of 15 Step 2 Navigate to System DSN Tab After opening the ODBC Data Source Administrator, you will click on the System DSN tab. Step 3 Add the Data Source Name (DSN) After clicking on the System DSN tab, add a Data Source Name (DSN). Click Add button. Defining an ODBC data source alineit.com Page 4 of 15 Step 4 Create New Data Source Next, you will get a dialog box entitled Create a New Data Source. To create a DSN for Microsoft SQL Server, choose SQL Server and click Finish. Step 5 Create a New Data Source to SQL Server You will now create a new Data Source to SQL Server. The next dialog box will display fields you will need to define. Here you will need to enter the Name, Description and Server information in the fields. For the Name field, enter the hostname or IP address of the computer where the enterprise database resides. Enter a name and description that will help the application designer identify the purpose of this data source. The entry for the Name must match the value entered in the "Data Source Name" field in the Application Administration web pages as you will see later on page #### I chose to use the Server name for all the fields for ease of setup. For this example the Name, Description and Server fields are the same. Defining an ODBC data source alineit.com Page 5 of 15 Step 6 Authentication Setup Choose the appropriate authentication method; Windows NT or SQL Server. Step 7 Client Configuration Click Client Configuration to configure the connection between the application server and the computer where the enterprise database resides. Step 8 Network Libraries Choose TCP/IP network libraries. Step 9 User Name and User Password Enter a user name in the Login ID field and a password in the Password field. Make a note of the user name and password you choose. You will use this user name and password in the next section to complete the enterprise database configuration in the Application Administration web interface. Click Next to complete the DSN configuration and proceed to connectivity testing. Defining an ODBC data source alineit.com Page 6 of 15 Step 10 ODBC Microsoft SQL Server Connectivity Testing A new ODBC data source will be created with the defined configuration you entered and will display the parameters much like you see in the example shown. You will get a confirmation of the successful connectivity test. This will validate access to the external SQL server using the ODBC connection. Defining an ODBC data source alineit.com Page 7 of 15 The ODBC Data Source Administrator will now show the newly defined System Data Source you just added. In this example, the new data source is display at the top of the listed sources. Defining an ODBC data source alineit.com Page 8 of 15 Linking the ODBC Data Source in Cisco IPIVR You will need to log into the IPIVR management browser and link the ODBC data source with the Cisco IPIVR. Step 1 Navigate to Database Menu Using Cisco Unified UCCX Administration After logging into the web browser administration interface for the Cisco IPIVR (Cisco Unified UCCX Administration), then go to the Subsystem menu and select Database. Step 2 Add New Data Source Click the Add button. You will now see the New Datasource link located to the right hand side. Step 3 Enterprise Database Subsystem Configuration Complete the need fields for the new Datasource. You will need to enter; Datasource Name User Name Password Confirm Password Maxium Number of Connections Then when you are have completed, click the Add button. Defining an ODBC data source alineit.com Page 9 of 15 Step 4 Verify your newly added Datasouce. It will appear as shown in the example below. Defining an ODBC data source alineit.com Page 10 of 15 Defining an ODBC data source alineit.com Page 11 of 15 Appendix – Notes For Cisco CRS and ODBC Datasource External Database integration with Cisco Unified Contact Center Express 5.0 My environment: Unified Communications Manager 6.1 Unified Contact Center 5.0 MySQL Server 5.0.45 on RH FC8 You can use query or update the external database (e.g. MySQL in my example) in your call flow, by creating an aef script with Cisco CRS Editor. 1. Download MySQL ODBC connector from MySQL’s website: http://dev.mysql.com/downloads/connector/odbc/5.1.html 2. Install it on the CRS server. Add a new system DSN in Administrative tools > Data Sources (ODBC). 3. Under CRS Web admin page, go to Subsystems > Database, add a new datasource. Defining an ODBC data source alineit.com Page 12 of 15 4. In CRS Editor, create a script or modify your existing script using the Database Steps. Below are several example screen shots on how to use the Database Steps. DB Read Step Press “Refresh Database Schema” if you don’t see the data source name you’ve just created in step 3. DB Get Step You should define DB Read Step before the DB Get Step. DB Read step is used to define the SQL statement, and DB Get step is used to store the resultset to local variable. Defining an ODBC data source alineit.com Page 13 of 15 DB Write Step DB Write Step is used for INSERT and UPDATE statement. Defining an ODBC data source alineit.com Page 14 of 15 The last one DB release step is used to release the database connection. Defining an ODBC data source alineit.com Page 15 of 15