Today, I’ve spent more than 40 minutes in understanding the process and setting up the SQLServer JDBC Driver in Spring manually
Pre-requisites
Maven (Download from http://maven.apache.org/download.cgi and add the maven path to environment variables)Procedure
- Download the latest Microsoft JDBC driver for SQL Server from the following official link http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774
- I’ve selected sqljdbc jar version 4.0
- Navigate to the extracted folder where .jar files available in command prompt
- Execute the following command
- cmd> mvn install:install-file -DgroupId=com.microsoft.sqlserver.jdbc -DartifactId=sqljdbc -Dversion=4.0 -Dpackaging=jar -Dfile="sqljdbc4.jar"
- Now you should be able to see the downloading and moving the corresponding .jar and .pom files. Then a message “BUILD SUCCESS” will appear in command prompt.
- Add the following dependency to your pom.xml
<!-- Database -->
<dependency>
<groupId>com.microsoft.sqlserver.jdbc</groupId>
<agtifactId>sqljdbc</agtifactId>
<version>4.0</version>
</dependency>
Please send your feedback and comments to psrdotcom@gmail.com
Blogger Labels: Dependency,MicroSoft,SQLServer,JDBC,Driver,Friends,Procedure,Download,Server,version,Navigate,folder,Execute,DgroupId,DartifactId,Dversion,Dfile,message,BUILD,Database,usage,feedback,sqljdbc,groupId,artifactId
No comments:
Post a Comment