Connection using sql 2000

i try to connect t o database using sql 2000
this my code and the execptions
can anyone help me to tell me what is the right code to connect to database
package javaapplication37;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.*;
* @author ed
public class Main {
/** Creates a new instance of Main */
public Main() {
* @param args the command line arguments
public static void main(String[] args) throws SQLException {
// try {
// TODO code application logic here
//String url = "jdbc:ODBC:Northwind";
//try {
// Connection con=DriverManager.getConnection(url,"sa","remo");
// } catch (SQLException ex) {
// ex.printStackTrace();
// System.out.println("remo hi");
Connection con;
try {  
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
// Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
con=DriverManager.getConnection("odbc:microsoft:sqlserver://localhost:1433;databaseName=Northwind;selectMethod=cursor");
// System.out.println("elk");
} catch (ClassNotFoundException ex) {
ex.printStackTrace();
// } catch (ClassNotFoundException ex) {
// ex.printStackTrace();
the exception is
init:
deps-jar:
compile:
Exception in thread "main" java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:545)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at javaapplication37.Main.main(Main.java:47)
Java Result: 1
debug:
BUILD SUCCESSFUL (total time: 1 second)
Message was edited by:
romee

W3hy did you give up with the type 4 driver? Why did you not use Google? Your basic question has been asked and answered repeatedly.
I will say this a JDBC-ODBC URL begins with jdbc:odbc and not just odbc though I have some doubts about the rest of the stuff you'e crammed in there.

Similar Messages

  • How to Connect Microsoft SQL 2000 database using JDBC

    Hi all..
    I want to connect Microsoft SQL 2000 database using JDBC. I want from initial steps also. (about JDBC driver & its installation)
    Thankz

    Just checkout the SQL Server JDBC Driver Documentation at the manfacturer's site: http://msdn2.microsoft.com/en-us/data/aa937724.aspx

  • SQL 2012 Linked Server connection from SQL 2000

    Hi,
    Does anyone know if it's possible to create a linked server connection in SQL 2000 to a SQL 2012 instance?
    If so, which provider should I use?
    Many Thanks,
    Phil

    Hi Shanky,
    I'm afraid you misunderstood my Q. The above posts show how to create a linked server connection FROM SQL2012 --> SQL 2000.
    I'm trying to create a linked server connection FROM SQL 2000 --> SQL 2012.
    Does anyone know if it's possible?
    Many Thanks,
    Phil
    I guess you dont read posts patiently below link ,which i also posted in my first reply, has details about the same
    http://social.msdn.microsoft.com/Forums/en-US/2e02c603-e28d-49eb-b073-548c59732b5d/linked-server-from-sql2012-to-sql2000?forum=sqlsetupandupgrade
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Connection ... able to connect using sql developer, but not sqlplus or toad too

    Hi folks, having this issue, with only one of my so many databases, what might be the reason and how to fix/correct this, please assist.
    Able to connect using sql developer, but not sqlplus or toad too; sqlplus error: ORA-12154: TNS:could not resolve the connect identifier specified
    thanks in advance.

    SQLDEVELOPER works since it use JDBC Thin & does not use tnsnames.ora
    ORA-12154 ALWAYS only occurs on SQL Client & no SQL*Net packets ever leave client system
    ORA-12154 [B]NEVER[/B] involves the listener, the database itself or anything on the DB Server.
    ORA-12154 occurs when client requests a connection to some DB server system using some connection string.
    TNS-03505 is thrown by tnsping & is same error as ORA-12154 thrown by sqlplus or others.
    The lookup operation fails because the name provided can [B]NOT[/B] be resolved to any remote DB.
    The analogous operation would be when you wanted to call somebody, but could not find their name in any phonebook.
    The most frequent cause for the ORA-12154  error is when the connection alias can not be found in tnsnames.ora.
    The lookup operation of the alias can be impacted by the contents of the sqlnet.ora file; specifically DOMAIN entry.
    TROUBLESHOOTING GUIDE: ORA-12154 & TNS-12154 TNS:could not resolve service name [ID 114085.1]
    http://edstevensdba.wordpress.com/2011/02/26/ora-12154tns-03505/

  • Unable to Connect to SQL 2000 Instance from Windows Server 2012 environment

    We have a windows server (TEST) 2012 environment , where our test SQL Server 2012 instance is hosted.
    We have a different (DEV) Server (windows 2000)  where a SQL Server 2000 instance is present.
    When I RDP to our Windows Server 2012 box, I cannot connect to the SQL 2000 server instance from SQL Management Studio. (whereas I can connect to
    the same server from my local machine which has windows 7 and SQL 2012 installed). 
    This is the error i see - 
    "A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name
    is no longer available.) (.Net SqlClient Data Provider)"
    When run from SQL Agent Service from TEST (A Job which tries to connect to that SQL 2000 instance to read some data using SSIS) , we get the following
    error - 
    An OLE DB record is available.  Source: "Microsoft OLE DB Provider for SQL Server"  Hresult: 0x80004005  Description: "[DBNETLIB][ConnectionRead
    (recv()).]General network error. Check your network documentation.".
    The same SSIS package runs successfully from my local machine.
    Please, could someone advice how to resolve this situation?

