Jdbc.url newbie question

Hi there,
Apologies for this very begginerish question.
I have been working with oracle in college for the last year. Have been conecting from java using these settings
jdbc.driver=oracle.jdbc.driver.OracleDriver
jdbc.url=jdbc:oracle:thin:@nc-oracle-2.students.collegename.ie:1521:orcl
jdbc.username=username
jdbc.password=password
I am trying to finish up project at home for the weekend and have installed oracle 9.20.10.
I am not sure what these settings should be or how to find out. I have user name and password set up and can work away in sqlplus. How do I find out what the jdbc.url is?
Thanks in advance
stuart.

thanks, I ran those commands and now have this
jdbc.url=jdbc:oracle:thin@localhost:1521:stuart
When I run my app I am getting this message:
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
Any suggestions?
Message was edited by:
newbie101
Message was edited by:
newbie101
Message was edited by:
newbie101

Similar Messages

  • JDBC Adapter Newbie question

    Hi,
    I'm learning about XI and have a question regarding the JDBC adapter.
    Is it possible to generate interfaces and data types in the design view from the jdbc adapter under XI or do the interfaces have to be designed manually?
    Kind regards,
    Heiko

    hi,
    they have to be degined manually in XI
    have a look at this page:
    http://help.sap.com/saphelp_nw04/helpdata/en/22/b4d13b633f7748b4d34f3191529946/content.htm
    and check how interfaces for sender and receiver adapter have to look like
    Regards,
    michal
    Message was edited by: Michal Krawczyk

  • JDBC URL problem

    hello to all!
    Im a newbie in database programming using JDBC. I would like to ask for the format of URL of Sun's JDBC. I would also would like to know if it is possible to create a database from native java code. that would be my questions for now.
    jeff

    I would like to ask for the format of URL of Sun's JDBC. Depends on the DB and the JDBC driver used. If you use for example a MySQL DB [1] with the MySQL's own Connector/J driver [2], then the JDBC URL format is: jdbc:mysql://localhost:3306/databasename [3].
    [1] http://www.mysql.com
    [2] http://www.mysql.com/products/connector/j/
    [3] http://dev.mysql.com/doc/refman/5.0/en/connector-j.html
    I would also would like to know if it is possible to create a database from
    native java code.Java EE 5 provides JPA, the Java Persistence API [4].
    [4] http://java.sun.com/javaee/overview/faq/persistence.jsp

  • Wrong SID in JDBC URL

    Hi all,
    I'm developing a java program in OAF context to generate a pdf from a xdo data template and template. this is already working, there is only one issue.
    The DataProcessor needs a connection, therefore I've specified hardcoded a JDBC URL.
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:apps/apps@(DE.............");
    and then pass conn to the DataProcessor.
    dataprocess.setConnection(conn);
    But i want to get rid of this hardcoded connection.
    So I did the following:
    OAApplicationModuleImpl am = (OAApplicationModuleImpl)pageContext.getRootApplicationModule();
    String JDBCURL = am.getOADBTransaction().getConnectionMetadata().getJdbcURL();
    System.out.println(JDBCURL");
    as result a wrong connectionstring: ....com)(PORT=1533)))(CONNECT_DATA=(SID=1533)))
    he takes for SID the port number....
    questions I have:
    - the way I work is correct?
    - where does he gets his jdbc url from? becuase I already checked my database in jdev and it works (with correct SID) and also my dbc file is correct...
    Thanks in advance!
    Stijn

    Stijn ,
    You can get connection from OADBTransactionImpl in AM.Here is the sample code:
    import oracle.apps.fnd.framework.server.OADBTransaction;
    import oracle.apps.fnd.framework.server.OADBTransactionImpl;
    import oracle.jdbc.driver.OracleConnection;
    OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)getOADBTransaction();
    OracleConnection conn = (OracleConnection)oadbtransactionimpl.getJdbcConnection();
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Can't use JDBC URL for multiple LDAPs

    ColdFusion 8,0,1,195765 Enterprise (Trial)
    We use Oracle OID (LDAP) instead of tnsnames.ora to resolve database connection strings. This is how I specify one LDAP JDBC URL. On the CF admin page, Server Settings, Java and JVM, ColdFusion Class Path is set to C:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar. Under Data & Services, Data Sources, create a new source. Set JDBC URL to
    jdbc:oracle:thin:@ldap://mdaoid1.mycompany.com:389/mdad2,cn=OracleContext,dc=mycompany,dc= com
    where mdaoid1 is one of the two Oracle OID servers that resolve connection strings, and mdad2 is an entry in the two OID's sync'ed to each other. That works.
    According to many sources based on Google search for "space separated LDAP URLs", I should be able to add another LDAP server separated by space. Now I append " ldap://mdaoid2.mycompany.com:389/mdad2,cn=OracleContext,dc=mycompany,dc=com" (no quotes, added to indicate leading space) to that string. Upon clicking Submit, I get
    Connection verification failed for data source: orcl10g3
    java.sql.SQLException: For input string: "389 ldap:"
    The root cause was that: java.sql.SQLException: For input string: "389 ldap:"
    (orcl10g3 is the CF data source name I'm creating) Some say I need to replace space with %20 in the double LDAP URL. With %20, I get error
    Connection verification failed for data source: orcl10g3
    java.sql.SQLException: Io exception: JNDI Package failurejavax.naming.InvalidNameException: Invalid name: mdad2,cn=OracleContext,dc=mycompany,dc=com ldap://mdaoid2.mycompany.com:389
    The root cause was that: java.sql.SQLException: Io exception: JNDI Package failurejavax.naming.InvalidNameException: Invalid name: mdad2,cn=OracleContext,dc=mycompany,dc=com ldap://mdaoid2.mycompany.com:389
    Question: How do I add more than one LDAP server to the JDBC URL so I can achieve failover and load balance?
    Yong Huang
    yong321 at yahoo.com

    The message above was posted by me two years ago and was brought to my attention today. Here's a short update: The network team added a load balancer mdaoid in front of, and resolved to, mdaoid1 and mdaoid2 (in round-robin fashion). The problem described in this thread is bypassed because the JDBC URL can simply use one-OID format, in which mdaoid is used as the LDAP server.

  • Newbie question - XML version, searching by artist

    Probably quite a common problems - apologies for newbie questions.
    I've changed the URL of my MP3s in my XML to a new location and refreshed my feed. Is there a way of seeing what version of the XML iTunes is using? (it takes around 24 housr to refresh, right?)
    Also, when I'm searching for my podcast by author it's not coming up (<channel><itunes:author>) - is there a reason for this or a way to get it to show up when people search for the artist, other than doubling it in the title? (This works by the way, but I'd prefer not to!)
    Thanks.

    you can do it in just one loop, going through all the image
    tags in index_content and for each tag fill the values of all four
    arrays
    for (i...) {
    get the appropriate child of index_content
    first_array[ i ] = value of first tag
    second_array[ i ] = value of second tag
    no need for multiple loops.
    flash has functionality for xml files, but it helps to write
    a little wrapper around it, to simplify programming, especially if
    you work with xml a lot.. I wrote my for work, so I can't show it
    to you, but it's not very complicated to do

  • SQL Server JDBC integrated security question

    I'm assuming that the only way to create a connection to SQL Server using the JDBC driver is using IntegratedSecurity=false and not IntegrateSecurity=true? I can see the arguments for having it only work with false, but I just wanted to make sure so I can clear any questions up regarding security with our client's DBA. Thanks.

    Hi Matt,
    It is possible to use integrated security with ODI, you need to have the JDBC driver and the sqljdbc_auth.dll file in your drivers directory.
    Your JDBC url will look like this: jdbc:sqlserver://localhost:1113;integratedSecurity=true
    It is detailed in a note on Metalink (568070.1), here is an extract:
    To implement the solution:
    1. Copy the "sqljdbc_auth.dll" file into ODI "/drivers" Folder on the computer where the JDBC driver is installed.
    2. In ODI "/bin/odiparams.bat" configuration file, set the "java.libary.path" system property to specify the directory of the "sqljdbc_auth.dll" file, as follows:
    set ODI_ADDITIONAL_JAVA_OPTIONS="-Djava.library.path=c:\oracle\oracledi\drivers" or, if ODI_ADDITIONAL_JAVA_OPTIONS has already been set, add "-Djava.library.path=..." to the existing string, as follows:
    set ODI_ADDITIONAL_JAVA_OPTIONS="-Duser.language=en" "-Duser.country=US"
    "-Djava.library.path=c:\oracle\oracledi\drivers"
    3. If using an Agent started with "agent.bat" or "agentscheduler.bat" commands, the Agent should be stopped and restarted (in order to take into account the new Java settings).
    4. If using an Agent started as Windows Service, then:
    Stop the Agent Service.
    Remove the Agent Service with "agentservice -r" command.
    Edit the "snpsagent.conf" file (from ODI "/tools/wrapper/conf" Directory).
    Add the Java Library Path to specify the Directory of "sqljdbc_auth.dll" File, as
    follows:
    wrapper.java.library.path.2=c:\oracle\oracledi\drivers
    Recreate the Windows Service with "agentservice -i" command.
    Start the Windows Service.
    Thanks,
    Julien

  • Deployment using JDBC DataSource instead of JDBC URL

    Hello,
    I've noticed some strange behaviour when deploying an ADF application (11g, latest release) to a WLS (integrated or stand-alone), when using JDBC DataSource as a connection type for the application module.
    Normally, when you create your Business Components, a Database Connection is added to the Application Resources panel, eg MyConnection. If you then set your AM to JDBC DataSource instead of JDBC URL, the default datasource would be jdbc/MyConnectionDS. To make the application use the DataSource defined on the WLS, I then uncheck "Auto Generate and Synchronize weblogic-jdbc.xml Descriptors during deployment" in the Application Properties > Deployment tab.
    So far so good: after deployment to the WLS, the application uses the DataSource defined on the WLS server (jdbc/MyConnectionDS). When changing it on the server to another database, the application indeed uses this other database. Also, the following is automatically added to the web.xml during deployment to .ear file:
      <resource-ref>
        <res-ref-name>jdbc/MyConnectionDS</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
      </resource-ref>Now the part that doens't make sense to me: if I delete the password in the Database Connection under Application Resources, I can still deploy the application, but the jdbc/MyConnectionDS on the WLS is not found anymore. While it is still there. I get the following error message:
    Unable to lookup Data Source at context java:comp/env/jdbc/MyConnectionDS
    oracle.jbo.DMLException: JBO-27200: JNDI failure. Unable to lookup Data Source at context java:comp/env/jdbc/MyConnectionDS
    I made the JDev connection (used at development) invalid, and the deployed application stops working (at runtime). While it should just be using the JDBC DataSource defined on the WLS, that is still there. The reason appears to be that when there is no password in the Database Connection in JDev, the entry in the web.xml (see above) is not made during deployment.
    I am doing something wrong? Or is this "expected" behaviour?
    The reason why it bothers me: I have made a reusable component (a Data Control, let's call it A) from a model project, by deploying it to a ADF library JAR. I've set the AM of this project to use a certain jdbc datasource, which will be defined on the WLS.
    When importing the library JAR of A inside another application (B), the connection of the A is added to B. But ofcourse, without the password for security reasons, so we're in the situation described above: When I deploy the new application B, the web.xml is not updated with the DataSource of A, and the application doens't work. And what I would like to avoid, is that whenever someone uses component A, that they have to update the connection details of component A in application B. Because when I fill in the password of application A's Database Connection in application B, all works well again.
    I hope this question makes sense. :-)
    Thanks in advance,
    Chris

    Arun and Krithika,
    Thanks for your replies. I have already done what both of you suggested:
    Chris Schryvers wrote:
    I then uncheck "Auto Generate and Synchronize weblogic-jdbc.xml Descriptors during deployment" in the Application Properties > Deployment tab.I can get it to work, both for deployment on the internal WLS as on a stand-alone WLS.
    My only question is: why does a property at development time (the empty password of the JDev connection) influence the runtime behaviour (the JDBC DataSource not being found after deployment).
    Ofcourse, setting the password for the connection in JDev "solves" the problem. But I want to avoid that everyone who uses the reusable component needs to fill in the password for its database connection. In my opinion, that's the whole point of using a JDBC datasource instead of a JDBC URL: the reusable component just states that there needs to be a jdbc/MyConnectionDS on the server and it can be used as is. Wihtout any modifications at development time.
    What's more:
    Suppose I import the reusable JAR and its connection is added to JDev, without password.
    *) Leaving the password empty: DS not found after deployment (web.xml not adjusted, as mentioned in my original post)
    *) Entering the correct password: DS found, web.xml adjusted at deploy time.
    *) Entering an incorrect password: DS found, web.xml adjusted at deploy time.
    It even works when I enter an incorrect password, which proves that the JDBC DataSource on the server is used, instead of the JDev connection. Then why is the web.xml not adjusted when the password remains empty?
    Arun, I'll check the documention that you linked to, but this just seems like an weird decision in the implementation of JDev/ADF. :-)

  • Creating a service ; What needs to be added to tnsnames.ora and JDBC url?

    DB version: 11.2.0.2
    OS platform : Solaris 10
    We have a 2 node RAC.
    DB name   = mbsprd
    Instance1  = mbsprd1
    Instance2  = mbsprd2I want Instance 1 (mbsprd1) to be used for our OLTP application and Instance 2 (mbsprd2) to be used for another application of DSS nature.
    Based on the syntax
    srvctl add service -d <dbname> -s <ServiceName> -r <Preferred Instance> -a <Available Instance>I am going to create 2 services
    -- Creating a service called OLTP
    srvctl add service -d mbsprd -s OLTP  -r mbsprd1 -a mbsprd2-- Creating a service called DSS
    srvctl add service -d mbsprd -s DSS  -r mbsprd2 -a mbsprd1-- Starting the services
    srvctl start service -d mbsprd -s OLTP
    srvctl start service -d mbsprd -s DSSI guess the above steps are enough to configure a service at the server side.
    I would like to know what needs to be done at the client side.
    Currently the tnsnames.ora file and JDBC url used by our clients are shown below. What needs to be added to tnsnames.ora file and jdbc URL to start using services configured above?
    -- SCAN based TNS entry
    mbsprd =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (COMMUNITY = tcp.world)
            (PROTOCOL = TCP)(Host = p148149-scan.tpam.net) (Port = 36964))
        (CONNECT_DATA =
          (SERVER       = DEDICATED)
          (SERVICE_NAME = mbsprd)
          (FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC))
    -- TNS entry based on local listener
    -- Instance 1
    mbsprd1 =
    (DESCRIPTION =
       (ADDRESS_LIST =
       (ADDRESS =(PROTOCOL = TCP)(HOST = hsolarp148-vip)(PORT = 36973))
       (CONNECT_DATA =
             (SERVICE_NAME = mbsprd)
             (INSTANCE_NAME = mbsprd1)
    -- Instance 2
    -- TNS entry based on local listener
    mbsprd2 =
    (DESCRIPTION =
       (ADDRESS_LIST =
       (ADDRESS =(PROTOCOL = TCP)(HOST = hsolarp149-vip)(PORT = 36973))
       (CONNECT_DATA =
             (SERVICE_NAME = mbsprd)
             (INSTANCE_NAME = mbsprd2)
    )JDBC entry for RAC
    jdbc:oracle:thin:@p148149-scan.tpam.net:36964:mbsprd -- Alternative version used by some clients because the above had 'some issues'
    jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=p148149-scan.tpam.net) (PORT=36964))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=mbsprd)(FAILOVER_MODE =(TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 10))))

    OLTP =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = p148149-scan.tpam.net)(PORT = your_port_number))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = OLTP)
    DSS =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = p148149-scan.tpam.net)(PORT = your_port_number))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = DSS)
      )JDBC entry for RAC
    jdbc:oracle:thin:@p148149-scan.tpam.net:36964:service_name
    jdbc:oracle:thin:@new_tns_entry_description(if you would like to connect the database with particular service)
    try this and let us know any issues,

  • Driver Class name and JDBC URL Format

    Hi,
    I'm trying to use the oracle jdbc driver to connect to an (what a surprise) oracle database.
    I need a 'driver class name' and the JDBC URL Format. But I cannot find these anywhere.
    Can anyone help me out here?
    Regards,
    Laurens

    http://myjdbc.tripod.com/basic/jdbcurl.html

  • Dynamic JDBC URls at Runtime

    Hi Experts,
    I did my application in jdev 11.1.1.6 and deployed using Jdbc Url connections and it worked successfully (Actually I m working with 2 diff Database connectiosn in my application)
    But the thing is my company need me to do something like I should be able to dynamically use Jdbc url connections at runtime so that they want to have QA db and PROD db inside the application
    and dynamically change them itseems. (i.e I will have 4 Db in which 2 for QA and 2 for PROD)
    Is there a way where I can achieve them. If so help me out.
    Thanks,
    933601

    Hi,
    You could store the database URLs in a properties file in the app server filesystem, then look them up in the dynamic JDBC code before setting the session attributes. So your QA app server has a properties file containing the URLs for the 2 QA databases and the PROD app server has a properties file containing the URLs for the 2 PROD databases.
    If you want a single app server to talk to multiple sets of databases you could pass a parameter to the login screen. Based on this you decide which database(s) to connect to.
    Kevin

  • Total Newbie Question ... Sorry :-(

    I know it's a windows thing, and I am now converted to Mac but I gotta know this because it's doing my head in. It's a complete stupid green gilled newbie question.
    When installing new programs on a Mac can you create shortcuts to the programs on the Dock? I did what I THOUGHT it would be, i.e I made an Alias and stuck it in the dock, but on rebooting my Mac later on, in place of the shortcuts where 3 question marks which when clicked on did absolutely nothing???
    Help?
    A.L.I
    Windows XP Pro Desktop, Macbook Pro, 60GB iPod Video   Mac OS X (10.4.5)   OS X

    You aren't installing something from a dmg file are you? The dmg is a disk image – kind of a virtual CD. So when you double click the dmg and then get the little disk/hardrive/custom icon on your desktop that is the same as if you had mounted a CD. You then need to drag the application off of that "CD" into your application folder. Then it is truly installed.
    You can then "eject" the icon your your desktop. This is what happens when you shutdown and without remounting the image your dock shortcut can't find the original.
    Just a thought.

  • Newbie Question. just installed IE7.. how do I set up a local host to preview sites?

    Sorry for the newbie question... but it's been a long time since I have done this
    Thanks!

    Just define your site in DW as always.  For a static site, that's all you need to do.

  • Newbie Question about FM 8 and Acrobat Pro 9

    Hello:
    I have some dcouments that I've written in FM v8.0p277. I print them to PDF so that I can have a copy to include on a CD and I also print some hard copies.
    My newbie question is whether there is a way to create a  PDF for hard copy where I mainitain the colors in photos and figures but that the text that is hyperlinked doesn't appear as blue. I want to keep the links live within the soft copy. Is there something I can change within Frame or with Acrobat?
    TIA,
    Kimberly

    Kimberly,
    How comes the text is blue in the first place? I guess the cross-reference formats use some character format which makes them blue? There are many options:
    Temporarily change the color definition for the color used in the cross-reference format to black.
    Temporarily change the character format to not use that color.
    Temporarily change the cross-reference definition to not used that character format.
    Whichever method you choose, I would create a separate document with the changed format setting and import those format into your book, create the PDF and then import the same format from the official template.
    - Michael

  • REDIRECT JDBC URL WHEN USING DYNAMIC JDBC CREDENTIALS SO NOT HARDCODED

    I have taken over an application that uses row-level security and ADF (using
    dynamic JDBC Credentials). I have been able to set the internal_connection to
    a JDBCDatasource, but cannot set the Connection Type in the Oracle Business
    Component Configuration to a JDBCDatasource. When I do, I receive errors that
    tables are not found. When I set the value back to a JDBC URL, everything
    works fine again.
    I am looking for a solution where the userid and password are not hardcoded in
    the BC4J.xcfg or a way to redirect this information, as we change our system
    passwords every nighty days. Otherwise, I will have to redeploy the
    application every nighty days.
    I did not create this application, but I am sure that you could simply follow
    the "How to Support Dynamic JDBC Credentials" article. From that point, you
    will probably be where I am, where I have the internal_connection set to a
    JDBCDataSource and working properly, but cannot set the Connection Type to
    anything where the userid and password will not be hardcoded or cause failure.
    I wanted to let you know that I have
    found the updated How to Support Dynamic JDBC Credentials
    (http://www.oracle.com/technology/products/jdev/howtos/bc4j/howto_dynamic_jdbc.h
    tml) and was going to run through the "Advanced: Supporting Dynamic JDBC URLs",
    but once I was done keying in
    env.remove(ConnectionStrategy.DB_CONNECT_STRING_PROPERTY); I received a
    depreciation message on the DB_CONNECT_STRING_PROPERTY. (Note: I am coding in
    JDeveloper 10.1.3, so this may be depreciated as of then, but the ADF Libraries
    for JDeveloper 10.1.3 are on our Oracle 10gAS 10.1.2 server.)
    I thought maybe this would resolve my issue, but I can't be sure as the
    deprecation message leads me to believe that this solution may not be viable in
    the future.
    UPDATE
    =======
    The article you are referencing is definitely an older version.
    There is a newer article for 10g at:
    http://www.oracle.com/technology/products/jdev/howtos/10g/dynamicjdbchowto.html
    Please see if that helps.
    I have already reviewed this article.
    In fact, I have reviewed many versions of this document. I have not seen one
    created yet for 10.1.3 though (especially without JSF as our 10.1.2 AS server
    will not support it). I need to find an example or documentation that shows
    how we can keep from having the JDBC URL stored in the BC4J.xcfg or a way to
    use dynamic JDBC credentials with a JDBCDataSource. We do not want to store
    the userid and password in the application, rather, we would like to setup
    something that can be configurable from the application server.
    I think we need to use the dynamic JDBC credentials because we are using the
    row-level security, where we setup a database context for the user and only
    allow certain records of a database table to be returned to the browser based
    on that context.
    Might there be a way to still use the JDBCDataSource?

    I understand that the user provides the userid and password and that these values are setup using the Configuration class.
    However, when I am to deploy the ADF Business Module with my application, I have to specify either a JDBC URL or a JDBC DataSource in the Oracle Business Component Configuration.
    When I use JDBC DataSource, the code does not work properly, almost like the user's credentials are not used for the connection (I get errors like table or view does not exist).
    When I use the JDBC URL, the bc4j.xcfg stores a reference in the JDBCName attribute to a ConnectionDefinition in the same file. It is in this tag of the bc4j.xcfg where the userid, sid, and password (encrypted) is stored and used when retrieving the initial context of the ADF business components.
    It is these values that I want to have stored else where so that the application does not have to be redeployed in order for the password (or sid, or other connection information) to be change.

Maybe you are looking for