How to connect SQL server using JRun

I am relatively dumb into Java. I am running JRun server in Unix box, and I need to connect to the SQL server (full marks for guesssing that SQL server is on the Win2K box).
Now I want to connect to the SQL server from Jrun using JSPs.
Question:
1. Is JDBC:ODBC only way to connect to the SQL server, if yes -
2. Do I have to create a DSN on the server for the JDBC:ODBC bridge to work
3. Can I write my own database connection package,
Appreciate if any body can help me with this problem, and if you have written a package to connect to the database, then would be nice if you would let me try the same.
If you have any responses, please email me at [email protected]
Thanks in Advance for the anticipated help.
Viviar Prasad

Hi Prasad,
There is two ways(what I have done) to connect to sql server in jRun..
1) using your jdbc - odbc connectivity using your type one jdbc driver..
2) using type 4 driver.. (type 2 and 3 are not available right now for sql server)
in 1 you have to create an dsn and use it directly in program bypassing jrun management console(I mean u don't have to configure for that)
in 2 case you need to use jrun proprietery driver for the jdbc... there is a problem here..
this driver is available in Jrun 3.0 enterprise edition only and still has got some problem so you need to apply service pack-2 to your Jrun installation and need to download the driver.. jdbc driver from following link
ftp://ftp.allaire.com/kbftp/jrun/all/jrun_drivers.jar.zip
this will suply a html doc along with the driver . which will explain you how to apply..
you can download jdbc driver specilly for sql server from this link http://www.j-netdirect.com/jsqlconnect2_26.zip
but it will expire in a month..
any way once you have obtain any of the above driver, follow these step to configure jdbc in jrun.. you need to put the driver in the classpath..
1 - open your management console
2- select the webapplication for which you want to configure from left frame of mc(management console)
3- select jdbc data source click the add button and follow the wizard..
for more info ref to jrun quick start configuring jdbc settings that came with your JRun..
or you can directly click the link there and type
the name of the
first
datasource(you have supply any name you will be using that to access db in your java prog)
second name of the the jdbc driver
for Jrun it's
allire.jrun.jdbc.JRunDriver
for net direct
com.jnetdirect.jsql.JSQLDriver
third
url for jrun driver
jdbc:jrun:sqlserver://hostname:portno/databasename = dbname; USER = uname; Password = password
where dbname is your database name
uname is your sql server user name e.g sa
password is your password for the corresponding user name
where hostname is the name of the computer where your sqlserver is running it could be an ip e.g 10.0.0.32:1433
1433 is the default port no for the sqlserver if you are using tcp protocol to connect to the sql server
url for net direct
jdbc:JSQLConnect//hostname:port/databasename=dbname; USER =uname; Password = password
for any more information on this you can mail me in this id
[email protected]
All the best..
regards
Bishwa

Similar Messages

  • How to connect sql server using oracle Client

    Hi,
    I am working in oracle9i and windows os 32 bit.
    I need to connect SQL server 2000 from my oracle client..
    I heard about heterogeneous connectivity ...
    Please expalin me the steps what to add and how to connect the sql server...
    Regs....

    Are you trying to connect to SQL Server from your Oracle database (i.e. create a database link in Oracle to SQL Server)? Or are you trying to connect to SQL Server using your Oracle client software (i.e. SQL*Plus)?
    The former just requires Heterogeneous Services with Generic Connectivity. The latter is functionality that has been depricated and probably no longer works in your environment.
    Justin

  • How to connect SQL server

    Hi
    I want to know how to connect SQL server using DNSless connection ?
    /* 2003/02/06 eric.leung
    * Source : HOME
    import java.sql.*;
    import java.lang.*;
    public class ejdbcsel {
         public static void main(String args[]) {
              // eric_jsp is ODBC User DNS
              // String url = "jdbc:odbc:eric_jsp";     
              // Using DSNless connection
              String url = "";
              url = "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)}" +
              ";SERVER=127.0.0.1;DBQ=c:\\example\\ERIC_JSP.mdb";
              Connection con;
              String query;
              query = "select * from pt_mstr";     
              Statement stmt;
         try {     
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         } catch (ClassNotFoundException e) {
              System.err.print("ClassNotFoundException " );
              System.err.println(e.getMessage());
         try {
              con = DriverManager.getConnection (url,"","");
              stmt = con.createStatement();
              ResultSet rec = stmt.executeQuery(query);          
              // Scan the Database
              while(rec.next()) {
                   System.out.println(rec.getString("pt_part") + "\t"
                   + rec.getString("pt_desc"));     
              stmt.close();
              con.close();
         } catch (SQLException ex) {
              System.err.println("SQLException: " + ex.getMessage());
         catch (Exception e) {
              System.err.println("Error: " + e.toString() + " " + e.getMessage());

    Use a driver...
    http://java.sun.com/products/jdbc/driverdesc.html
    http://industry.java.sun.com/products/jdbc/drivers

  • How to connect Sql Server 2000 using JDBC ODBC Driver

    How to connect Sql Server 2000 using JDBC ODBC Driver ?
    plz Send Syntax.
    thanks

    In SQL Server 2000 the driver class is com.microsoft.jdbc.sqlserver.SQLServerDriver
    The connection URL for the default SQL Server 2000 database is jdbc:sqlserver://localhost:1433
    Class.forName(
      "com.microsoft.sqlserver.jdbc.
      SQLServerDriver");
    String url =
      "jdbc:sqlserver://localhost:1433";
    Connection conn = DriverManager.
      getConnection(
      url, "sa", "sqlserver");

  • How to connect sql server 2008 r2 sp2 with vs2013 ultimate?

    how to connect sql server 2008 r2 sp2 with visual studio 2013 ultimate?

    Hi Shahzad,
    >>how to connect sql server 2008 r2 sp2 with visual studio 2013 ultimate?
    Based on your issue, if you wan to connect the sql server 2008 r2 sp2 from VS2013 IDE. I suggest you can try the Ammar and darnold924's suggestion to check your issue.
    In addition, I suggest you can also refer the following steps to connect the sql server 2008 r2 sp2 with visual studio 2013 ultimate.
    Step1: I suggest you can go to VIEW->SQL Server Object Explorer->Right click SQL Server->Add SQL Server.
    Step2: After you connect the SQL Server 2008 r2 sp2 fine, I suggest you can go to VIEW->Server Explorer-> right click the Data Connection->Add Connection.
    And then you can create the connect string in the Add Connection dialog box.
    Hope it help you!
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Connecting SQL server using JavaScript

    I found an article on connecting SQL server using JavaScript. http://www.devarticles.com/c/a/JavaScript/Combining-North-Pole-with-South-Pole-JavaScript-with-SQL-Server-2000/
    Do you people think it's possible? i try out the code already but something wrong with it. I just copy and paste it to a html file but it comes out with error. Do I miss out something? Thanks.
    SY Tee

    Check the permissions and server authentication from the below link,
    http://technet.microsoft.com/en-us/library/ms179354(v=sql.90).aspx
    Regards, RSingh

  • How to Connect SQL Server enterprises Manager Version 8.0 with Form 6i

    Dear experts
    I want to know that How can I connect SQL server Enterprise Manager Version 8.0 with Forms/reprots 6i.
    currently I have oracle 9i database at server windows 2003 and I also connected with client (my PC) I work on server.
    I also have SQL server in that server 2003 machine and this SQL Server also work with other clients that have VB program.
    I want to know that can I connect with this SQL server with Form 6i?

    You can't. The closest thing would be to create links in an oracle database to the SQL Server database using Heteregeneous Services and connect forms to the that.
    This forum is for the SQLDeveloper tool. You will get more complete answers in the "Database General", or "Heterogeneous Services" forums

  • How to connect sql server at RunTime?

    Hi,I have a question that when i want to use DBAdapter to connect sql server 2000 in oracle esb at RunTime.
    At design Time ,it can work.but at RunTime ,it does't work.
    At run time,
    1)modify Oracle_Home/j2ee/home/config/application.xml
    add follow elements,the path is right:
    <library path="../applib/msbase.jar"/>
    <library path="../applib/mssqlserver.jar"/>
    <library path="../applib/msutil.jar"/>
    2)Drop the JAR files into the following directories:
    Oracle_Home/j2ee/home/applib
    JAR files Include msbase.jar,mssqlserver.jar,msutil.jar
    But it does't work!!!
    Then i use DataDirect driver:
    YMbase.jar,YMutil.jar,YMsqlserver.jar
    it does't work either!!!
    what should i do ??
    Help.
    when i use DataDirect driver ,Exception like this:
    An unhandled exception has been thrown in the ESB system. The exception reported
    is: "org.collaxa.thirdparty.apache.wsif.WSIFException:
    esb:///ESB_Projects/PocApp_POCproject/MESInsert.wsdl [
    MESInsert_ptt::insert(MtlMesCollection) ] - WSIF JCA Execute of operation
    'insert' failed due to: Could not create/access the TopLink Session. This
    session is used to connect to the datastore. ; nested exception is: ORABPEL-
    11622 Could not create/access the TopLink Session. This session is used to
    connect to the datastore. See root exception for the specific exception. You may
    need to configure the connection settings in the deployment descriptor (i.e.
    $J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml) and restart
    the server. Caused by Exception [TOPLINK-4003] (Oracle TopLink - 10g Release 3
    (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.DatabaseException
    Exception Description: Configuration error. Class
    [com.oracle.ias.jdbc.sqlserver.SQLServerDriver] not found.. at
    oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation
    (WSIFOperation_JCA.java:623) at
    oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeInputOnlyOperation(WSIFO
    peration_JCA.java:726) at
    oracle.tip.esb.server.common.wsif.WSIFInvoker.executeOperation(Unknown Source)
    at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(Unknown Source) at
    oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(Unknown Source) at
    oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.nextService
    (Unknown Source) at
    oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.processBusi
    nessEvent(Unknown Source) at
    oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatchNonRoutingService(
    Unknown Source) at
    oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(Unknown Source)
    at oracle.tip.esb.server.dispatch.BusinessEvent.raise(Unknown Source) at
    oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(Unknown Source) at oracle.
    when i use SQL SERVER JDBC DRIVER,Exception just like before,the different only is
    Class [com.microsoft.jdbc.sqlserver.SQLServerDriver] not found ....

    Hi,
    Were you able to configure these 3 jars file. If so can you share the process that we need to follow to configure the environment so that i can access SQLServer.
    Thanks,
    Amby.

  • How to Connect to Server using Server Admin

    I am trying to connect to Server using Server Admin so I can setup a wiki.
    I enter my hostname, username and password and I get the error unable to connect to server, any ideas what is going wrong?
    I can ping the server name and that works. Is there something else I have to do to get the server running
    Thanks in advance

    Any firewalls/routers "in the way"?
    Is this over Internet?

  • How to connect SQl Server 2008 to SAP BW

    Hi Experts,
    i would to build the following scenario.
    I would like to connect an infoprovider or a query in sap BW to a SQL Server.
    The goal will be to use the Management studio as well and to send the data from SAP BW (Cube or Query) to the sql server.
    1. Could you please advice steps by steps how to do the istallation?
    2; Which connectors should i use?
    3. Is there any document which provide the tools, drivers, connectors to be used?
    4. Is there any how to which can help after the installation to run the scenario?
    Thank you in advance for your Input.
    Cheers
    Gilo

    Hello,
    What you request can be done with DB Connect.
    A good starting point is the following link :
    [http://help.sap.com/saphelp_NW04/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/content.htm|http://help.sap.com/saphelp_NW04/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/content.htm]
    Also I recommend to search further on SDN because there are some interesting posts on connecting BW to external databases like SQL Server.
    Wim

  • How to connect sql server to OATS

    Hi,
    Please guide me how to connect microsoft sql server 2005 to OATS.
    I need it urgently.
    Please help me.
    Thanks,
    Jatin

    You get XE by default but a limited use (ATS only) license for Oracle 11g is included. So you can install and use 11g for ATS.
    For testing DBs now a DB Testing module is offered with ATS 9.2. It offers direct DB testing without writing huge amounts of Java code.
    /J

  • Problem to connect SQL Server using dg4msql

    Hi All,
    Configured Oracle Database Gateway for MS SQL Server in windows 2003 server 64 bit machine.
    Oracle DB Server: 10.2.0.4.0
    Oracle DB Gateway: 11.2.0.1.0
    I am able to get table row count but if i try to get table column values then getting errors like below
    ========================
    SQL> select count(*) from address@dbsql;
    COUNT(*)
    183
    SQL> select * from address@dbsql;
    ERROR:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    ORA-02063: preceding line from DBSQL
    no rows selected
    SQL>
    =======================
    Any body encountered same issue, or any thoughts .
    Thanks,
    -Mani

    Thanks for the clarification with respect to license.
    Below sql is returning results from MS SQL perfectly
    select count(*) from address@dbsql
    describe address@dbsql
    but below sql is returning error.
    SQL> select "pkid" from address@dbsql
    2 /
    ERROR:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    ORA-02063: preceding line from DBSQL
    -- CHARACTERSET
    Oracle DB:     UTF8
    MSSQL DB: i don't know how to check!
    -- initMSSQL.ora
    HS_FDS_CONNECT_INFO=BLR2230041,1433//ADS_BI_6003
    HS_FDS_TRACE_LEVEL=DEBUG
    Thanks
    -Mani
    Edited by: Mani.. on Oct 28, 2010 3:27 PM

  • How to Connect SQL Server 7.0 with JSP ?

    Recently, I just installed SQL Server 7.0 with the advice from my boss. But, I have encountered a problem as I am not familiar with the SQL Server's connectivity with the JSP and JDBC. Previously, I was using MySQL to connect and it works fine.
    Anybody can give me any idea or hints ? Thank you a lot.

    You connect the same way you did for the mySQL database.
    The only thing that need to change is the Driver and Connection string.

  • Problem to connect SQL Server using dg4msql  form Linux machine

    Hi All,
    I have oracle 11g 11.2.0.1.0 on RHEL 4 on one machine and MS SQL Server 2000 on another Windows XP machine. I have to link the oracle database with SQL Server Database. So that we can run queries on SQL Server from Oracle 11 Database.
    For this purpose I have installed Oracle Database 11g Release 2 (11.2) Gateway for SQL Server on oracle machine.
    For the purpose of configuration, I have followed the instructions of Doc ID (437374.1) available from oracle metalink.
    listener.ora file
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = orcl)
    (ORACLE_HOME = /opt/orabase/orahome11g)
    (SID_NAME = orcl)
    (SID_DESC=
    (SID_NAME=dg4msql)
    (ORACLE_HOME=/opt/orabase/orahome11g)
    (ENVS="LD_LIBRARY_PATH=/opt/orabase/orahome11g/dg4msql/driver/lib:/opt/orabase/orahome11g/lib")
    (PROGRAM=dg4msql)
    LISTENER =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.10.15)(PORT = 1522))
    ADR_BASE_LISTENER = /opt/orabase
    tnsnames.ora file
    DG4MSQL =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=172.16.10.15)(PORT=1522))
    (CONNECT_DATA=(SID=dg4msql))
    (HS=OK)
    initdg4msql.ora file
    # HS init parameters
    HS_FDS_CONNECT_INFO=172.16.30.51:1433//Northwind
    I have created DB link using following statement:
    CREATE public DATABASE LINK dg4 CONNECT TO "sa" IDENTIFIED BY "sa" USING 'dg4msql';
    when I give select statement, It gives following error:
    select * from "Employees"@dg4
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Oracle][ODBC SQL Server Driver][libssclient24]General network error. Check
    your network documentation. {08001,NativeErr = 11}[Oracle][ODBC SQL Server
    Driver][libssclient24]ConnectionOpen (()). {01000,NativeErr = 11}[Oracle][ODBC
    SQL Server Driver]Invalid connection string attribute {01S00}
    ORA-02063: preceding 2 lines from DG4
    I will appreciate if anyone can help me

    The general DG4MSQL configuration is correct as DG4MSQL is loaded and tries to connect to the SQL Server.
    Is the IP Address and the SQl Server port (HS_FDS_CONNECT_INFO=172.16.30.51:1433//Northwind) correct?
    Can you ping it from the Oracle gateway machine?
    Can you telnet to it from the gateway machine to the SQl Server: "telnet 172.16.30.51 1433"

  • How to access sql server using java script

    Hi, Is it possible to connect to sql server in java script. I'm using microsoft jdbc driver for connectivity to sql server.
    Thanks

    Hi, Is it possible to connect to sql server in java
    script. I'm using microsoft jdbc driver for
    connectivity to sql server.If you want to ask about Javascript, you are in the wrong place. Go and find some JavaScript forum. Actually, you could connect to database from javascript using Ajax or the like mainly because you could have Java code behind the scenes, but then that too is not something I would want to discuss here. So, go find the correct place for the topic.

Maybe you are looking for

  • How Many Memory Modules (1 or 2) Come Pre-Installed in HP Envy Touchsmart m7-j120dx?

    I know my HP Envy Touchsmart m7-j120dx came preinstalled with 8GB of RAM.  I purchased it last year from Best Buy.  Haven't taken the back off of the laptop just yet and it's at home while I'm at work, but wanted to see if anyone can verify *how* the

  • New bt vision box received broadband flashing oran...

    I got my new bt vision box today and I moved my bt hub in beside the bt vision hub but since then it has had a flashing orange light and no steady blue can anyone let me know what the problem is or how I can resolve this?

  • Adobe reader 9.1.2 CPSID-49166 locks up when save copy

    using firefox v3.0.11 & IE8 under XP pro sp3 whenever I save a copy if a pdf when downloaded from the net adobe reader locks up and refuses to close or open further pdf's with action in progress cannot close with taskmanager reboot is only option any

  • Mini Player Won't Stap Open In All Spaces

    How do I keep itunes mini player open in all spaaces?  Checking "keep player on top of all windows" doesn't seem to do it.  Haven't found another way to do this since upgrading to Lion 7.2.

  • MacBook Various Problems

    Hi, I have a Mid-2007 MacBook that is having some problems. - Cracking plastic on front palmrest - Worn trackpad - Non-functioning Optical drive It runs OSX 10.6.8 and it's on its last legs. I would like to sell it back to Apple and put that money to