    Thanks Olaf.
    Its just that we have legacy systems here in our company, who, for some reason haven't upgraded their older infrastructure, whereas they have set up new Windows 2012/SQL 2012 environments for the newer sql instances where they want to transition to !
    Not sure what the solution is honestly. It is affecting our timelines now. The infrastructure team needs to take a decision now, as to what to do.
    I do have to add, we were able to connect to these "older" servers from our Windows 7 client machines which have SQL 2012 - both from SQL management studio & SSIS (using OLE-DB Provider for SQL Server).

  • Connect to SQL 2000 and 2012

    We have two interfaces. Once connects to 2000 and the other to 2012. Which JDBC drivers do I need to deploy. is it both sqljdbc.jar and sqljdbc4.jar?
    Pls advice.
    Thanks

    Resolved.
    Used sqljdbc4.jar for SQL servers 2005 onwards.
    Though microsoft says JDBC driver 3.0 supports connection with 2000, we were getting errors.
    As an alternative we used mssqlserver.jar, msbase.jar and msutils.jar to connect to SQL server 2000 and it works fine.
    So we have more than one driver installed on pur PI system.
    Thanks.

  • Unable to connect using SQL Developer.

    Hi,
    I am having a hard time connecting to the database instance using "Cloud Connections," in SQL Developer.
    I am using the information found in here: http://docs.oracle.com/cloud/CSDBU/develop.htm#BABDBHJA to connect to my cloud-service, but all I get is an error:
    "Authentication Failed Invalid resource owner credentials."
    I am positive that I am using the same username and password as when logging in to could.oracle.com.
    Can anybody help me?

    Apologies for any difficulty you have been having.
    I would start by reviewing the white paper on data movement. My guess is that you have not defined an APEX user with SQL Developer privileges (yes, I know the process could be more clear - it's getting there.)
    You can find the white paper here - http://www.oracle.com/technetwork/database/database-cloud/public/data-movement-wp-1844121.pdf. Please make sure you follow all the steps properly, for both initialization and the actual connection.
    Hope this helps.
    - Rick Greenwald, Product Management, Database Cloud Service

  • Cannot Connect to SQL 2000

    I recently reinstalled SQL Server and now I am unable to
    create the DSN through CF Admin. The name of the SQL instance was
    changed during the reinstall. I have attempted to use the new name
    in CFAdmin but get the following error:
    "java.sql.SQLException: [Macromedia][SQLServer JDBC
    Driver][Macromedia][SQLServer JDBC Driver]The requested instance is
    either invalid or not running.
    The root cause was that: java.sql.SQLException:
    [Macromedia][SQLServer JDBC Driver][Macromedia][SQLServer JDBC
    Driver]The requested instance is either invalid or not running."
    The instance is running and I can create a connection through
    the Data Source (ODBC) tool in Admin Tools but I can set it up in
    CFAdmin.
    Thanks in advance for your advise!

    > In any case applying the SP probably wouldn't hurt.
    Yep. Patch it up, and try again.
    I realise Lynda said that the computer in question is a local
    PC, so
    probably is not outwardly facing (ie: onto the 'net). But
    this warning
    could still be relevant:
    A couple of years ago - long after SQL Slammer had done the
    rounds, so one
    might think it was no longer a problem - one of our jr
    developers was
    tasked with setting up a new SQL Server instance which ended
    up being
    outwardly facing. She didn't remember to patch it (and I -
    the box was my
    responsibility - forgot to check).
    It took about half an hour of uptime for it to get infected,
    and about
    15min after that before our LAN was flattened by
    virus-enabled traffic
    trying to find other machines to infect. Suddenly 20-odd
    people could not
    work whilst we cleaned out their machines, and checked for
    any number of
    other infections. I was not popular that day (not least of
    all with
    myself!).
    Always... ALWAYS... make sure your SQL Servers are fully
    patched.
    I would *never* attach a machine with non-patched SQL Server
    even to a LAN,
    let alone the outside world.
    I cannot stress that enough.
    Adam

  • 1.2.6 oracle lite connecting using SQL*PLUS

    i have successfully installed a oracle 8iLite on win2000 professional.
    user id --- system
    password --- manager
    host string ---- odbc:polite
    But when i try to give this command
    " set serveroutput on " i am getting a message "Server not available or version too low for this feature"
    Can anybody help me to overcome this problem.
    i am new to Oracle .
    PLEASE EMAIL ME
    THANK YOU
    [email protected]

