Windows server 2003 connect to SQl server 2000 problem

my problem
D:\Myjava>java connect
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establis
hing socket.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Sou
rce)
at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown S
ource)
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:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at connect.getConnection(connect.java:26)
at connect.displayDbProperties(connect.java:43)
at connect.main(connect.java:79)
Error Trace in getConnection() : [Microsoft][SQLServer 2000 Driver for JDBC]Erro
r establishing socket.
1)both my sql server server and client listen the port 1433
2) on sql security -> Logins I have the user call test and password call 1234 can access to pubs
what else I need to care
Thank you

This version did not have built in service packs. You have to install it sepeartely. Check this link.
http://vyaskn.tripod.com/sqlsps.htm
Best of luck
Muhamamd Uzair Baig
JEE Application Developer
Dubai Customs.

Similar Messages

  • Does Exchange Server 2003 use M$SQL Server?

    Hi All,
    I have a new customer with SBS 2003 running as an Exchange Server.  He have four workstations and one server.  He is also running M$SQL Server 2005.  Does Exchange Server use M$SQL Server?  (Need to know for backup considerations.)
    Many thanks,-T

    No problem. Check if you have SQL management studio installed on the computer and open it up,to see what db are in there.
    Regards,
    Denis Cooper
    MCITP EA - MCT
    Help keep the forums tidy, if this has helped please mark it as an answer
    Blog: http://www.windows-support.co.uk 
    Twitter:   LinkedIn:

  • Oracle XE connection to SQL Server 2000

    Hello everybody,
    I need to make a connection to a table in SQL Server 2000. I am using Oracle XE with Apex 3.0.1.
    SQL and XE are on the same server(windows server 2003).
    I need to make an application that uses some data of the SQL Server and for the rest it uses data from Oracle XE.
    How can I make this connection to SQL Server from Oracle XE? Some suggestion where I should start, would be great.
    It would be great if the Apex developers would not notice that the data is retrieved from SQL Server, is this possible?
    For 10g there is a gateway for this I believe, but not for XE.
    Thank you for your time!

    Thanks, after searching some information about Heterogeneous Services.
    I came accross this site http://www.databasejournal.com/features/oracle/article.php/10893_3442661_1
    I followed the instructions but I get the following error:
    SQL> create database link sqlxe connect to testuser identified by testuser USING
    'SQLXE';
    Database link created.
    SQL> desc employess@sqlxe
    ERROR:
    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 SQLXE
    I searched for the error ORA-28545 and followed some suggestions but I cannot find a solution.
    Here some information that might be usefull (sqlxe is the connectionname):
    C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN\Listener.ora
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = extproc)
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = extproc)
    (SID_DESC =
    (SID_NAME = SQLXE)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = hsodbc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    LISTENERSQLXE =
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
    (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
    DEFAULT_SERVICE_LISTENER = (XE)
    C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN\tnsnames.ora
    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = win2003)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    SQLXE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1522))
    (CONNECT_DATA =
    (SID=SQLXE)
    (HS=OK)
    lsnrctl start listenersqlxe
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 08-NOV-2007 10:46
    :31
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Starting tnslsnr: please wait...
    TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
    System parameter file is C:\oraclexe\app\oracle\product\10.2.0\server\network\ad
    min\listener.ora
    Log messages written to C:\oraclexe\app\oracle\product\10.2.0\server\network\log
    \listenersqlxe.log
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1522)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\PNPKEYipc))
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
    STATUS of the LISTENER
    Alias listenersqlxe
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
    ction
    Start Date 08-NOV-2007 10:46:34
    Uptime 0 days 0 hr. 0 min. 3 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\oraclexe\app\oracle\product\10.2.0\server\network\a
    dmin\listener.ora
    Listener Log File C:\oraclexe\app\oracle\product\10.2.0\server\network\l
    og\listenersqlxe.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1522)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\PNPKEYipc)))
    The listener supports no services
    The command completed successfully
    lsnrctl status listenersqlxe
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 08-NOV-2007 10:47
    :24
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522))
    STATUS of the LISTENER
    Alias listenersqlxe
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
    ction
    Start Date 08-NOV-2007 10:46:34
    Uptime 0 days 0 hr. 0 min. 52 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\oraclexe\app\oracle\product\10.2.0\server\network\a
    dmin\listener.ora
    Listener Log File C:\oraclexe\app\oracle\product\10.2.0\server\network\l
    og\listenersqlxe.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1522)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\PNPKEYipc)))
    The listener supports no services
    The command completed successfully
    Thanks in advance

  • Java Web Server 6.1 & Pooled SQL Server 2000 JDBC Connections

    If anyone can shed some light on this problem I would greatly appreciate it.
    I am unsuccessfully trying to use a database connnection retrieved from a pool configured using Java System Web Server 6.1 with the SQL Server 2000 JDBC Driver.
    The background:
    1. I have downloaded the SQL Server 2000 JDBC Driver and installed it on the web server.
    2. I used the Administration GUI to add the .jars(namely msbase.jar, msutil.jar, and mssqlserver.jar), to the classpath.
    3. Upon creating a simply JSP to access connection metadata using the direct connect method, ie.,
    Class.forName( com.microsoft.jdbc.sqlserver.SQLServerDriver);
    Connection con = DriverManager.getConnection( "jdbc:microsoft:sqlserver:// ....
    I am shown a successful output of...
    JDBC Test
    Registering JDBC Driver
    driverClass: com.microsoft.jdbc.sqlserver.SQLServerDriver loaded and registered.
    Driver Information
    Driver Name: SQLServer
    Driver Version: 2.2.0037
    Database Information
    Database Name: Microsoft SQL Server
    Database Version: Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: )
    Avalilable Catalogs
    catalog: master
    catalog: msdb
    catalog: Northwind
    catalog: pubs
    catalog: tempdb
    4. This tells me that the web server has access to the files necessary and the classpath is configured correctly.
    Now the fun begins...
    In order to set up the JDBC Connection Pool I have done the following...
    1. I have created a web.xml file for the web-app which contains the JSP and includes the following entry
    <resource-ref>
    <res-ref-name>jdbc/devjwscp</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    2. I have used the "JDBC Connection Pools" link under the "Java" tab in the Administration GUI to create a connection pool.
    "Pool Name:" is "devjwscp"
    "DataSource Classname" is set to "com.microsoft.jdbcx.sqlserver.SQLServerDataSource". All other properties have been left alone.
    3. I have used the "JDBC Resources" link under the "Java" tab in the Administration GUI to create a JNDI resource.
    "JNDI Name" is set to "jdbc/devjwscp"
    "Status" is "true"
    "Pool Name" is "devjwscp"
    The web-app JSP comes back with the following exception.
    JDBC Test
    Exception Thrown
    Cannot create resource instance
    javax.naming.NamingException: Cannot create resource instanceorg.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:167)
    javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
    org.apache.naming.NamingContext.lookup(NamingContext.java:834)
    org.apache.naming.NamingContext.lookup(NamingContext.java:181)
    org.apache.naming.NamingContext.lookup(NamingContext.java:822)
    org.apache.naming.NamingContext.lookup(NamingContext.java:181)
    org.apache.naming.NamingContext.lookup(NamingContext.java:822)
    org.apache.naming.NamingContext.lookup(NamingContext.java:181)
    org.apache.naming.NamingContext.lookup(NamingContext.java:822)
    org.apache.naming.NamingContext.lookup(NamingContext.java:194)
    org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
    javax.naming.InitialContext.lookup(InitialContext.java:347)
    _jsps._jdbctest_jsp._jspService(_jdbctest_jsp.java:236)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
    com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:667)
    com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:447)
    com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:363)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
    org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
    com.iplanet.ias.web.WebContainer.service(WebContainer.java:586)
    4. FYI my server.xml <RESOURCE> entry looks as is shown below
    <RESOURCES>
    <JDBCCONNECTIONPOOL name="devjwscp" datasourceclassname="com.microsoft.jdbcx.sqlserver.SQLServerDataSource" steadypoolsize="8" maxpoolsize="32" poolresizequantity="2" idletimeout="300" maxwaittime="60000" connectionvalidationrequired="off" connectionvalidationmethod="auto-commit" validationtablename="" failallconnections="off" transactionisolationlevel="read-uncommitted" isolationlevelguaranteed="off">
    <PROPERTY name="serverName" value="secret"/>
    <PROPERTY name="portNumber" value="1433"/>
    <PROPERTY name="User" value="secret"/>
    <PROPERTY name="Password" value="secret"/>
    </JDBCCONNECTIONPOOL>
    <JDBCRESOURCE jndiname="jdbc/devjwscp" poolname="devjwscp" enabled="on"/>
    </RESOURCES>
    What gives? Do I need to add anything else to the server.xml? I know the server.xml for JWS differs from Apache. I have done an exhaustive search of the web. Many other individuals have had the same thing happen, buy none of them offered any explaination or remedy.
    Thanks in advance.

    Hi,
    Were you able to get it working.
    I am using
    Sun ONE Web Server 6.1SP2 B04/07/2004 18:47
    I am still getiing the same error. I also suspect that there is something wrong with thr DTD too. It gives me the following when the server comes up.
    Sun ONE Web Server 6.1SP2 B04/07/2004 18:47
    Listening for transport dt_socket at address: 1699
    info: CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.4.2_04] from [Sun M
    icrosystems Inc.]
    info: WEB0100: Loading web module in virtual server [https-AW-NYNY-D609628.nna.
    wdpr.disy.com] at [acsanet]
    info: WEB0100: Loading web module in virtual server [https-AW-NYNY-D609628.nna.
    wdpr.disy.com] at [testing]
    failure: WEB0120: XML error parsing deployment descriptor [C:/Sun/WebServer6.1/h
    ttps-AW-NYNY-D609628.nna.wdpr.disy.com/webapps/https-AW-NYNY-D609628.nna.wdp
    r.disy.com/testing/WEB-INF/sun-web.xml]
    Failed to create the XML-DOM Document. Check your XML to make sure it is correc
    t.org.xml.sax.SAXParseException: Character conversion error: "Unconvertible UTF-8
    character beginning with 0xa0" (line number may be too low).
    at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
    at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1072)
    at org.apache.crimson.parser.InputEntity.isXmlDeclOrTextDeclPrefix(Input
    Entity.java:914)
    at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:1183)
    at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:653)
    at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
    at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
    at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl
    .java:185)
    at org.netbeans.modules.schema2beans.GraphManager.createXmlDocument(Grap
    hManager.java:711)
    at org.netbeans.modules.schema2beans.BaseBean.createGraph(BaseBean.java:
    2075)
    at com.iplanet.ias.web.WebContainer.loadWebModule(WebContainer.java:695)
    at com.iplanet.ias.web.WebContainer.loadStandaloneWebModule(WebContainer
    .java:626)
    at com.iplanet.ias.web.WebContainer.loadWebModules(WebContainer.java:600)
    at com.iplanet.ias.web.WebContainer.createVS(WebContainer.java:374)
    at com.iplanet.ias.server.J2EERunner.createVS(J2EERunner.java:223)
    info: WEB0100: Loading web module in virtual server [https-AW-NYNY-D609628.nna.wdpr.disy.com] at [search]
    config: HTTP4292: flex-init: Log file C:/Sun/WebServer6.1/https-AW-NYNY-D609628.
    nna.wdpr.disy.com/logs/access should be removed before changing its format
    info: HTTP3072: [LS ls1] http://AW-NYNY-D609628.nna.wdpr.disy.com:80 ready to
    accept requests
    startup: server started successfully
    info: CORE3274: successful server startup
    the sun-web.xml is as below:
    <?xml�version="1.0"�encoding="UTF-8"?>
    <!--
         Copyright 2002 Sun Microsystems, Inc. All rights reserved.
    -->
    <!DOCTYPE�sun-web-app�PUBLIC�"-//Sun�Microsystems,�Inc.//DTD�Application�Server�8.0�Servlet�2.4//EN"�"http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-0.dtd">
    <sun-web-app>
         <resource-ref>
              <res-ref-name>jdbc/oraclePool</res-ref-name>
              <jndi-name>jdbc/oraclePool</jndi-name>
         </resource-ref>
    </sun-web-app>
    Am I using the right DTD ?
    Please let me know.
    Thank you.
    -- Martin Louis

  • Null connection when trying to connect to SQL Server 2000 in Tomcat4.1.29

    Hi All,
    I am still struggling with null connection when trying to connect to sql server 2000 with tomcat using sun.jdbc.odbc.JdbcOdbcDriver
    Here is my server.xml
    <Server port="8005" shutdown="SHUTDOWN" debug="0">
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
    debug="0"/>
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
    debug="0"/>
    <GlobalNamingResources>
    <Resource name="UserDatabase" auth="Container"
    type="org.apache.catalina.UserDatabase"
    description="User database that can be updated and saved">
    </Resource>
    <ResourceParams name="UserDatabase">
    <parameter>
    <name>factory</name>
    <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
    </parameter>
    <parameter>
    <name>pathname</name>
    <value>conf/tomcat-users.xml</value>
    </parameter>
    </ResourceParams>
    <Resource auth="Container" description="Users and Groups
    Database" name="UserDatabase"
    scope="Shareable"
    type="org.apache.catalina.UserDatabase"/>
    <Resource name="jdbc/DefaultDS" scope="Shareable"
    type="javax.sql.DataSource"/>
    <ResourceParams name="UserDatabase">
    <parameter>
    <name>factory</name>
    <value>org.apache.catalina.users.
    MemoryUserDatabaseFactory</value>
    </parameter>
    <parameter>
    <name>pathname</name>
    <value>conf/tomcat-users.xml</value>
    </parameter>
    </ResourceParams>
    <ResourceParams name="jdbc/DefaultDS">
    <parameter>
    <name>validationQuery</name>
    <value></value>
    </parameter>
    <parameter>
    <name>user</name>
    <value>sa</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>5000</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>4</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>sa</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:odbc:JBoss-SQL://localhost:1433;databaseName=Development;selectMethod=cursor;</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>sun.jdbc.odbc.JdbcOdbcDriver</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>2</value>
    </parameter>
    </ResourceParams>
    </GlobalNamingResources>
    <!-- Define the Tomcat Stand-Alone Service -->
    <Service name="Tomcat-Standalone">
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
    port="8080" minProcessors="5" maxProcessors="75"
    enableLookups="true" redirectPort="8443"
    acceptCount="100" debug="0" connectionTimeout="20000"
    useURIValidationHack="false" disableUploadTimeout="true" />
    <!-- Note : To disable connection timeouts, set connectionTimeout value
    to -1 -->
    <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
    <!--
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
    port="8443" minProcessors="5" maxProcessors="75"
    enableLookups="true"
    acceptCount="100" debug="0" scheme="https" secure="true"
    useURIValidationHack="false" disableUploadTimeout="true">
    <Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
    clientAuth="false" protocol="TLS" />
    </Connector>
    -->
    <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
    port="8009" minProcessors="5" maxProcessors="75"
    enableLookups="true" redirectPort="8443"
    acceptCount="10" debug="0" connectionTimeout="0"
    useURIValidationHack="false"
    protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
    <!-- Define an AJP 1.3 Connector on port 8009 --><Logger className="org.apache.catalina.logger.FileLogger"
    prefix="catalina_log." suffix=".txt"
    timestamp="true"/>
    <!-- Define the default virtual host -->
    <Host name="localhost" debug="0" appBase="webapps"
    unpackWARs="true" autoDeploy="true">
    <Logger className="org.apache.catalina.logger.FileLogger"
    directory="logs" prefix="localhost_log." suffix=".txt"
    timestamp="true"/>
    <Environment name="maxExemptions" type="java.lang.Integer"
    value="15"/>
    <Parameter name="context.param.name" value="context.param.value"
    override="false"/>
    <Resource name="jdbc/DefaultDS" auth="container" type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/DefaultDS">
    <!-- Maximum number of dB connections in pool.
    Set to 0 for no limit.
    -->
    <parameter>
    <name>maxActive</name>
    <value>8</value>
    </parameter>
    <!-- Maximum number of idle dB connections to retain in pool.
    Set to 0 for no limit.
    -->
    <parameter>
    <name>maxIdle</name>
    <value>4</value>
    </parameter>
    <!-- Maximum time to wait for a dB connection to become available
    in ms, in this example 10 seconds. An Exception is thrown if
    this timeout is exceeded. Set to -1 to wait indefinitely.
    -->
    <parameter>
    <name>maxWait</name>
    <value>5000</value>
    </parameter>
    <!-- MS Sql Server dB username and password for dB connections
    -->
    <parameter>
    <name>user</name>
    <value>sa</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>sa</value>
    </parameter>
    <!-- Class name for MS Sql Server JDBC driver
    -->
    <parameter>
    <name>driverClassName</name>
    <value>sun.jdbc.odbc.JdbcOdbcDriver</value>
    </parameter>
    <!-- The JDBC connection url for connecting to MS Sql Server dB.
    -->
    <parameter>
    <name>url</name>
    <value>jdbc:odbc:JBoss-SQL://localhost:1433;databaseName=Development;selectMethod=cursor;</value>
    </parameter>
    <!-- This Databae Connection Pool Description.
    -->
    <parameter>
    <name>description</name>
    <value>JDBC Driver: sun.jdbc.odbc.JdbcOdbcDriver</value>
    </parameter>
    </ResourceParams>
    <Resource name="mail/Session" auth="Container"
    type="javax.mail.Session"/>
    <ResourceParams name="mail/Session">
    <parameter>
    <name>mail.smtp.host</name>
    <value>localhost</value>
    </parameter>
    </ResourceParams>
    <ResourceLink name="linkToGlobalResource"
    global="simpleValue"
    type="java.lang.Integer"/>
    </Host>
    </Engine>
    </Service>
    </Server>
    and my web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <!-- Standard Action Servlet Mapping -->
    <web-app>
    <resource-ref>
    <res-ref-name>jdbc/DefaultDS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    and JBoss-SQL is data source I created from control panel settings and here is way I am retrieving connetion
    InitialContext initCtx = new InitialContext();
    DataSource ds = (DataSource) initCtx.lookup("java:comp/env/jdbc/DefaultDS");
    Connection con = ds.getConnection();
    return con;
    I tried connecting as mentioned in this website
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html#Common%20Problems.But didn't help
    Please help urgent
    Sorry for long file. Can any one please help me in solving this problem.
    Thanks in advnace
    Kurakula

    I'd recommend that you not use the JDBC-ODBC bridge driver to connect to SQL Server. M$ and jTDS are two free type IV JDBC drivers that you should use instead. Put those JARs in the WEB-INF/lib directory.
    The database URL you're using is not correct if you change drivers. Consult the docs to find out what the proper syntax is.
    MOD

  • Database Connection in SQL Server 2000

    Hi All!
    I would like to ask your expertise regarding JDBC-MS SQL Server 2000.
    I have here a sample code in connecting to SQL Server 2000, AgriMrpPrd Database using the account "sa" and the password "092802". I have tried running the code in my local server at home and It successfully runs, but when I tried running it on my local server in the office, I was not able to create a connection object though I already have changed the HOST, PORT, DATABASE, USERNAME, and PASSWORD values.
    I have tried logging in using my local account, removed the LAN connection, start my local server and tried connecting to it but still it does not work.
    I have tried turning the firewall OFF and try reconnecting but it there was no improvement.
    I do not know if there is a difference if there is my computer is on a DOMAIN (althought I am only connecting to my local server).
    Source Code:
    import javax.swing.*;
    import java.sql.*;
    import com.microsoft.jdbc.sqlserver.*;
    public class SQLServerConnection{
    public String un, pw, db, host, port, url, driver;
    public Connection conn=null;
    public void connectDB(){
    String msg="",title="MS SQL Server - JDBC:ODBC Connection";          
    int msgType=0;
    driver="com.microsoft.jdbc.sqlserver.SQLServerDriver";
    host="206.101.216.95";
    port="1433";
    un="sa";
    pw="092803";
    db="AgriMrpPrd";
    url="jdbc:microsoft:sqlserver://" + host + ":" + port + ";DatabaseName=" + db;
    try{
    Class.forName(driver);
    conn=DriverManager.getConnection(url,un,pw);     
    System.out.println("Connected to Database!");                    
    }catch(Exception ex){
    msg="Unable to connect to MS SQL Server!";
    msgType=JOptionPane.ERROR_MESSAGE;
    JOptionPane.showMessageDialog(null,msg,title,msgType);
    System.exit(0);               
    public static void main(String args[]){
    SQLServerConnection ssc=new SQLServerConnection();
    ssc.connectDB();
    Please give me wisdom in handling this problem...
    Take care always and God blesss
    MADz

    Hi All!
    I would like to ask your expertise regarding JDBC-MS
    SQL Server 2000.
    I have here a sample code in connecting to SQL Server
    2000, AgriMrpPrd Database using the account "sa" and
    the password "092802". I have tried running the code
    in my local server at home and It successfully runs,
    but when I tried running it on my local server in the
    office, I was not able to create a connection object
    though I already have changed the HOST, PORT,
    DATABASE, USERNAME, and PASSWORD values.If the code runs in one place and not the other, it's got to be a problem with seeing the host.
    I have tried logging in using my local account,
    removed the LAN connection, start my local server and
    tried connecting to it but still it does not work.
    I have tried turning the firewall OFF and try
    reconnecting but it there was no improvement.
    I do not know if there is a difference if there is my
    computer is on a DOMAIN (althought I am only
    connecting to my local server).I have no idea how to fix your problem, but there are several things to comment on about your code:
    (1) You don't have to import the microsoft package. It's actually a bad idea.
    (2) I'd name this class DbConnection, because if you wrote it properly it might have a chance of being useful wih other databases, too.
    (3) You hardwire all the connection information. Better to pass it in so changing the database doesn't require a recompile.
    (4) It's bad to mingle Swing and database code. Take those JOptionPane calls out.
    (5) Print the stack trace out when you catch an exception. You're losing a lot of information by handling it that way.
    %

  • Connecting to SQL Server on Windows 8 from WindowsCE

    Hello,
    I need to make a connection to SQLServer 2008 which is on my developer machine, later it will be SQL Server on some production machine from .Net Compact Framework developed app on WindowsCE.
    When I using local sdf file I use SqlCeConnection for DB connection but how to connect from same app local SQL Compact databse and SQL Server on some server.
    Thanks in advance...

    Related blog: How to connect to SQL Server from a Windows Mobile Emulator
    Forum thread:
    Windows mobile connect with sql server 2008 r2
    Kalman Toth Database & OLAP Architect
    Free T-SQL Scripts
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Connecting from oracle on windows 2008 64 bit to sql server.

    Hi,
    Oracle Server name: oraxyz
    Database: 11.2.0.4 on windows 64 Bit.
    Database home: d:\app\product\11.2.0\db_1
    SQL server: sqlabc
    I have a oracle database 11.2.0.4 on widows 2008 64 Bit on host oraxyz. I have to connect to SQL server sqlabc from this oracle database.
    So I installed gateway for windows on oraxyz server in location d:\app\product\11.2.0\gateway.
    My initdg4msql in Gaeway oracle home dg4msql\admin looks like this.
    # This is a customized agent init file that contains the HS parameters
    # that are needed for the Database Gateway for Microsoft SQL Server
    # HS init parameters
    HS_FDS_CONNECT_INFO=[sqlabc]:1433//prodsql
    HS_FDS_TRACE_LEVEL=OFF
    HS_FDS_RECOVERY_ACCOUNT=RECOVER
    HS_FDS_RECOVERY_PWD=RECOVER
    Then I created a listener in gateway oracle home as follows.
    DG4MSQL =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = oraxyz)(PORT = 1524))
    SID_LIST_DG4MSQL =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = dg4msql)
          (ORACLE_HOME = D:\app\product\11.2.0\Gateway)
          (PROGRAM = dg4msql)
    Then in Oracle db home I created a tns alias as follows.
    dg4msql =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = oraxyz)(PORT = 1524))
        (CONNECT_DATA =
          (SID = dg4msql)
          (HS = OK)
    Then created a database link as follows
    SQL>CREATE PUBLIC DATABASE LINK tosql connect to abc identified by 123 using 'DG4MSQL';
    SQL> DESC sqlservertable@tosql gives me error
    ERROR:
    ORA-28546: connection initialization failed, probable Net8 admin error
    ORA-02063: preceding line from tosql
    Could any one please help.
    Do I have to create any ODBC connection for that?
    BR

    Not part of your problem (yet) but I always get heartburn when I see someone naming their listener as if it has a relationship to something when it doesn't.  There really is no point to naming a listener as anything but its default name of LISTENER.
    So, in your listener.ora, instead of
    DG4MSQL =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = oraxyz)(PORT = 1524))
    SID_LIST_DG4MSQL =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = dg4msql)
          (ORACLE_HOME = D:\app\product\11.2.0\Gateway)
          (PROGRAM = dg4msql)
    Just use
    LISTENER=
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = oraxyz)(PORT = 1524))
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = dg4msql)
          (ORACLE_HOME = D:\app\product\11.2.0\Gateway)
          (PROGRAM = dg4msql)

  • Error in ODBC after long time connection (MS.SQL Server 2000)

    i' using windows XP
    and create MS.SQL Server connection through SYSTEM DSN of ODBC DATA SOURCE ADMINISTRATOR in WinXP Control Panel
    using jdbc.odbc connection to make connection to database.
    it's working, but after many request of data transaction with database.
    my program closed it self.
    an a error file appear in the path of program.
    i don't remember all what the error file contain exactly - it's about ODBC connection ( i already remove the error file long day a go, if i got it again i will post it here)
    is java cannot connect database with ODBC properly?
    thanks.

    this is the error:
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c901010, pid=2528, tid=3508
    # Java VM: Java HotSpot(TM) Client VM (1.4.2_15-b02 mixed mode)
    # Problematic frame:
    # C [ntdll.dll+0x1010]
    --------------- T H R E A D ---------------
    Current thread (0x02e64358): JavaThread "ServerBeritaThread" [_thread_in_native, id=3508]
    siginfo: ExceptionCode=0xc0000005, reading address 0x00000018
    Registers:
    EAX=0x00000004, EBX=0x0355f9b4, ECX=0x7ffaf000, EDX=0x00000004
    ESP=0x0355f950, EBP=0x0355f968, ESI=0x00000000, EDI=0x039414e8
    EIP=0x7c901010, EFLAGS=0x00010297
    Top of Stack: (sp=0x0355f950)
    0x0355f950: 74355a16 00000004 0394150c 7432139f
    0x0355f960: 0394150c 00000000 0355f980 7432a244
    0x0355f970: 0394150c 74350000 02e643f4 02e64358
    0x0355f980: 0355f994 7432a653 02fbde98 02e643f4
    0x0355f990: 143aff08 0355f9ac 03711157 039414e8
    0x0355f9a0: 0355f9b4 02e64358 143aff50 0355f9e4
    0x0355f9b0: 00a881a6 00000000 0355fa00 039414e8
    0x0355f9c0: 00000000 0355f9f4 0355f9c8 00000000
    Instructions: (pc=0x7c901010)
    0x7c901000: 90 90 90 90 90 64 8b 0d 18 00 00 00 8b 54 24 04
    0x7c901010: 83 7a 14 00 75 4f f0 ff 42 04 75 19 8b 41 24 89
    Stack: [0x03520000,0x03560000), sp=0x0355f950, free space=254k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C [ntdll.dll+0x1010]
    C [ODBC32.dll+0xa244]
    C [ODBC32.dll+0xa653]
    C [JdbcOdbc.dll+0x1157]
    j sun.jdbc.odbc.JdbcOdbc.allocConnect(J[B)J+0
    j sun.jdbc.odbc.JdbcOdbc.SQLAllocConnect(J)J+30
    j sun.jdbc.odbc.JdbcOdbcDriver.allocConnection(J)J+6
    j sun.jdbc.odbc.JdbcOdbcConnection.initialize(Ljava/lang/String;Ljava/util/Properties;I)V+37
    j sun.jdbc.odbc.JdbcOdbcDriver.connect(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;+129
    j java.sql.DriverManager.getConnection(Ljava/lang/String;Ljava/util/Properties;Ljava/lang/ClassLoader;)Ljava/sql/Connection;+154
    j java.sql.DriverManager.getConnection(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/sql/Connection;+41
    j Prosesor.processInput(Ljava/lang/String;)Ljava/lang/String;+51
    j ServerBeritaThread.run()V+35
    v ~StubRoutines::call_stub
    V [jvm.dll+0x752e6]
    V [jvm.dll+0xaf627]
    V [jvm.dll+0x751f3]
    V [jvm.dll+0x74eef]
    V [jvm.dll+0x74f28]
    V [jvm.dll+0x8ce4f]
    V [jvm.dll+0xd3b07]
    V [jvm.dll+0xd3ad5]
    C [MSVCRT.dll+0x2a3b0]
    C [kernel32.dll+0xb50b]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j sun.jdbc.odbc.JdbcOdbc.allocConnect(J[B)J+0
    j sun.jdbc.odbc.JdbcOdbc.SQLAllocConnect(J)J+30
    j sun.jdbc.odbc.JdbcOdbcDriver.allocConnection(J)J+6
    j sun.jdbc.odbc.JdbcOdbcConnection.initialize(Ljava/lang/String;Ljava/util/Properties;I)V+37
    j sun.jdbc.odbc.JdbcOdbcDriver.connect(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;+129
    j java.sql.DriverManager.getConnection(Ljava/lang/String;Ljava/util/Properties;Ljava/lang/ClassLoader;)Ljava/sql/Connection;+154
    j java.sql.DriverManager.getConnection(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/sql/Connection;+41
    j Prosesor.processInput(Ljava/lang/String;)Ljava/lang/String;+51
    j ServerBeritaThread.run()V+35
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    =>0x02e64358 JavaThread "ServerBeritaThread" [_thread_in_native, id=3508]
    0x02facf38 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=1048]
    0x02fadc20 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=2028]
    0x02e61db0 JavaThread "AWT-Windows" daemon [_thread_in_native, id=728]
    0x02e20e48 JavaThread "AWT-Shutdown" [_thread_blocked, id=4056]
    0x009d03c0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=1568]
    0x009cf630 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1572]
    0x009ccba0 JavaThread "Finalizer" daemon [_thread_blocked, id=2580]
    0x009cb818 JavaThread "Reference Handler" daemon [_thread_blocked, id=980]
    0x00035aa8 JavaThread "main" [_thread_in_native, id=1684]
    Other Threads:
    0x00a0b6c0 VMThread [id=1256]
    0x00a0cab8 WatcherThread [id=2276]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 576K, used 43K [0x10010000, 0x100b0000, 0x104f0000)
    eden space 512K, 1% used [0x10010000, 0x10012448, 0x10090000)
    from space 64K, 53% used [0x10090000, 0x10098930, 0x100a0000)
    to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000)
    tenured generation total 1408K, used 665K [0x104f0000, 0x10650000, 0x14010000)
    the space 1408K, 47% used [0x104f0000, 0x105967e8, 0x10596800, 0x10650000)
    compacting perm gen total 4096K, used 4065K [0x14010000, 0x14410000, 0x18010000)
    the space 4096K, 99% used [0x14010000, 0x14408580, 0x14408600, 0x14410000)
    Dynamic libraries:
    0x00400000 - 0x0040b000      C:\java\bin\java.exe
    0x7c900000 - 0x7c9b0000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c8f4000      C:\WINDOWS\system32\kernel32.dll
    0x77dd0000 - 0x77e6b000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77e70000 - 0x77f01000      C:\WINDOWS\system32\RPCRT4.dll
    0x77c10000 - 0x77c68000      C:\WINDOWS\system32\MSVCRT.dll
    0x08000000 - 0x08144000      C:\java\jre\bin\client\jvm.dll
    0x77d40000 - 0x77dd0000      C:\WINDOWS\system32\USER32.dll
    0x77f10000 - 0x77f56000      C:\WINDOWS\system32\GDI32.dll
    0x76b40000 - 0x76b6d000      C:\WINDOWS\system32\WINMM.dll
    0x10000000 - 0x10007000      C:\java\jre\bin\hpi.dll
    0x76bf0000 - 0x76bfb000      C:\WINDOWS\system32\PSAPI.DLL
    0x00390000 - 0x0039e000      C:\java\jre\bin\verify.dll
    0x003b0000 - 0x003c9000      C:\java\jre\bin\java.dll
    0x003d0000 - 0x003de000      C:\java\jre\bin\zip.dll
    0x02e70000 - 0x02f84000      C:\java\jre\bin\awt.dll
    0x73000000 - 0x73026000      C:\WINDOWS\system32\WINSPOOL.DRV
    0x76390000 - 0x763ad000      C:\WINDOWS\system32\IMM32.dll
    0x774e0000 - 0x7761c000      C:\WINDOWS\system32\ole32.dll
    0x5ad70000 - 0x5ada8000      C:\WINDOWS\system32\uxtheme.dll
    0x033e0000 - 0x03432000      C:\java\jre\bin\fontmanager.dll
    0x73760000 - 0x737a9000      C:\WINDOWS\system32\ddraw.dll
    0x73bc0000 - 0x73bc6000      C:\WINDOWS\system32\DCIMAN32.dll
    0x73940000 - 0x73a10000      C:\WINDOWS\system32\D3DIM700.DLL
    0x74720000 - 0x7476b000      C:\WINDOWS\system32\MSCTF.dll
    0x035e0000 - 0x035ef000      C:\java\jre\bin\net.dll
    0x71ab0000 - 0x71ac7000      C:\WINDOWS\system32\WS2_32.dll
    0x71aa0000 - 0x71aa8000      C:\WINDOWS\system32\WS2HELP.dll
    0x605d0000 - 0x605d9000      C:\WINDOWS\system32\mslbui.dll
    0x77120000 - 0x771ac000      C:\WINDOWS\system32\OLEAUT32.DLL
    0x20b00000 - 0x20b4b000      C:\WINDOWS\system32\imon.dll
    0x71ad0000 - 0x71ad9000      C:\WINDOWS\system32\WSOCK32.dll
    0x71a50000 - 0x71a8f000      C:\WINDOWS\system32\mswsock.dll
    0x662b0000 - 0x66308000      C:\WINDOWS\system32\hnetcfg.dll
    0x71a90000 - 0x71a98000      C:\WINDOWS\System32\wshtcpip.dll
    0x03710000 - 0x0371c000      C:\java\jre\bin\JdbcOdbc.dll
    0x74320000 - 0x7435d000      C:\WINDOWS\system32\ODBC32.dll
    0x5d090000 - 0x5d127000      C:\WINDOWS\system32\COMCTL32.dll
    0x7c9c0000 - 0x7d1d4000      C:\WINDOWS\system32\SHELL32.dll
    0x77f60000 - 0x77fd6000      C:\WINDOWS\system32\SHLWAPI.dll
    0x763b0000 - 0x763f9000      C:\WINDOWS\system32\comdlg32.dll
    0x773d0000 - 0x774d2000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
    0x20000000 - 0x20017000      C:\WINDOWS\system32\odbcint.dll
    0x77c00000 - 0x77c08000      C:\WINDOWS\system32\VERSION.dll
    0x77fe0000 - 0x77ff1000      C:\WINDOWS\system32\Secur32.dll
    0x5fe80000 - 0x5fe9b000      C:\WINDOWS\system32\odbccp32.dll
    0x77c70000 - 0x77c93000      C:\WINDOWS\system32\msv1_0.dll
    0x76d60000 - 0x76d79000      C:\WINDOWS\system32\iphlpapi.dll
    VM Arguments:
    java_command: ServerBerita
    Launcher Type: SUN_STANDARD
    Environment Variables:
    CLASSPATH=.;C:\PROGRA~1\JMF\lib\sound.jar;C:\PROGRA~1\JMF\lib\jmf.jar;C:\PROGRA~1\JMF\lib;.;.;d:\PROGRA~1\JMF21~1.1E\lib\sound.jar;d:\PROGRA~1\JMF21~1.1E\lib\jmf.jar;d:\PROGRA~1\JMF21~1.1E\lib;
    PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;c:\java\bin;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin;c:\apache\mysql\bin;;C:\PROGRA~1\COMMON~1\MUVEET~1\030625
    USERNAME=acer
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 2, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 2 family 6, cmov, cx8, fxsr, mmx, sse, sse2
    Memory: 4k page, physical 1038440k(478648k free), swap 1712796k(1228644k free)
    vm_info: Java HotSpot(TM) Client VM (1.4.2_15-b02) for windows-x86, built on May 22 2007 17:01:47 by "java_re" with MS VC++ 6.0

  • Connection String SQL SERVER 2000

    Hi everybody:
    I have a problem:
    I want to connect to Sql Server 2000 from Java Server Pages but I can not do it.
    In Active Server Pages I connect using:
    "Provider=SQLOLEDB;Data Source=" SERVIDOR";Initial Catalog=IntranetHipohard;User id=sa;Password="
    I would like that somebody write me by email.
    This string not is valid for Java Server Pages.
    How can I do it?
    Thank you very much and sorry my language.

    Well, it entirely depends on the JDBC driver you are using. If you are using Microsoft's driver currently in beta 2 (http://www.microsoft.com/sql), you use the following:
    Driver Name
    com.microsoft.jdbc.sqlserver.SQLServerDriver
    Connection URL
    jdbc:microsoft:sqlserver://<HOST>:1433;DatabaseName=<DATABASE>;User=<USER>;Password=<PASSWORD>
    Where <HOST> is the IP or hostname of the machine running SQL Server 2000, and <DATABASE> is the name of the database you are connecting to (optional).
    Hope this is what you need.

  • Connection with SQL Server 2000 to SQL Developer 1.2 Migration Workbench

    Hi all,
    I keep getting the following error with setup for SQL Developer 1.2 Migration Workbench connection to SQL Server 2000 database:
    "Status: Failure -Network error IOException: Connection refused:connect"
    I can access the Microsoft SQL Server 2000 database with username
    and password using Enteprise Manager. However for some odd
    reason the Oracle SQL Developer 1.2 cannot connect to it.

    I was having this problem too. I'll mangle this explanation, but Our SQLServer instance was on a local server with some named DNS something. So, to get to the server, we used theservername.outdomain instead of an IP. We could never get it to connect through the named server. We got an SQLServer instance going on a server that we could connect to through a regular IP, and it connected just fine.
    Also, are you using the JTDS driver, or microsofts driver? We have only been able to connect with the JTDS driver. http://jtds.sourceforge.net/

  • How to connect MS SQL Server 2000 with JDeveloper 11g

    Hi,
    I am new to JDevleoper, Is it possible to connect MS SQL Server 2000 with JDeveloper 11g.
    If possible can anyone help me in doing that?
    waiting for ur reply...
    Thanks in advance
    Regards,
    reddy

    Shay or other knowledgeable folks,
    Is there a way to utilize the wizard for "Business Tier > ADF Business Components > Business Components from Tables" for SQL Server 2000, 2005 or 2008. I can successfully execute sql via java programmatically or import a table from SQL Server with "Business Tier > ADF Business Components > Entity Object" wizard, but the Business Components from Tables simply doesn't see any tables under any schema. Without the "Business Components from Tables", i don't get the referential constraints imported into the application and to code all those from scratch is just not as elegant. So far i have only utilized the sql server jdbc driver from Microsoft (versions, 1.1, 1.2 and 2.0). Is there an alternative client that i need to use to enable selecting tables from that "Business Components from Tables" wizard. Is this a limitation of SQL Server, the jdbc driver or the wizard itself? Did anybody else experience the same issues? I am using Jdeveloper 11.1.1.0.1 against SQL Server 2005 (currently)
    Thanks,
    Andy

  • Have anyone connected to sql server 2000 from forms 6i release 2

    Have anyone connected to sql server 2000 from forms 6i release 2
    on winNT 2000. sql server is also on same machine.
    If yes then pls tell me details regarding
    oca version
    any patch required for forms 6i release 2(download location of
    patch)
    version of odbc drivers
    or any other detils
    urgent
    thanks
    yogesh

    refresh

  • Can't connect  to SQL Server 2000 from serlet

    Hi,
    I can connect to SQL Server 2000 from standalone program after set the classpath properly.
    but I Can't connect to SQL Server 2000 from serlet, I am using Tomcat 4.1 and Win2K pro now. Do I need to set something for servlet just like CLASSPATH?
    Any help will be appreciated.
    package usingjsp;
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    public class JDBCServlet extends GenericServlet
    protected Connection conn;
    public void init()
    try
    // Make sure the JdbcOdbcDriver class is loaded
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    // Try to connect to a database via ODBC
    conn = DriverManager.getConnection(
    "jdbc:microsoft:sqlserver://hu:1433", "sa","");
    catch (Exception exc)
    // If there's an error, use the servlet logging API
    getServletContext().log(
    "Error making JDBC connection: ", exc);
    public void service(ServletRequest request, ServletResponse response)
    throws java.io.IOException
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("<HTML>");
    out.println("<BODY>");
    out.println("<PRE>");
    out.println("The JDBC connection is:");
    out.println(conn);
    out.println("</PRE>");
    out.println("</BODY>");
    out.println("</HTML>");

    i also have this problem..do u have any solution?

  • Unable to connect to sql server 2008 r2 after upgrading from framework 4.0 to 4.5.2 in windows 7 environment

    Hi  All,
    BackGround
    I used to connect to database with Encrypt set true  in sql connection which helps  established encrypted data base connection . I verified  that created certificate in order
    to provide Encrypted connection to database for client is valid.
    Issue :Issue
    is un-able to connect to sql sever2008 r2 from vs2013 by enforcing encryption to true.
    while trying to test the connection from vs2013 error log getting recorded as well as error notification is getting populated as below .
    Step1 :
    from Vs2013 trying to connect to sql server 2008 r2
    step 2: on Click test Connection . getting below mentioned error notification
    Event Viewer Log:<o:p></o:p>
     <o:p></o:p>
    (Process Id: 7472)
    <o:p></o:p>
    .Net SqlClient Data Provider:<o:p></o:p>
    A connection was successfully established with the server, but then an error
    occurred during the login process. (provider: SSL Provider, error: 0 - The
    target principal name is incorrect.)<o:p></o:p>
       at
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception,
    Boolean breakConnection, Action`1 wrapCloseInAction)<o:p></o:p>
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
    stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)<o:p></o:p>
       at
    System.Data.SqlClient.TdsParserStateObject.SNIWritePacket(SNIHandle handle,
    SNIPacket packet, UInt32& sniError, Boolean canAccumulate, Boolean
    callerHasConnectionLock)<o:p></o:p>
       at System.Data.SqlClient.TdsParserStateObject.WriteSni(Boolean
    canAccumulate)<o:p></o:p>
       at System.Data.SqlClient.TdsParserStateObject.WritePacket(Byte
    flushMode, Boolean canAccumulate)<o:p></o:p>
       at System.Data.SqlClient.TdsParser.TdsLogin(SqlLogin rec,
    FeatureExtension requestedFeatures, SessionData recoverySessionData)<o:p></o:p>
       at
    System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
    serverInfo, String newPassword, SecureString newSecurePassword, Boolean
    ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)<o:p></o:p>
       at
    System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo
    serverInfo, String newPassword, SecureString newSecurePassword, Boolean
    redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential
    credential, TimeoutTimer timeout)<o:p></o:p>
       at
    System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer
    timeout, SqlConnectionString connectionOptions, SqlCredential credential,
    String newPassword, SecureString newSecurePassword, Boolean
    redirectedUserInstance)<o:p></o:p>
       at
    System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
    identity, SqlConnectionString connectionOptions, SqlCredential credential,
    Object providerInfo, String newPassword, SecureString newSecurePassword,
    Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions,
    SessionData reconnectSessionData)<o:p></o:p>
       at
    System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
    options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo,
    DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions
    userOptions)<o:p></o:p>
       at
    System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool
    pool, DbConnection owningObject, DbConnectionOptions options,
    DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)<o:p></o:p>
       at
    System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
    owningObject, DbConnectionOptions userOptions, DbConnectionInternal
    oldConnection)<o:p></o:p>
       at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
    owningObject, DbConnectionOptions userOptions, DbConnectionInternal
    oldConnection)<o:p></o:p>
       at
    System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection
    owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate,
    Boolean onlyOneCheckConnection, DbConnectionOptions userOptions,
    DbConnectionInternal& connection)<o:p></o:p>
       at
    System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection
    owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions,
    DbConnectionInternal& connection)<o:p></o:p>
       at
    System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection
    owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions
    userOptions, DbConnectionInternal oldConnection, DbConnectionInternal&
    connection)<o:p></o:p>
       at
    System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection
    outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1
    retry, DbConnectionOptions userOptions)<o:p></o:p>
       at
    System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)<o:p></o:p>
       at
    System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)<o:p></o:p>
       at System.Data.SqlClient.SqlConnection.Open()<o:p></o:p>
    Inner Exception:<o:p></o:p>
    :<o:p></o:p>
    The target principal name is incorrect

    The target principal name is incorrect
    Hi Rahul.U,
    Are you able to connect to SQL Server successfully from SQL Server Management Studio (SSMS) when enforcing encryption?
    According to above error message, it could be caused by the inappropriate server name or incorrect TrustServerCertificate configuration in the connection string from Visual Studio. There are some proposals for you troubleshooting this error.
    1. Make sure that you connect to the SQL server using the fully qualified domain name (FQDN).
    2. When connecting to a SQL Server instance with a valid certificate, please add the
    TrustServerCertificate
    parameter and set it to true in the connection string. For more details, please review this
    article.
    However, if you can successfully connect to SQL Server via SSMS, but still fail to connect to SQL Server from Visual Studio, I would like to recommend you post the question in the .Net Framework forum at
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=netdevelopment . It is appropriate and more experts will assist you.
    There are similar articles about error “The target principal name is incorrect” for your reference.
    http://serverfault.com/questions/458935/aws-rds-sql-server-ssl-connection-the-target-principal-name-is-incorrect
    http://www.derekseaman.com/2013/09/sql-2012-failover-cluster-pt-12-kerberos-n.html
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

Maybe you are looking for