Servlet connection to mssql

i want to connect servlet to mssql database on server.....i hv already created database from mssql server 2005....i hv written code for servlet.....but i dint getting wht should i write in Class.forname(); wht will be the URl also.....i hv sqljdbc.jar....how to do connection with database...

try
  java.lang.Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
  Connection c = java.sql.DriverManager.getConnection("jdbc:sqlserver://MY-PC\\SQLEXPRESS;IntegratedSecurity=True");
  System.out.println("Connected!");
}catch(Exception ex){
  ex.printStackTrace();
}

Similar Messages

  • BI JDBC Connection For MSSQL 2005

    Hi All,
    I am trying to establish an BI JDBC Connection with MSSQL 2005 Server. I follow the steps exactly mentioned in the guide but i was not successfull. I doubt the problem could be with the adapters and again downloaded a JAR file for MSSQL 2005 from microsoft website and proceeded with steps. But no luck this time also.
    How do i make a successfull connection. Below is the result of a test page
    ==================================================
    Details:
    com.sap.ip.bi.sdk.exception.BIConnectionFailedException: Cannot open the connection at com.sap.ip.bi.sdk.dac.connector.jdbc.JdbcConnectionFactory.getConnectionEx(JdbcConnectionFactory.java:238) at com.sap.ip.bi.sdk.trialarea.connector.servlet.model.JDBCModel.getConnection(JDBCModel.java:797) at com.sap.ip.bi.sdk.trialarea.connector.servlet.model.JDBCModel.getTables(JDBCModel.java:132) at com.sap.ip.bi.sdk.trialarea.connector.servlet.controller.Control2.doPost(Control2.java:23) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: com.sap.ip.bi.sdk.exception.BIResourceException: Cannot open the connection at com.sap.ip.bi.sdk.dac.connector.jdbc.JdbcManagedConnection.(JdbcManagedConnection.java:123) at com.sap.ip.bi.sdk.dac.connector.jdbc.JdbcManagedConnectionFactory.createManagedConnection(JdbcManagedConnectionFactory.java:119) at com.sap.engine.services.connector.jca.ConnectionHashSet.match(ConnectionHashSet.java:320) at com.sap.engine.services.connector.jca.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:189) at com.sap.ip.bi.sdk.dac.connector.jdbc.JdbcConnectionFactory.getConnectionEx(JdbcConnectionFactory.java:233) ... 19 more Caused by: com.sap.ip.bi.sdk.exception.BIResourceException: Cannot connect to JDBC data source at com.sap.ip.bi.sdk.dac.connector.jdbc.impl.Connection.connectDB(Connection.java:394) at com.sap.ip.bi.sdk.dac.connector.jdbc.impl.Connection.connect(Connection.java:106) at com.sap.ip.bi.sdk.dac.connector.jdbc.JdbcManagedConnection.(JdbcManagedConnection.java:118) ... 23 more Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]End of stream was detected on a read. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source) at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source) at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source) at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source) at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:140) at com.sap.ip.bi.sdk.dac.connector.jdbc.impl.Connection.connectDB(Connection.java:376) ... 25 more
    ====================================================
    regards,
    Anand

    Hi Anand,
    did you check the WIKI:
    <a href="https://wiki.sdn.sap.com/wiki/display/VC/JDBCConnectionSetup">https://wiki.sdn.sap.com/wiki/display/VC/JDBCConnectionSetup</a>
    Best Regards,
    Marcel

  • Can't connect to MSSQL

    I've been using MSSQL with java servlet programming. It seems like the connection to MSSQL is not working. Here are the codes.
    package coreservlets;
    import java.*;
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class RunMssql extends HttpServlet {
         Connection connection = null;
    public String username = "libsys";
    public String password = "123456";
    public String url = "jdbc:microsoft:sqlserver://localhost:1433;databaseName=libsys;selectMethod=cursor;";
         public void init()
              try
                   Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                   //loading a driver
         connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;databaseName=libsys;selectMethod=cursor;","libsys","123456");
                   //connecting to a database
              catch (Exception a)
                   a.printStackTrace();
         public void doGet(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException
              doProcess(request,response);
    public void doPost(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException
         doProcess(request,response);
         public void doProcess(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException
              try{
              init();
    DatabaseMetaData dm = null;
              ResultSet rs = null;
              response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              out.println("<HTML>");
              out.println("<BODY>");
              out.println(connection);
              if (connection != null) {
                   out.println("<BR>Connected Successfully");
              out.println("</BODY>");
              out.println("</HTML>");
              catch (Exception e)
                   System.err.println(e);
    Please help to rectify it. Thanks.
    Message was edited by:
    wesleygch

    I show you my program again.
    package coreservlets;
    import java.*;
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Connect extends HttpServlet{
    private Connection con = null;
    private final String url = "jdbc:microsoft:sqlserver://";
    private final String serverName= "localhost";
    private final String portNumber = "1433";
    private final String databaseName= "libsys";
    private final String userName = "libsys";
    private final String password = "123456";
    // Informs the driver to use server a side-cursor,
    // which permits more than one active statement
    // on a connection.
    private final String selectMethod = "cursor";
    // Constructor
    public Connect(){}
    private String getConnectionUrl(){
    return url+serverName+":"+portNumber+";databaseName="+databaseName+";selectMethod="+selectMethod+";";
    private Connection getConnection(){
    try{
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    con = DriverManager.getConnection(getConnectionUrl(),userName,password);
    }catch(Exception e){
    e.printStackTrace();
    System.out.println("Error Trace in getConnection() : " + e.getMessage());
    return con;
    Display the driver properties, database details
    public void doGet(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException
                   getConnection();
    doPost(request,response);
         public void doPost(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException
                        response.setContentType("text/html");
                        PrintWriter out = response.getWriter();
              DatabaseMetaData dm = null;
              ResultSet rs = null;
              try{
              con= this.getConnection();
              if(!con.isClosed()){
                                       out.println("Get Connected");
              dm = con.getMetaData();
              out.println(con);
              out.println("Driver Information");
              out.println("\tDriver Name: "+ dm.getDriverName());
              out.println("\tDriver Version: "+ dm.getDriverVersion ());
              out.println("\nDatabase Information ");
              out.println("\tDatabase Name: "+ dm.getDatabaseProductName());
              out.println("\tDatabase Version: "+ dm.getDatabaseProductVersion());
              out.println("Avalilable Catalogs ");
              rs = dm.getCatalogs();
              while(rs.next()){
              out.println("\tcatalog: "+ rs.getString(1));
              rs.close();
              rs = null;
              closeConnection();
              }else System.out.println("Error: No active Connection");
              }catch(Exception e){
              e.printStackTrace();
    dm=null;
    private void closeConnection(){
    try{
    if(con!=null)
    con.close();
    con=null;
    }catch(Exception e){
    e.printStackTrace();
    after I run it in the browser. It shows nothing. Anywhere can help to improve this to make it connected.
    Message was edited by:
    wesleygch

  • Not able to get the connection to mssql server thro native sql

    Dear Experts,
               I have created a database connection to mssql server thro DBCO t.code.Am not able to get the connection when i am executing Native SQl for geting connection of mssql server.
    DATA: CON_NAME LIKE DBCON-CON_NAME VALUE 'BIW'.
    EXEC SQL.
      CONNECT TO :con_name AS 'C1'
    ENDEXEC.
    Am always getting sy-subrc = 4. The user name and password i have given in dbcon table having full authorization to access mssql database. I am working SAP ecc 5.0. Also both servers are running in windows.
    could anyone hlep me on this issue.
    Thanks in advance.

    Hello, the submitted error must be analyzed according to the Syntaxis and characteristics of the MSSQL database. See explanation of error.
    http://doc.ddart.net/mssql/sql2000/html/trblsql/tr_reslsyserr_1_1o1i.htm
    Error 156
    Severity Level 15
    Message Text
    Incorrect syntax near the keyword '%.*ls'.
    Explanation
    This error indicates that the syntax of a Transact-SQL statement is incorrect and that the syntax error was detected near the keyword specified in the error message. The most frequent causes for syntax errors are misspellings of Transact-SQL keywords or operators, and specifying the syntax of a Transact-SQL statement in the wrong order.
    One of the more complicated causes for this error may be a compatibility level mismatch for the current database. If the current database has a compatibility level other than 70, Microsoft® SQL Serveru2122 will not recognize any of the keywords that a database with a compatibility level of 70 would recognize.
    Action
    First, check the Transact-SQL statement syntax near the keyword specified in the error message. Because Transact-SQL language syntax can be very complex, SQL Server may incorrectly report the position of the syntax error as later in the Transact-SQL statement than it actually occurred. Second, reexamine the entire Transact-SQL statement that generated the error. Verify the syntax order of the statement.
    Ensure that the database does not have a compatibility level of 65 and has a compatibility level of 70.

  • While connecting the MSSQL (2000, 2005) to BI 7 in rsa1 source system getti

    While connecting the MSSQL (2000, 2005) to BI 7 in rsa1 source system getting below error.
    (When calling a function within the database interface, a return value which cannot be processed by the calling function was provided.)
    Please help me to solve these issues.
    Iu2019m able to connect Oracle 10.g as source system and can view the tables and views.
    BI 7
    Windows 64 bit
    Oracle 10 .2
    SAP GUI 7.
    Advance Thanks,
    KARAN
    Edited by: Harish  Karan on Jun 26, 2008 2:51 PM

    Hello All,
    I found the solution for my particular situation!
    When checking the runtime object for CLU4, an inconsistency in the runtime object popped up:
    - the ABAP dictionary contains the field K5N1
    - the DB dictionry contains the field name K5N01
    This is a known and documented inconsistency, see note 902817 for the description.
    BUT: the solution pointed out there is wrong! The note suggests to delete all content from the physical tables and then activate the table in SE14. This is not possible for cluster tables neither in SE14 nor in SE11.
    This solution worked for me for both CLU4 and VER_CLUSTR:
    - as the tables should be empty normally I dropped them in the database
    - unlock the shadow instance with SAPup
    - log on on to the shadow instance
    - I then made some arbitrary change to the table definition in SE 11 (like adding a field). Make sure to maintain the size class also, otherwise the table won't be activated
    - save the changes and activate the tables
    - take back the previous change
    - save and activate again
    - lock the shadow instance
    - restart the upgrade phase
    Once the upgrade is done, check whether the physical table exists in the DB.
    Hope this helps!
    Regards,
    Matthias.
    Edited by: Matthias Dörfel on Nov 18, 2011 3:14 PM

  • Jdbc connectivity for mssql 2008 in ipv6

    trying to connect to mssql server 2008 in a machine enabled for ipv6 using the following code :
    Connection c = null; String url = "jdbc:sqlserver://;servername=fe80::21a:4bff:fecf:dfe5%4;port=1433;DatabaseName=mssql;selectMethod=cursor;"; String userid = "xxx"; String password = "xxx"; Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); try { c = DriverManager.getConnection(url, userid, password); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); }
    but getting the error:
    com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host  has failed. java.net.NoRouteToHostException: No route to host: connect at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:582) at java.sql.DriverManager.getConnection(DriverManager.java:185) at ConnectDB.main(ConnectDB.java:84)
    what is the problem.can any one please suggest me how to connect to mssql using ipv6..
    Thanks in advance...
    Edited by: 789764353 on Sep 7, 2009 4:20 AM

    I guess you must have seen this. But, just in case.
    [Creating a Valid Connection String Using TCP/IP|http://msdn.microsoft.com/en-us/library/ms191260.aspx]
    Also,
    SQL Server and SQL Server Native Client fully support both Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6). When Windows is configured with IPv6 SQL Server, components automatically recognize the existence of IPv6. No special SQL Server configuration is necessary.[Connecting Using IPv6|http://msdn.microsoft.com/en-us/library/ms345359.aspx]

  • Midlet servlet connection

    Hi,
    I tried almost all the midlets servlet connection examples on various tutorial sites including sun's, they all run perfectly fine on J2ME wireless toolkit emulator but when I download them on Seimens SL45i with WAP connection , J2ME compliant and on O2 XDA pda with GPRS and CrEme virtual java machine and me4se library for MIDlet support its not working. If I connect PDA with PC using MS active sync, the MIDLet is able to connect with servlet or normal web page and retrive data from that perfectly, but when I remove the pda from docking station and run MIDlet, its not able to connect with servlet. Is there something more you have to do to access GPRS or WAP feauture of PDA/mobile phone.
    I am using normal HttpConnection to connect with the servlet.
    Thanks in advance
    Dhiraj

    I'm playing with some sockets.
    can you please help me?!
    J2ME uses only HTTP connections?
    and what are the sockets? what is the difference between CLDC socket and J2SE Socket?
    is there any other way to communicate with a Servlet?
    and very important..
    is there a difference if it's using GPRS or 3G?
    would the http connection work for all? and just the connection speed would change?
    help me!!

  • Can't connect to MSSQL database

    Hi,
    I'm very new to J2EE. I've been trying to get my JSPs to access my MSSQL database. I'm using JBoss as the application server.
    Here's what I've done:
    1. Downloaded and installed the MSSQL 2000 JDBC driver.
    2. Edited the \server\default\deploy\mssql-ds.xml file:
    <datasources>
    <local-tx-datasource>
    <jndi-name>MSSQLDS</jndi-name>
    <connection-url>jdbc:microsoft:sqlserver://server1:1433;DatabaseName=Test;User=sa;Password=passwd;SelectMethod=Cursor</connection-url>
    <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
    <DatabaseName>Test</DatabaseName>
    <user-name>sa</user-name>
    <password>passwd</password>
    <min-pool-size>100</min-pool-size>
    <max-pool-size>1000</max-pool-size>
    <blocking-timeout-millis>5000</blocking-timeout-millis>
    </local-tx-datasource>
    </datasources>
    3. I edited the "C:\jboss\bin\run.bat" file and inserted into the second line:
    "set CLASSPATH=c:\mssql_jdbc_driver\lib\mbase.jar;c:\mssql_jdbc_driver\lib\msutil.jar;c:\mssql_jdbc_driver\lib\mssqlserver.jar;"
    where C:\mssql_jdbc_driver is the folder where my *.jar files are located.
    4. I created a .jsp page like this:
    -----Start test.jsp -----------
    <%
    try {
    String sDBDriver = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
    String sConnStr = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=multiplex;User=sa;Password=secret;";
    Class.forName(sDBDriver);
    java.sql.Connection conn = java.sql.DriverManager.getConnection(sConnStr);
    java.sql.Statement stmt = conn.createStatement();
    java.sql.ResultSet rs = stmt.executeQuery("select 'Multiplex' As Name");
    while (rs.next()) { %>
    <%= rs.getString("Name") %><br>
    <%}
    catch (ClassNotFoundException cnfe)
    System.err.println("Unable to load MSSQL database driver!");
    System.err.println("ClassNotFoundException: " + cnfe.getMessage());
    %>
    ------End test.jsp -----------------------
    5. But then when I run test.jsp, I get a ClassNotFoundException saying its not able to load the MSSQL driver.
    Have I missed out some configuration step? I've been searching all avenues of support for 3 days but still can't get it working. Can someone help, please?
    Thanks!

    Thanks for your replies.
    The database should be "Test", sorry.
    I find the JBoss documentation isn't very beginner-friendly. And I can't get a reply from the JBoss forums. Does anyone who has worked with JBoss know where I should define the CLASSPATH for the MSSQL jar files?
    Actually if someone could point me to step-by-step instructions on how to set up a database connection to MSSQL from JBoss in a Windows environment, I would be very very grateful...

  • Exmpl of Servlet connect with ORacle

    Hi folks,
    Can anyone send me example of Java Servlet connectivity with Oracle.
    i m not able to connect servlet with oracle.
    u guys can reply me on [email protected]
    thanks
    dal hit

    No.
    The code for connecting to Oracle from a Servlet is no different from connecting to Oracle from any other Java application. So tell you what, you show us what you've tried and the error message(s) and we'll help you debug it.
    99.999% of the time it's a failure to put the driver Jar file into the classpath, the specifics of which vary from application server to application server. Which one are you using?
    u guys can reply me on [email protected]
    We can, but we won't. This is not your personal bugfixing service. Pay if you want that kind of help. If you want it for free, do it through the forums or go away.
    Probably you'll never read this response, but that's your problem not mine.

  • DB connect error  (MSSQL connectivity with SAP BI)- Urgent

    Hi all,
    I am trying to connect the MSSQL 2005 Database to the SAP BI system through RAC.During the creation of the source System(DB Connect) it placed an error as
    DIA RSA1 BY G No shared library found for the database with ID SALMSSQL.
    Can someone please let me know how we can comeup with this issue?Where we can download LIB_DBSL.SAR and the process to load it into theDIR_LIBRARY default path as we are using RAC connectivity.This is very important.Please suggest me
    During the process of creation DB connect source system for MSS what we need to fill for the Connection Info option i.e System IP or the IP of Database and which Databasetable
    DB Connection MSSQL
    DBMS MSS
    User Name sa
    DB password /
    Conn. info MSSQL_SERVER= ? MSSQL_DBNAME= ?
    Connection Limit
    Optimum Conns
    Will reward points.
    Thanks
    D

    Hello Dash,
    Follow the below mentioned steps to create a dbconnect source system.
    1. Goto RSA1 -> Source systems. Right click and Create
    2. Give some name and description and hit enter
    3. a. Con Name : Any name (SQLSRV, etc)
    b. DBMS : MSS
    c. UserName : Any username which is present in the SQL Server. Eg: SA.
    If you have to use Windows Authentication, there is a seperate method :
    For windows authentication, you will have to add your Admin login of BI Server to the SQL Server Security logins group (For Eg: If BI Server name is BID and the admin login for this server is BIDADM, you need to add BIDADM to Logins/Users group of SQL Server and also for the specific database).
    d. Password : Anything.
    e. Con Env : MSSQL_SERVER=<sql server name> MSSQL_DBNAME=<database name> OBJECT_SOURCE= DBO.
    For Example:
    MSSQL_SERVER=ps14apollo MSSQL_DBNAME=PROJECTSERVER_REPORTING OBJECT_SOURCE=DBO
    Here ps14apollo is my SQL Server name. Similarly ProjectServer_Reporting is my database name. DBO should be the Object_Source for most of the SQL Server dbs. I think it should work in your case as well.
    f. DB RECO = select or let it remain unselected.
    g & h Max Connections & OPT Connections = 0, for unlimited connections.
    Regards,
    F-S

  • Make an app that connect to MSSQL server by single sign on

    A straightforward task. I want to create an GUI app that can connect to MSSQL 2014 express when user run it.
    Lets say a domain user name "peterpan" was grant modify right of certain database in SQL server.
    After user login Win7, then run the app. It auto log on to the SQL server and show a list of database for choose to modify.
    The problem is i cant find any info about single sign on vc++ code/library for reference.
    The app is plan to written by vc++ with MFC, ATL. Are these libraries has the method to do want i want?

    >Could you elaborate?
    Sure.  Here's the high level of 20 years of history of Microsoft data access APIs :)
    First there was ODBC, which is still the most widely-used and adopted API for data access from unmanaged code.
    Then various COM (Component Object Model) wrappers and new libraries were introduced, including ADO, DAO, and RDO which were all higher-level wrappers meant to simplify data access.  And OleDB was introduced which is a COM low-level data access API,
    similar to ODBC. 
    When .NET was introduced in 2003, it came with a new data access API, called ADO.NET which is the preferred API for .NET (or "managed") code.  The ADO.NET Provider for SQL Server (System.Data.SqlClient) is not based on ODBC or ADO.  It's
    a ground-up managed client for SQL Server.
    Later the OleDB provider for SQL Server was
    deprecated, and a new SQL Server ODBC Driver was released.  Leaving ODBC as the preferred API for unmanaged C++ development.
    See also Data Access Technologies Road Map, which is a few years old, but explains what lots of the older data access technologies were.
    David
    David http://blogs.msdn.com/b/dbrowne/

  • NW04s JDBC Connection for MSSQL not working

    In portal JDBC settings are:
    Connection properties
    URL = jdbc:microsoft:sqlserver://192.168.0.101:1433;DatabaseName=Northwind
    Driver = com.microsoft.jdbc.sqlserver.SqlServerDriver
    User Management
    User mapping type = admin,user
    I assigned a user to Administrator under User Administration
    Visual Administrator settings are:
    DriverName = com.microsoft.jdbc.sqlserver.SqlServerDriver
    URL = jdbc:microsoft:sqlserver://192.168.0.101:1433;DatabaseName=Northwind
    UserName = empty
    Password = empty
    Result
    Connection test fails in portal. The settings appear ok.
    The only thing I can think of is that user specified in portal user mapping is not setup properly on SQLServer.
    Also:
    When I run link:
    http://localhost:53000/TestJDBC_Web/TestJDBCPage.jsp
    my jdbc service MSSQL_JDBC does not appear. MSSQL_JDBC was cloned from SDK_JDBC and the libray for drivers was added
    I am running MSSQL 2000 SP4 but using JDBC drivers for SP3 as I didn't find any for SP4 and assumed they would work for SP4
    What am I missing?

    Raynald,
    I think I am having a similar problem.
    I also cloned the connection names in Vis. Administrator to the SDK_name.
    Indeed it now appears in the test servlet, and I can succesfully execute SQL statements from there.
    So the connector seems ok.
    But I have still problems with the Connection Test in the Portal.
    I am trying to make BI JDBC system to be able to use my database from the Visual Composer.
    I am using these properties:
    CodeLink = com.sap.portal.systems.bi.SAP_BI_JDBC
    ConnectionFactoryClass = SDK_TESTDB
    ConnectionUrl = jdbc:jtds:sqlserver://sapserver:1433;databaseName=TestDb
    (this url is the same as in Vis. Administrator)
    Driver Class Name =  net.sourceforge.jtds.jdbc.Driver
    Fixed Catalog = empty
    Fixed Schema = empty
    System Type = SAP_BI_JDBC
    User Mapping = admin, user
    I am logged in as Administrator, so I added the login credentials at the User Mapping page of the Administrator user.
    When I use Connection Test function from the portal I get the following messages:
    Retrieval of default alias successful
    Connection failed. Make sure user mapping is set correctly and all connection properties are correct.
    What can I do to solve this problem?

  • Error while creating a new DAC connection using connection type MSSQL

    Hi,
    I am trying to create a new DAC connection i.e. a new DAC repository in the SQL Server 2008 database.
    DAC version : 10.1.3.4.1
    Database : SQL Server 2008
    I have downloaded the sqljdbc4.jar file from the below link and placed it in the D:\orahome\10gR3_1\bifoundation\dac\lib folder.
    [http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774 ]
    I have entered all the details correctly for database name, database host, database port. I created a new Authentication file.
    I get the below error when I try to test the connection.
    MESSAGE:::MSSQL driver not available!
    EXCEPTION CLASS::: java.lang.IllegalArgumentException
    com.siebel.etl.gui.login.LoginDataHandler$LoginStructure.testConnection(LoginDataHandler.java:512)
    com.siebel.etl.gui.login.LoginDataHandler.testConnection(LoginDataHandler.java:386)
    com.siebel.etl.gui.login.ConnectionTestDialog$Executor.run(ConnectionTestDialog.java:290)
    ::: CAUSE :::
    MESSAGE:::com.microsoft.sqlserver.jdbc.SQLServerDriver
    EXCEPTION CLASS::: java.lang.ClassNotFoundException
    java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    java.security.AccessController.doPrivileged(Native Method)
    java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    java.lang.Class.forName0(Native Method)
    java.lang.Class.forName(Class.java:169)
    com.siebel.etl.gui.login.LoginDataHandler$LoginStructure.testConnection(LoginDataHandler.java:510)
    com.siebel.etl.gui.login.LoginDataHandler.testConnection(LoginDataHandler.java:386)
    com.siebel.etl.gui.login.ConnectionTestDialog$Executor.run(ConnectionTestDialog.java:290)
    The error seems to be a connectivity issue with SQL Server. Am I using the correct jar file?
    Please help me out in resolving this issue. Appreciate the help provided on this forum earlier.
    Thank You

    Add
    .\lib\sqljdbc4.jar
    at end of the line starting with SQLSERVERLIB in config.bat file
    Pls mark correct

  • Connect to MSSQL from OWB Linux.

    Hi,
    This is almost an embarrasing question to ask because I should be able to find this information but Alas! such is life.
    So here goes, I want to be able to connect from my OWB 10gR2 on Linux to Microsoft SQL Server on some windows box. I went into MY_PROJECT->Databases->Non-Oracle->SQL Server and hit create.
    I got details for a location that I filled as follows -
    User Name: username
    Password: password
    Host: Host\Instance
    Port: 1433
    Service Name: Instance
    Use Global Name: unchecked
    Schema: username
    When I test this, I get -
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    Unable to retrieve text of NETWORK/NCR message 65535
    ORA-02063: preceding 2 lines from OWB_1087
    Am I missing something? Do I need to do something else? I saw this posting -
    Connect to MS SQL server from OWB on Linux platform
    but it seems dated.
    I don't know if there are easier ways to connect from OWB Linux to MSSQL Windows in the newer versions. Any help is greatly appreciated.
    Thanks.

    I recommend watching this viewlet: http://www.oracle.com/technology/products/warehouse/htdocs/sql_server_source_all/sql_server_source_all_viewlet_swf.html
    It shows how to setup connections to SQL Server. However, there is one major change. The viewlet shows how to do this on Windows and you need to do this on Linux. The only step that changes is step 1: setting up the ODBC driver. You will need to find a Linux ODBC driver and driver manager for SQL Server and get that setup. After that you can use the viewlet to setup the Heterogeneous Services.
    Bryan

  • Oracle Servlet Connectivity

    Hello
    When i try to connect my servlet with oracle it didnt detect oracle driver. My Simple java class was connect successfully but when i move to servlet i didnt work. Classnotfoundexception Occur tell me what i do and where i place classes12.zip folder in tomcat server.
    Thank You
    Regards
    Uzair

    Rename the classes12.zip to be classes12.jar
    Tomcat only reads jar files, not zip files.
    It should be in one of the following (in my order of preference):
    - web-inf/lib
    - TOMCAT/shared/lib
    - TOMCAT/common/lib
    Cheers,
    evnafets

Maybe you are looking for