    hi, I'd like to know if its
    TNS 12560: protocol Adapter error
    Make sure address uses the proper protocol specification in your connect descriptor.
    if its that then U will have to verify that your database is registered with the Listener....
    Also verify that your Oracle SID is set to the specific instance
    You can do that by settin the environment variable;
    c:\> set oracle_sid=<database_sid>
    then try to connect after words.

  • Cannot connect to SQL 2000 Analysis Service cube form 32bit 2010 excel

    Excel 2010 32bit is running on windows 7 64bit PC. User has new PC updated from XP where there was no connection issue.
    Initial Error
    "The following system error occurred: No connection could be made because the target machine actively refused it"
    I installed Office web component 2003 as advised in forums.
    Next Error
    "initialization of the data source failed.  Check the database server or contact your database administrator. Make sure the external database is available, and then try the operation again. If you see this message again, create a new datasource
    to connect tot he database."
    I have trawled the forums for the past 2 days looking for a solution.  Any help would be appreciated.
    Niall

    Hello,
    Please check the below link.May be this can Help You
    https://fawzi.wordpress.com/2013/05/15/sql-2012-analysis-services-error-no-connection-could-be-made-because-the-target-machine-actively-refused-it/

  • JDBC connection to SQL Server 2000

    Hi,
    I am new to Java programming. I am using Websphere Studio Site Developer 5.1 and I am having issues connecting to SQL 2000.
    This is what I have done so far:
    1. Downloaded the SQL Server 2k JDBC service pack 3 driver from Microsoft.
    2. Ran the executable. Seems like the JDBC driver was installed successfully.
    3. Created a user w/ dbo permissions on the DB that I want to access.
    Here is a snippet of my java code so far:
    Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://DEV01:1433;DatabaseName=NG_RFQ;SelectMethod=cursor", "username", "password");
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT * FROM Customer");
    if(rs.next()){
    customerName = rs.getString("CustomerName");
    buyerName = rs.getString("BuyerName");
    con.close();
    I have been working on this for days and can NOT get a connection established.
    Here are some of the error messages that I have been receiving thru WSSD.
    java.sql.SQLException: No suitable driver
    [8/11/04 18:11:54:815 EDT] 5e5c8f29 SystemErr R      at java.sql.DriverManager.getConnection(DriverManager.java:558)
    Can anyone please tell me what I am doing wrong? Or point me in the right direction.
    I have searched hi and lo for the answer but still no luck.
    Any help would be greatly appreciated.
    Thanks!
    -JML

    "No suitable driver" means one of two things:
    1. You forgot the Class.forName() part (quite uncommon, but if I look at the original post, this might just be the cause).
    2. The URL is wrong (usually a typo, look for colons, semicolons, parameter names etc.)
    Alin.

  • How to connect java database using sql....????

    Hey guys,
    I am a novice in Java Programming.Could someone help me out in connecting to sql.Im using Sql 2000 edition.
    Thanks.

    Google for "Sun JDBC tutorial" and go through it.
    %

  • Cannot connect to database using SQL*Plus

    Hi, I have Oracle 10g XE installed in my labtop and I cannot connect using SQL*Plus.
    I can connect using the broser User Interface though, which I was able to do after doing the following procedure to change the password of the sys account:
    -     open a command prompt
    -     - type sqlplus
    -     On the “Enter user-name” line, type /as sysdba
    -     On the SQL> prompt, type alter user sys identified by NewPassword;
    But the thing is that even though I am able to connect using sys/NewPassword from my browser UI, I dont get the same result when doing it using the SQL prompt.
    What I am trying to do is this:
    SQL> connect sys/NewPassword
    Then I get first a warming saying that I need to use either sysdba or sysoper to connect to the system account, but neither of those work.
    Can anyone advice me on this matter?
    Thanks in advance

    Thanks for that.
    I run the command to list the usernames on the database and I got SYS and SYSTEM in the list. But again, when I try to use SYS with a password that I know is working because I can access it through the browser UI, it doesnt work. It seems like this sys is different to the sys I used in the UI.
    I dont know if I am explaining myself correclty... In the Browser UI I use sys, and a password and I get connected to the sys account. However, if I try to use the same sys.password combination from my sqlplus prompt, I get error messages
    Does this make sense at all?

  • Can connect using sqlplus, cannot using SQL Developer

    Hi
    I cannot find out why I cannot connect using SQL developer, while sqlplus works fine with the same login information.
    *1. TNS ping:*
    C:\>TNSPING manila
    TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 24-GRU-2
    010 13:28:38
    Copyright (c) 1997, 2005, Oracle. All rights reserved.
    Used parameter files:
    C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.171)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
    OK (370 msec)
    *2. sqlplus*
    SQL> CONNECT SULU_DEV/<pass>@MANILA
    Connected.
    *3. sqlplus - by IP*
    SQL> CONNECT SULU_DEV/<pass>@10.0.0.171:1521/XE
    Connected.
    *4. SQL Developer*
    Username: SULU_DEV
    Connection type: TNS
    Network alias: MANILA
    Error: I/O Exception: Connection reset
    *5. SQL Developer - by IP*
    Username: SULU_DEV
    Connection type: Basic
    Hostname: 10.0.0.171
    Port: 1521
    SID: xe
    Error: I/O Exception: Connection reset
    *6. SQL Developer - without username*
    Username: <blank>
    Connection type: TNS
    Network alias: MANILA
    Error: ORA-01017: invalid username/password
    It seems that I have connection to the server, but from some reason it is disconnected when I'm using SQL Developer, but works fine with sqlplus.
    Any ideas on what it might be?
    Thank you in advance,
    Regards,
    Marek

