Host string problem while connecting to JDBC

I am using oracle 9i...
following code used to connect to sql using usrename "scott" and password "tiger"
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:pawan", "scott","tiger");
where "pawan" DNS
"scott" Username
"tiger" password
I don't know how to write above code to connect sql along with Hoststring "*oracle*"
please help me................

if "pawan" is indeed a DNS entry you're never going to get ODBC to connect to it as it required a DSN :)
But indeed, you shouldn't use the bridge driver for anything, especially if there's a perfectly good native driver for the database you're connecting to which there is for Oracle.

Similar Messages

  • MDM WebServices Problem while connecting to MDM repository

    Hello,
    we have installed the Web Services for MDM.
    When I test the Services, say the MDMSearchRecords I always get a ERROR status and the Message:
    id (String)  WS_LogonProblem
    severity (String) ERROR
    text (String)   Problem while connecting to MDM repository: z_Material on server: debmu416.server..... at port: 4000. Maybe the Repository-Information has not been set correctly at the requested query.
    status (String)  FAIL
    The Repository Information I try to connect with is correct (Repository Name, Server Name, Port, data Language and schema Language).
    Can you pls tell me where the problem could be?
    Points will be generously rewarded!
    Best Regards,
    Mircea

    Hi Arun,
    Thanks a lot!
    you were right! The WebServices version was too old.
    Now I can connect to the Repository in Test mode.
    I get some other error Messages, like "Field Material_Number is not defined at Table Products." and "Repository Data is not available in the requested Language ." which isn' right.
    Do you have a clue where this could come from?
    BR,
    Mircea

  • Having problem while connecting to SQL Server through a application

    hi guys ,
    having one problem while connecting to the SQL SERVER 2008 R2 through a application (Dynamics NAV), by using the concept of Linked Server.
    But one more thing , i am able to access that very SQL server through my app , when i am working locally , i mean to say that when i am working on the machine itself on which the server is installed then its working fine .
    But when i am working on another system the query doesn't work.

    by using the concept of Linked Server.
    Why through a linked server and not directly as a simple remote connection? I don't think you app is aware of linked server.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Host String Problem

    Hi everyone, i searched the forum and found same problem with me but i did not work for me. The problem is i cannot connect my sql plus. i enter my username and password then it asks me gor host string but when i type it and enter "ok" it says "TNS Listener does not currentl know of service requested in connect descriptor. i looked at my tnsnames.ora file and is exactly like this.
    # tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    CSE348 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Canavar)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = cse348)
    So what shoul i type to connect sql plus?

    Given the tnsnames.ora content, the following needs to be entered for sqlplus in order to have it use that connection string in the file:
    sqlplus scott/tiger@CSE348As you have not qualified the alias with a domain, it will default to "+.world+" as far as I recall. If the default domain in your local sqlnet.ora differs, than that default will be used to find alias CSE348 in the local tnanmes.ora file. So make sure that you do not mix default and explicit domain names. Rather specify a default domain in sqlnet.ora and use the same domain for defining full qualified domain name TNS aliases in tnsnames.ora.
    As for the error - the Listener receives a connection request for a service called cse348 - and no such service has registered with it. You can check the known services of the listener using the "+lsnrctl services+" command on the server.
    Often in this case, it is easier to request a specific database instance using its system identifier, or SID. In which case you can change your connection string for the alias to use a SID as follows:
    CSE348 =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = Canavar)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SID = cse348)
      )This assumes that the SID is cse348. The default SID is for example orcl. SIDs like dev and prod are also often used.

  • Connection problem while connecting to LDAP resource via SSL

    Hi,
    I am facing problem in connecting LDAP via SSL. I got the self signed certificate from the LDAP team and while importing it to the JVM keystore using command "keytool -import -file PathTo/ds-cert.txt -keystore ./cacerts -storepass changeit -trustcacerts", I am getting error "keytool error: java.security.SignatureException: Signature does not match". Since I am not able to import the cert, I am facing problem in connetcing to LDAP via SSL. I have gone thru other posts and found some answers for it.. but not able to do it correctly. I am using SIM 7.1 and tomcat. In some posts, I have seen, in the resource config wizard, use "true" instead of 1 in the SSL field.. For SIM 7.1, does the value 1 work?. Please help me in importing the cert to my local JVM keystore.
    Thanks.
    Edited by: dj123 on Oct 15, 2008 1:50 PM

    Make sure you are importing the certificate of the issuer (CA) that issued the LDAP certificate, not the LDAP cert itself.

  • Database host string problem

    When I connect with an oracle database using DriverManager.getConnection() I have to use the database name for example orcl. I'd like to use the host string, the same as in SQLPlus. How can I do it?
    And what is the difference between thick driver and thin driver?

    I'd like to use the host string, the same as in SQLPlus. How can I do it?
    Refer
    http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#05_00
    what is the difference between thick driver and thin driver?
    http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#22_00
    http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#23_04
    http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#35_01

  • I was facing problem while connecting to oracle database.Can some one help me soon!!!!!

    Hi all,
    I was facing problem from last week.Suddenly i was getting ora-12505 error while connecting to the database through toad.I tried to change tnsnames.ora & listener.ora in multiple ways,but no luck...Inspite i was getting different errors like ora - 01034: ORACLE not available / ora - 27101: shared memory realm does not exist...When i try to connect using sys / sys as sysdba,connection is establishing and when issue the command startup it was throwing the error ORA-01821: date format not recognized......Fed up solving these issues....Can some one help me out...It's very very urgent..
    Thanks in advance,
    pavankumar.

    Well, the obviously solution is to use separate Apple ID's for iCloud.

  • SQLDeveloper i18n problem while connecting/testing connection to oracle DB

    Hello,
    i've got a problem with connection to oracle server if there's a number (or some other strange character?) in SID/SERVICE NAME, after pressing "Test" button I get just Exception:
    Status: Failure - Test Failed: oracle.i18n.text.converter.CharacterConverterOGS.getInstance(I)Loracle/sql/converter/CharacterConverters;
    If I skip the test and save the settings, connection to database (expanding + in the list) will do nothing.
    I'm using correct username/password/hostname/port, I've checked it many times.
    I've tried to change database name from TEST9 (it's erroring on this one) to something else and server return exception about non existing database, so connection parameters are ok I think.
    I'm using fedora 8 with JDK1.6 and latest SQL Developer package.
    Thanks for any help.

    I would file an oracle jdbc bug to begin with, but I am guessing the driver is simply waiting
    for the DBMS to respond, so yo may need a good DBA to see what the DBMS thinks is going
    on at the time. I did hear of a case where the DBMS was doing some auditing, logging
    some info during every login. This info was being written to an OS file which just happened
    to be remote-mounted and would occasionally take 30 seconds, which caused connection
    requests to timeout at the driver end.... WebLogic is just asking the driver for a connection
    using your properties, so it's not involved directly with the problem....

  • Problem while connecting to DB2 through JDBC...Help PLZZZZZZZZZZZ

    Hi Everyone, I am facing this exception when I try to connect to DB2 to which installed on Z/OS. Please help me
    for your ref I am pasting my code below exception
    com.ibm.db2.jcc.b.SqlException: IO Exception opening socket to server 10.108.45.151 on port 446. The DB2 Server may be down.
         at com.ibm.db2.jcc.a.a.<init>(a.java:137)
         at com.ibm.db2.jcc.a.b.a(b.java:1542)
         at com.ibm.db2.jcc.b.o.<init>(o.java:795)
         at com.ibm.db2.jcc.a.b.<init>(b.java:298)
         at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:162)
    my code is:--
              try {
                   Class.forName("com.ibm.db2.jcc.DB2Driver");
              } catch (ClassNotFoundException se) {
                   se.printStackTrace();
                   System.out.println(se);
              try {
                        cn =DriverManager.getConnection("jdbc:db2://11.112.41.12:446/dbname","uname","pwd");
              } catch (Exception e) {
                   e.printStackTrace();
              }

    You will need to check this error message on metalink and likely on an SR.
    But with RAC you should not be connecting to the database, or in most cases, to a specific instance: You should be connecting to a TAF (or FCF) service.

  • Problem while connecting to site using proxy server in weblogic 8.1

    Hi All,
    I am able to connect to the site www.testtest.com when i am running the below
    program out side a bea weblogic server. but i couldn't able to connect to the
    www.testtest.com when i am accessing thru a progam that was running in weblogic
    server. i am getting the below exception
    Tried all: '1' addresses, but could not connect over HTTP to server: 'www.testtest.com',
    port: '80'
    I am using weblogic server 8.1. Pls help me out in solving this.
    import java.io.*;
    public class testurl
    public static void main(String[] args)
    try
         String username = "username";
         String password = "password";
         String proxy_internet_address = "111.111.12.12";
         String proxy_internet_port = "80";
         String urlString ="http://www.testtest.com/";
         java.net.Authenticator.setDefault(new SimpleAuthenticator(username,password));
         java.net.URL url = new java.net.URL(urlString);
         java.util.Properties systemProperties = System.getProperties();
         systemProperties.setProperty("http.proxyHost",proxy_internet_address);
         systemProperties.setProperty("http.proxyPort",proxy_internet_port);
         java.net.HttpURLConnection aConnection = (java.net.HttpURLConnection)(url.openConnection());
         aConnection.setDoInput(true);
         aConnection.setDoOutput(true);
         aConnection.setUseCaches(false);
         aConnection.connect();
         java.io.InputStreamReader insr = new java.io.InputStreamReader(aConnection.getInputStream());
         java.io.BufferedReader br = new java.io.BufferedReader(insr);
         String s="";
         String textString =null;
         while((textString = br.readLine())!=null)
         s = s + textString;
         }//end of while
         br.close();
         aConnection.disconnect();
         PrintWriter pw = new PrintWriter(new FileOutputStream("test.html"));
         pw.println(s);
         pw.close();
    }catch(Exception e){
         System.out.println(e.toString());

    I have a similar problem. I want to connect to a URL, but not using proxy. From outside BEA or in BEA 6.1 it works OK, but not in BEA 8.1.
    Did you get to solve your problem ?

  • Applet security problems while connecting with database

    i hav problem in the japplet connecting with sql database
    it gives security access denied error while running program as my driver is jdbc:odbc:bridge driver
    so for resolving this error how can i turn off security of applet and also which security permission to be change?
    plz reply

    baftos wrote:
    Maybe I should question the need to access a local database on the client PC.
    But anyway, the normal way to obtain security clearance is to use a signed applet.
    Another possibility is to grant the applet all permissions by modifying the security policy file of each client to grant your applet 'all permissions'. Note that in this case you must have access to each and every client PC or ask them to do so before running the applet.Database access at client's machine is ridiculous. I doubt this is what OP wants.
    @OP: request you to post the original security issue and the environment details.
    Thanks,
    Mrityunjoy

  • Problem while Connecting with oracle thin driver

    I have been trying for the past two days for connecting oracle 8.1.1.6 using thin driver. I set the classpath also. It throws me the following exception.
    Exception in thread "main" java.sql.SQLException: Io exception: The Network Adap
    ter could not establish the connection
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:260)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va:365)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:177)
    at Employee.main(Employee.java:23)
    I am trying to acheive the connection using the following piece of code
    Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@THIRU:1521:ORCL",
                        "scott", "tiger");
    The problem lies in that piece of code only,
    In the TNSNAMES.ora the entries are as follows.
    THIRU =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Thiru)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = thiru)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    How to solve this one. Can anybody tell me how to provide the proper url.
    thanks in advance

    You were very close.
    "Thiru" as opposed to "THIRU" should be the name of the machine running the database, but that would imply that the DNS lookups are case sensitive, and we know that's not the case.
    My guess, because the network adapter itself is reporting an error, is that "Thiru" evaluates to an IP address that isn't correct, that is, it's trying to make a connection to a specific address and getting nothing back in return.
    Anyway, I think your program(s) are just fine, and your network is misconfigured. Incidently, it is always a good idea in cases like this to use the full name of the machine, for example...
    ...getConnection( "jdbc:oracle:thin:@thiru.maran1977.com:1521:ORCL"...
    and in the database configuration itself...
    (ADDRESS = (PROTOCOL = TCP)(HOST = thiru.maran1977.com)(PORT = 1521))
    You may also use the IP address if you wish.

  • Problem while connecting to Oracle from JAVA

    HI ,
    I am stuck with a problem.I could'nt connect from java to SQL.
    Do I need to install any drivers.I installed oracle 8i full version.and i am
    using j2sdk1.4.2.and included class12.zar file in class path......
    what els I have to do.
    please give me the solution.
    feel free to contact me at [email protected]

    I am stuck with a problem.I could'nt connect from java to SQL.
    Do I need to install any drivers.I installed oracle 8i full version.and i am
    using j2sdk1.4.2.and included class12.zar file in class path......
    what els I have to do.Well, what have you tried?
    You need the Oracle JDBC driver jar (ojdbc14.jar) which you can download from Oracle or somewhere I believe....I can't remember where I got it. Anyway, google for the Oracle JDBC driver and you should find it.
    You will probably need to read up on JDBC as I can't believe you even did that before you realised you needed a driver to connect. Good luck.
    feel free to contact me at [email protected]
    Nope.....post to forum, reply to forum.

  • Problem while connecting to external ABAP system (on 4.6C rel)

    Hi All,
    I've created WebDynpro application that is supposed to fetch info about users from several ABAP systems. J2EE engine that runs this WebDynpro is directly connected to one of the ABAP systems. I've successfully created identical Adaptive RFC models, maintained SLD entries for my ABAP systems and configured JCO connections for my WebDynpro through WebDynpro Content Manager (http://<host>:port/webdynpro/welcome). I was able to reach all ABAP systems testing my JCO connections from WebDynpro Content Manager.
    The problem I am experiencing is the following:
    the application is working fine for the ABAP system that J2EE (where it's executed) is connected to, but failed to reach the remote ABAP system issuing the following message:
    "Accessing System <Remote ABAP system> is not possible because RFC Metadata was retrieved using System <ABAP system that J2EE is connected>. Please assure you have configured the RFC Connections properly. A Server restart may be necessary!"
    Where else should I have define JCO settings ?
    This remote ABAP system is running on 4.6C so I have no options to install J2EE on it or fully configure SLD for that system.
    It may seem like a dummy question since I am new to WebDynpro programming.
    Thanks in advance,
    Mike

    Hi Rich,
    Thank you for a quick reply,
    Here is what I've done to connect to the remote ABAP system:
    1. Configured this remote system in the SLD as a Technical System (SLD=> Technical Landscape).
    2. Opened WebDynpro Content Administrator and created two JCO's for my application pointed to that remote ABAP system (defined in SLD). I was able to test them successfully reaching that remote system.
    But when I run my application the same error occured.
    What did I miss ?
    Thanks & Regards,
    Mike
    Message was edited by: Mykhaylo Puzankev

  • Problem while connecting to external DB using DB link

    Hi,
    We've recently upgraded SAP(4.6C) Oracle DB to 10g version. SAP is talking to an external DB which is on a 8.x version.
    The following is the native SQL statement being used to select data from the external DB -
    EXEC SQL PERFORMING APPEND_ISSUE.
          SELECT STOCK_NO,
                 QUANTITY,
                 SOURCE_LOCATION1,
                 SOURCE_LOCATION2,
                 JOB_CODE,
                 ACID_CODE,
                 EMPLOYEE_NO,
                 SOURCE,
                 ROW_ID,
                 CIS_ORDER_NO
           INTO :WA_ISSUES
           FROM [email protected]
      ENDEXEC.
    FORM append_issue.
    *-- Begin HD002666
      SHIFT     wa_issues-quantity         RIGHT DELETING TRAILING space.
      TRANSLATE wa_issues-quantity         USING ' 0'.
      SHIFT     wa_issues-source_location1 RIGHT DELETING TRAILING space.
      TRANSLATE wa_issues-source_location1 USING ' 0'.
      SHIFT     wa_issues-job_code         RIGHT DELETING TRAILING space.
      TRANSLATE wa_issues-job_code         USING ' 0'.
      SHIFT     wa_issues-acid_code        RIGHT DELETING TRAILING space.
      TRANSLATE wa_issues-acid_code        USING ' 0'.
    *-- End HD002666
      APPEND wa_issues.
    ENDFORM.
    The DB link is running fine and we're able to connect to the external DB.
    The 1st record from the extranl DB is read perfectly.
    From the 2nd record, some of the numeric fields are reading a value '~'. We checked the external DB view SAP_TRUCK_INVENTORY_ISSUES_V and it has all non-null numeric values.
    It's confusing that the 1st record has exactly the same values as the external DB, but from 2nd record onwards, it is reading some numeric values as '~'.
    Is there any kind of internal conversion that is happening while reading data from SAP_TRUCK_INVENTORY_ISSUES_V into work area wa_issues.
    Are there any problems faced with DB links b/w 2 Oracle DBs with version difference more than 1?
    Any inputs on this would be helpful.
    Regards
    Deepthi.

    Hi Rich,
    Thank you for a quick reply,
    Here is what I've done to connect to the remote ABAP system:
    1. Configured this remote system in the SLD as a Technical System (SLD=> Technical Landscape).
    2. Opened WebDynpro Content Administrator and created two JCO's for my application pointed to that remote ABAP system (defined in SLD). I was able to test them successfully reaching that remote system.
    But when I run my application the same error occured.
    What did I miss ?
    Thanks & Regards,
    Mike
    Message was edited by: Mykhaylo Puzankev

Maybe you are looking for

  • Voyager 3.1 link to WebI document

    I appear to have successfully created a link from a Voyager 3.1 element to a WebI doc. 1. I select the measure and right-click Link -> Set 2. I choose my WebI report (which contains a prompt label called CPT) 3. I select CPT in the parameter drop-dow

  • Does "Target table" and "Error Table" need to be in same DB as OWB's?

    We get the following error ORA-00600: internal error code, arguments: [opixrb-3], [1036], ORA-01036: illegal variable name/number at the time of OWB execution OWB seems to successfully log the errors rows in the error table when a) target table and i

  • Error won't let me access another class(has got me tearing my hair off)

    Alright peeps, so basically i have 2 buttons in the mainfraime class. The first button leads to the contestant's page and the second to the voters page. The first button works and directs the user to the PasswordDemo page, but to the hell of me i can

  • Motion still fragile after installing it in a MacPro

    OK so we've had the FCP update so where is the Motion update. As a Pro user of this software I am very unhappy with Motion as it stands at the moment. I sent a request to Apple as I cannot use Motions keyframes anymore. This has been since I bought t

  • HOW DO YOU GET TO THE RAID SETTINGS ON THIS THING (GT60 2O)???

    Dude... I been online for 40 minutes looking for instructions on how to get around this box. I can't find anything relevant, so I'm just gonna ask. How do you get to the settings for SUPER RAID 2? I can't find any information on it and now I'm really