PDA

View Full Version : Solution to connection problem with SQL Server 2005 - Sanjukta Samom, iCreate



sanzukta
08-19-2008, 02:57 AM
Solution by SANJUKTA SAMON, iCreate Softwares:

To connect the SQL server database with an instance name, incorporate the below in the web.xml file,


<!-- Connection String For SQL Server -->
<context-param>
<param-name>connectString</param-name>
<param-value>Provider=Mondrian;Jdbc=jdbc:sqlserver://172.16.1.3\saba_devl_vyasa_bizscore;jdbc.instanceName=ads;jdbc.username=sa;jdbc.password=Welcome1;JdbcDrivers=com.microsoft.sqlserver.jdbc.SQLServerDriver;Catalog=/WEB-INF/schema/bizscore.xml;</param-value>
</context-param>


The ads in the above string needs to be changed with the required instance name. The back-slash before the database name is very important. A forward slash will cause the connection to fail invoking unknown host exception.