    The connection export function it's available in 2.1.1.64, you need to right click on the main Connections node, and it will allow you to export all or part of the current connections, or import from a previously exported file.
    As for the highlight statement feature it's available in SQLDeveloper; actually you do not even have to highlight the required statement, as long as you take the habit of ending every statement with a ";", in this case you only need to place the caret inside the statement and SQLDeveloper will automatically highlight it for you (if you want to manually highlight a statement you can still do so without problems).
    Finally as a last try to solve your connection problem without having to call for network support you could try to check
    Preferences -> Database -> Advanced -> Use OCI/Thick DriverThis will force SQLDeveloper to use your oracle client for connections instead of it's native JDBC based connections (even if you use TNS based connections you will still use JDBC unless you have this checked).
    As for other graphical tools for Oracle there are many both free or for a price.
    1) In the for price world Toad stands out, i heard of a free option too but I'm not sure of the limitations.
    2) For free you can use DBVisualizer which is fairly good (never used it too much thou).
    3) Finally there is SQuirreL which is both free and open source but it has fairly basic functionality compared to the two above.
    Obviously there are many others, but IMHO few will provide you with the same functions of SQLDeveloper or Toad for Oracle databases

  • Using SQL server instead of Olite in Oracle BPEL

    I am now trying to use SQL 2000 server instead of Olite in Oracle BPEL. I couldn't find any instruction or admin config guide. Has anyone had any luck with this?
    If anyone has any experience, please shed some light on this.
    I am now able to get "domain_sqlserver" dll file populated into SQL server.
    How di i configure BPEL to use SQL db instead of Olite? Do i need to set up database connections to work?
    Thank you very much in advance.

    Edwin,
    Thank you so much for the info.
    I have emailed to [email protected] for the question.
    Up to now, i have done the followings:
    1. I have successfully populated domain_sqlserver ito SQL 2000 with some modification.
    2. I have also configured data-sources.xml under ..\integration\orabel\system\services\install\config and unser ..\integration\orabel\system\appserver\oc4j\j2ee\home\config to use MSFT SQL 2000 instead of Olite.
    3. I have also commented out running kill_Olite.bat and start_olite.bat, and start SQL 2000 server.
    4. Installed Data Direct JDBC driver
    Could you please kindly point me what are the rest of configuration required in order to make it work?
    Thank you so much.

Maybe you are looking for

  • Required Oracle FND tables for Discoverer Install (Oracle App user)

    Hi does anyone know of set documentation or, via SQL Trace, which existing tables Discoverer looks for when setting up an EUL? For instance, our install requires you select the Oracle Apps User Schema and put in the password for that schema where you

  • Abap Certification Question

    Hi All, I am appearing Teched ABAP Certification Examination, Any one kindly send question relating to certification . It will very helpful for me. My mail id: [email protected] Thanks in advance. Raju

  • What happened to my iCloud documents? They were there yesterday but gone today.

    I opened pages to get my school work and my iCloud folders were empty. The I signed into iCloud and when I clicked pages it said I had to sign up for iCloud Drive, which is only compatible with Yosemite. I need my files. I saved them in the cloud for

  • D-Link Login Failure

    Hi all. I am convinced someone in my neighborhood has compromised my current WEP encryption for my D-Link AirPlus Extreme G wireless network. I'd like to switch to WPA, and I know how to do it. The problem is that whenever I try to access 192.168.1.1

  • Automatic Typing of random characters?!?!?

    I have a Retina MBP.  After a couple hours use (and I use it every single day, all day) it has begun getting really hot, and when it does, whatever doc i am in, or web window, the thing starts typing a stream of either ''''''''''''''' or ////////////