Monday, October 22, 2012

Jdeveloper To connect to Microsoft SQL Server

To connect to Microsoft SQL Server:

  1. From www.microsoft.com, download and install the appropriate Microsoft SQL Server driver:

    • For Microsoft SQL Server 2005, choose Microsoft SQL Server 2005 Driver.

    • For Microsoft SQL Server 2008, choose Microsoft SQL Server 2008 Driver.

  2. Set up the user library to contain install-directory\sqljdbc.jar.

  3. Create a database connection to Microsoft SQL Server. Use the following values:

    • Connection Type: SQLServer

    • Username and Password: enter the appropriate values for the connection.

    • Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver

    • Library: the library you created for the driver.

    • JDBC URLs: jdbc:sqlserver://machine-name:port;DatabaseName=database-name, where the section DatabaseName=database-name is optional

What you May Need to Know

If you are using Windows Authentication credentials to connect to Microsoft SQL Server, you need to add do the following:

  • Add the connection property integratedSecurity=TRUE and the username and password values to the JDBC URL, for example

    jdbc:sqlserver://machine-name:port;DatabaseName=database-name;username=USERNAME;password=PASSWORD;integratedSecurity=TRUE  
  • Add the location of sqljdbc_auth.dll to your PATH variable:

    • For 32bit JVM, this is installation-directory\sqljdbc_version\language\auth\x86

    • For 64bit JVM, this is installation-directory\sqljdbc_version\language\auth\x64

For more information, see Building the Connection URL, which is available as part of Connecting to SQL Server with the JDBC Driver at the Microsoft MSDN website.

http://docs.oracle.com/cd/E16162_01/user.1112/e17455/connect_work_databases.htm





No comments: