UCCX Connect to ecternal DB using JDBC?

Unanswered Question
Feb 25th, 2010
User Badges:

Hi,

     We have UCCX 7.0 in our contact center environment. We wish to do a SQL dip to the IBM's TSRM case management database. Now, I gather that TSRM doesn't support ODBC connections & hence trying to look for alternatives to accomplish this task. Is it possible to do a JDBC connect to resolve this task? Is yes, can anybody provide some thoughts on how to accomplish this? If not, what are my alternatives?


Appreciate your help in this matter!


Thanks,

DM

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Tanner Ezell Thu, 02/25/2010 - 09:57
User Badges:
  • Silver, 250 points or more

That depends. Do you have a premium license? If so, you can develop a custom java class to accomplish what you want.

dmurthy74 Thu, 02/25/2010 - 10:00
User Badges:

Thanks for the quick response!


Yes, we do have a preminum package. Do you know of any docs or sample script that has accomplished this?


Thanks again,

DM

Anthony Holloway Fri, 02/26/2010 - 16:23
User Badges:
  • Purple, 4500 points or more

I have not done this in production, nor have i visited this in a long while, but here are some of my notes to help get you started.


You do not need a customer Java class, you simply need to know how to do it in a Do or Set step.


I was connecting to a database local to CRS...shh, I know that's a no-no thing to do, but it was in a lab  =)



boolean recordExists = false


Do {

     String datasource = "AnthonyTest";


     java.sql.Connection connection = null;


     java.lang.Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");


     connection = java.sql.DriverManager.getConnection("jdbc:odbc:" + datasource);


     java.sql.ResultSet sqlResultSet;


     java.sql.Statement sqlStatement = null;


     sqlStatement = connection.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, java.sql.ResultSet.CONCUR_READ_ONLY);


     sqlResultSet = sqlStatement.executeQuery("SELECT field_1b FROM table_1 WHERE field_1a = 'anthony'");


     recordExists = sqlResultSet.first();


     sqlResultSet.close();


     sqlStatement.close();


     connection.close();

}


I think the code above could be modified to support an external DB, with this alternative connection string, wherein I was connecting to Unity Connection:



connection = java.sql.DriverManager.getConnection("jdbc:odbc:Driver=IBM INFORMIX ODBC DRIVER;Host=;Server=ciscounity;Service=20532;Protocol=onsoctcp;Database=UnityDirDB;UID=;PWD=;DB_LOCALE=en_us.utf8");

I picked this all up from several forum posts and the Java docs.  Just search for JDBC and you'll find plenty of threads, and some with example code in them.


Again, I never put this into production, so I cannot speak to that aspect.  Just use this as hint to get to where you need to be.  Also, you will not find Cisco docs that explain how to do stuff like this.  You best bet is the forums.

Actions

This Discussion