AnsweredAssumed Answered

How to set datasource sql server db in a gel script to connect to the db

Question asked by KarimD on Oct 11, 2016
Latest reply on Oct 17, 2016 by Chris_Hackett

Hello,

 

I am wandering if anyone know how to set datasource for sql server to connect to the database. I already did that on the past with Oracle. Below how I connect to the database :

 

<!--DATA SOURCE ORACLE SQL-->
  <core:choose>
  <core:when test="${context != 'TRAIN'}">
    <sql:setDataSource var="DS_SRC"
        url="jdbc:oracle:thin:@${hostORA}:${portORA}:${sidORA}"
        driver="oracle.jdbc.driver.OracleDriver"
        user="${loginORA}"
        password="${passORA}"/>
      
  </core:when>
  <core:otherwise>
   <sql:setDataSource  url="jdbc:clarity:oracle:${hostORA}:${portORA};ServiceName=${sidORA}"
       driver="oracle.jdbc.driver.OracleDriver"
       user="${loginORA}"
       password="${passORA}"
       var="DS_SRC"/>
  </core:otherwise>
 </core:choose>

 

I want to do the same with SQL Sever.

 

Thank in advance for answer.

 

Kind regards

Outcomes