How to do connectivity to JDBC on Linux platform

Hello friends!
I am novice user of JSP & JDBC. I dont know how to make connectivity with database using JDBC driver and that is using Linux paltform. I read one tutorial for that they have given some code. But they have used <% import java.sql%> . The database I am using is PostgreSQL. So how to do that?
Plese help me ! Thank you in advance!

Same as JDBC on any other platform. Java and JDBC are OS independent.
The java.sql package is part of the JDK, of course. No action required.
If you're using PostgreSQL, you have to get their JDBC driver JAR and put it in your app's CLASSPATH.
Then you should review this.
%

Similar Messages

  • How to configure connectivity between two vm linux hosts

    Hello All,
    i have installed vm workstation with two RHEL4 linux installation.
    Node 1:RHEL4
    Node 2:RHEL4
    i have configured 2 ethernet cards am able to ping in a host but not each other.
    i have tried to ping from Node 1 to Node 2 am getting icmp_seq=0 Destination Host Unreachable .....
    kindly suggest how to configure connectivity between two host permanently.please explain with example if possible. or suggest any link.
    thanks,
    Mike.

    1003614 wrote:
    thanks for quick reply ....Oracle vm workstation 4.2 am using.
    ... then your post is now moved to the appropriate forum space for your question (Oracle VM for x86).

  • How can you connect Ipod to a linux system?

    Bought our study abroad student an Eee PC computer that will work well in his home country of Africa. My boys got Ipods for Christmas and I gave him one too. We are unable to find a way to get it to connect to his linux system. Is is possible?? It is an Ipod Nano 4th generation. Thanks!

    The iPod is designed to work with iTunes however is no version of iTunes for Linux so there's no simple answer to your question. You'd be much more likely to find a possible solution by posting in one of the many Linux discussion websites. Linux Questions would be a good place to start, you'll find the forum at this link: LinuxQuestions.org

  • Why SocketChannel  connection so slow in Linux Platform?

    Hello everyone!
    I have a server application, and when it runs on windows, everything is fine, as soon as it migrated to linux, the client connection will take as long as 12s to finish connect.
    I don't know why,could anyone help?
    Thanks very much!

    Not sure, did you make any changes to your code between Linux and Windows (100% pure Java should require NO changes in code)?
    Are you running the SAME version of the JRE on both machines? What kind of network setup do the two machines have - similar?

  • Using SAP with linux platform

    HI Experts,
    How well is to Use SAP with linux platform?I checked in internet but i couldnt get a satisfactory result.DID someone who have installed the same can advise me about the performance.
    (80 gb hd , 1 GB ram).
    (I asked this question bcoz , when i tried to install the same my sound card is not working .)

    Hi,
    There are many things that you need to consider before you think of installaling SAP on Linux
    1. version of Linux- SAP does not support every version lf Linux
    2. Hardware- again SAP does not support every hardware
    there are supported: Bull,Dell,Fujitsu Siemens,HP,IBM,IBM POWER,IBM zSeries,SGI,SUN,Unisys
    3. RAM -SAP recommends swap memory to be 2*RAM,so you require a lot of RAM for installing SAP
    Now with the config. u have mentioned it looks you want to install in u pc or laptop,but I am afraid this will not be enough!!
    you will not be able to install SAP with this config.Let me know if you need any other info.

  • How can i connect to SQL Server 7.0 on Windons Using JDBC

    How can i connect to Microsoft SQL Server 7.0 on a windows enviroment ?
    in sql server 2000 some jar files are required that is
    What you need to do is actually add all three jar files to your class path individually. There are three jar files that come with this driver the msbase.jar, msutil.jar, and mssqlserver.jar. for sqlQ server 2000.
    now the problem is that i cant find these files on my system. firstly where these files will be located. secondly are they will be used to connect to SQL Server 7.0. thirdly if not what is the procedure.
    My next Problem is that I have Websphere Studio Application Developer. in which their is this facility of Database Webpages its like a wizard which makes automatically beans servlets and JSP but before that you need a Driver Name and and Class Name for to Connect to the Database.
    Can you tell what is the specific Driver Path for the Microsoft SQL Server 7.0 . secondly is this the class which is used to connect to SQL server 7.0 "com.microsoft.jdbc.sqlserver.SQLServerDriver" where can i find this one. for SQL server 7.0.
    please provide some guidance in this regard.

    You can search for the JDBC drivers at, http://industry.java.sun.com/products/jdbc/drivers
    All the three jars that you specified are part of MsSQL Server jdbc driver. You need them (in the classpath) to get connected to the database.
    "com.microsoft.jdbc.sqlserver.SQLServerDriver" is the class in mssqlserver.jar. This is the driver class which will be used to get connected to the database.
    You can search in this forum for writting jdbc code (for Sql Server). If you don't find these jars, give me your e-mail id.
    Sudha

  • How do I connect Oracle 11g 11.1.0.7 on LINUX 64-bit machine to SQL Server?

    Hi,
    Does anyone know how do I connect from Oracle 11g 11.1.0.7 on LINUX 64-bit machines to SQL Server 2000 DB please so I can set up a regular data extraction job to migrate data? Does this use products I am already licenced for under Oracle Enterprise Edition?
    Thanks,
    Jeremy

    you must be not read it carefully.
    The gateway software is there, in the bottom.
    Oracle Database Gateways 11g Release 1 (11.1.0.6.0)
    for Linux x86-64
        linux.x64_11gR1_gateways.zip (505,401,641 bytes) (cksum - 2593459988)  just download it.
    and this is how to install and configure
    http://download.oracle.com/docs/cd/B28359_01/gateways.111/b31042/partsql.htm#BJEGEBFH

  • How to establish a trusted connection with JDBC for SQL SERVER 2000

    Hi!I am using jdk 1.4 and eclipse 3.3.
    I create a servlet in eclipse with in-build tomcat.
    When I run it ,it was working perfectlly has it was suppose to work.
    In this servlet I connect to a sql 2000 database using jdbc-odbc bridge driver.
    But when I tried to deploy the servlet on tomcat 5.5 manully on the same machine ,it gave me error saying
    [Microsoft][SQLServer JDBC Driver][SQLServer]Login failed
    for user 'sa'
    I searched around some post and found that ok ,I need trusted connection
    But I have 2 Questions
    1). Why was in eclipse I was able to connect to the SQL server and why not in the servlet which I deployed manully on tomcat.
    2). How do I create a trusted connection with JDBC for SQL server 2000
    Thnaks for your help in advance.

    Hi! duffymo ,QussayNajjar ,dvohra09 .
    Thank for help.
    The ideas are really great.
    I am trying generate reports for my company.
    When I used eclipse the code worked perfectly.
    below is code which I used
    out.println("Calling For Class Name<br>");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    out.println("Calling For Class Name success Now calling database <br>");
    1). jdbcConnection = DriverManager.getConnection("jdbc:odbc:SQLJasper");
    2). jdbcConnection = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=ServerName;Database=tempdb");
    3). jdbcConnection = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=ServerName;Database=tempdb","UID=UserName","Password=Password");
    out.println("connecting to database success<br>");
    I had tried to connect the database using this three way.
    In 1st I tried using DSN name .
    Next 2 self explainer for expert like you.
    I used to 2nd variant to connect in eclipse and it worked fine.
    I not an expert in java ,I just doing some research on jasperReport.
    My best guest is that eclipse is using some library files of which I have no clue.
    Thank's for your help,I appretiate it.
    Once again thank a billion.
    Sorry for the messy righting.

  • How to install JDBC in Linux

    Dear All,
    I want to install JDBC for JDK1.6. I have installed the JDK; now please let me to know how to install JDBC on Linux for JDK1.6.
    Thanks & Regards,
    Aqeel Nawaz

    Hi Aqeel,
    Download the ojdbc.jar file for your database and add it to your CLASSPATH.

  • How can Form6i connect to other DB connection like ODBC,JDBC

    Hi,
    Can anyone tell me that how can Form6i connect to other DB connection like ODBC,JDBC
    If anyone knows, please tell me immediately. I am in very urgently situation!!!
    So if anyone knows, Please! Please! tell me.
    Thanks in advance,
    Oil

    Hi,
    Ypu can connect using OCA (Open Cliente Adapter).

  • How do I connect to a database on a different machine(URGENT PLEASE)

    Hello all
    I have a Web server which is on a Linux box but the database I wish to connect to is on Windows NT. How can I connect to the data source.
    Both Linux and Windows machines are on the same network at the moment but will change later on.
    Please e-mail on [email protected]
    thanxs

    I think there are 3 ways to do so
    1. JDBC
    2. ODBC-JDBC bridge
    3. don't remember the third
    I would check it with JDBC section of the javasoft site. Also since your web server is on a linux box, you probably will not be able to use ODBC-JDBC bridge. I would try the JDBC method, but that requires you to get the JDBC driver for the database that you are trying to connect to!
    good luck
    Ku916

  • Connect to MS SQL server from OWB on Linux platform

    Hi,
    I want to connect to MS SQL server through OWB, on Linux platform.
    I suppose I would use JDBC driver, and Heterogeneous services. Is that possible?
    I did not see anything on JDBC driver for MS SQL server for Linux platform from Oracle.
    Also, I was wondering is Oracle Gateway 10g for Linux a way to connect to MSSQL server?
    Any leads would be appreciated.
    Thanks
    Ani

    Hi,
    This quite an actual topic for myself, so I decided to take some time to collect some information.
    Start at:
    * Oracle Generic Connectivity and Oracle Transparent Gateway - http://www.oracle.com/technology/products/gateways/gateways_fov.html
    You can use the free Heterogenous Services component named Generic Connectivity for connecting to SqlServer over ODBC. You will need to find (or purchase?) a third-party ODBC driver for SqlServer for Linux, e.g. from www.datadirect.com. Setting this up will allow you to define a databaselink to the SqlServer. Open Gateways implements a limited set of the oracle SQL, so you will have to find out what is possible and what not.
    See also:
    * How To Setup HSODBC on Linux - https://metalink.oracle.com/metalink/plsql/showdoc?db=NOT&id=264567.1
    * Generic Connectivity Available on Linux x86 with 10g - https://metalink.oracle.com/metalink/plsql/showdoc?db=NOT&id=261726.1
    You can also use the Transparent Gateway for SqlServer (HS), which is about EURO 12000 per computer(!). This gives you a full implementation of Oracle SQL and you can access the SqlServer like it was Oracle.
    You can also install Microsofts JDBC drivers into Oracle's JVM, and connect through JDBC to SqlServer. This is however not supported by Oracle, but it will work. See:
    * What is required for a Java Stored Procedure to connect to a SQL Server Database? - https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=276167.1
    See also:
    * Options for Connecting to Foreign Data Stores and Non-Oracle Databases - https://metalink.oracle.com/metalink/plsql/showdoc?db=NOT&id=233876.1
    * JDBC Developer's Guide - http://download-west.oracle.com/docs/cd/B14117_01/java.101/b10979/overvw.htm
    Good luck, Erik Ykema

  • Java connectivity with db2 in linux

    hi all,
    i wish to know how to connect java with db2 in linux.actually which is the string that is to be included in the following:
    class.forName("//which is the string that is to be included here");
    Connection con("jdbc:????");

    hi all,
    i wish to know how to connect java with db2same as every other database and OS. JDBC is the way.
    in linux.actually which is the string that is to be
    included in the following:
    lass.forName("//which is the string that is to be
    included here");full name of the DB2 JDBD driver class.
    Connection con("jdbc:????");look at the docs for your JDBC driver to figure out what the URL needs to be.
    %

  • ODBC or JDBC on Linux/Oracle

    http://www.openlinksw.com/
    Is where you will find connectivity for LINUX and Oracle.
    I did some research on the connectivity of LINUX and Oracle
    after having switched from a Server Farm hosting IIS and then
    going to linux.
    The basic info I found was in about 20 links.
    Some areas of interest might be:
    http://www.linuxworld.com/ this is by INFOWORLD MAG but has the
    best source and links for commercial Linux.
    In addition:
    http://users.ids.net/~bjepson/freeODBC/
    The free ODBC might be a place to gain the functionality to get
    the job done if you have the ability to code at that layer.
    The reason WHY odbc is not the preferd method of accessing
    Oracle is that OLE DB is thunked through the JET DATABASE ENGINE
    or subsystem in WIN9.x and WINNT at the client side.
    http://support.microsoft.com/support/kb/articles/q139/7/25.asp
    This article goes into some detail how OLE DB, ODBC, ADO, RDO,
    and the rest of the MSFT data is handled and by what files.
    ORACLE uses "OLE OBJECTS" to get the data and passes the JET
    DBENGINE/Sub-system.
    So for a Server on Linux and a host on Wintel you might look at
    the JDBC or universal Model of data connectivity.
    Oddly this was just something I looked into prior to deciding to
    get into Oracle8i....
    If you get any additional info.. or other "workable" approaches..
    Please follow up I would be interested...
    null

    Have you ever heard of [url http://www.google.com]google?
    By searching for [url http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=linux+mysql+jdbc+driver]linux mysql jdbc driver, and following the first link, it took me about two minuts to find the [url http://www.mysql.com/downloads/api-jdbc-stable.html]MySql JDBC driver download page.

  • Unable to stablish connection using JDBC

    I can not stablish a connection using JDBC.
    Oracle Server (8.1.7) SuSE Linux 7.1 kernel 2.4 AMD 650 with 750MB of memory.
    Client: Win2000 (JDBC driver thin (The last one that you can download from OTN)
    I can connect using ODBC or the JDBC-ODBC bridge without any problem, but when I try to connect using JDBC I got an exception:
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection. If I restart the listener then the connection can be stablished, after the connection is closed, and before any other connection can be made the listener must be stoped and restarted.
    any suggestions :)

    Thank you very much, seeing that document it was much easier to solve the problem.
    Now I am facing other problem:
    When I try to execute a query(for example : select * from
    ) I get this error:
    Error occurred while executing init statements
    java.rmi.RemoteException: com.sap.engine.services.dbpool.exceptions.BaseRemoteException: SQL statement(s) cannot be executed over DataSource "TEST". If you are using an Open SQL DataSource, you must register your tables using JDDI before you request them. Reason: com.sap.engine.services.dbpool.exceptions.BaseSQLException: ResourceException in method ConnectionFactoryImpl.getConnection(): com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException thrown by the physical connection: com.microsoft.sqlserver.jdbc.SQLServerException: La conexión a la instancia con nombre  ha fallado. Error: java.net.SocketTimeoutException: Receive timed out.
    Do you have any idea how to solve this?
    thanks again
    Bye!

Maybe you are looking for