How to use RAC database connection details in oc4j.xcfg files

Hi all,
we are using oc4j.xcfg files for the application module configuration for an ADF application. and one of the database has been configured on RAC. Any input on how to specify the RAC database details in the oc4j.xcfg file specially for the host name parameter.
The example entry like in oc4j.xcfg is like
?xml version = '1.0' encoding = 'UTF-8'?>
<BC4JConfig>
<AppModuleConfigBag>
<AppModuleConfig name="AppModuleLocal">
<AppModuleJndiName>dbta.model.AppModule</AppModuleJndiName>
<DeployPlatform>LOCAL</DeployPlatform>
<JDBCName>connectDB</JDBCName>
<ApplicationName>dbta.model.AppModule</ApplicationName>
<jbo.project>Model</jbo.project>
</AppModuleConfig>
</AppModuleConfigBag>
<ConnectionDefinition name="connectDB">
<ENTRY name="ConnectionName" value="connectDB"/>
<ENTRY name="URL" value="jdbc:oracle:thin:<user>/<pass>@<server>:<Port>:<SID>"/>
<ENTRY name="HOSTNAME" value="<server>"/>
<ENTRY name="JDBC_PORT" value="<port>"/>
<ENTRY name="SID" value="<SID>"/>
<ENTRY name="ConnectionType" value="JDBC"/>
<ENTRY name="JdbcDriver" value="oracle.jdbc.driver.OracleDriver"/>
<ENTRY name="ORACLE_JDBC_TYPE" value="thin"/>
<ENTRY name="DeployPassword" value="true"/>
</ConnectionDefinition>
how to specify the failover nodes details in the above entry for host name etc.
Thanks
Navin

Here you are; all you want at
http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/9i_jdbc/OCIdriverTAFSample/OCIdriverTAFSample.java.html

Similar Messages

  • How to use JDBC database connection in Solaris

    Hi all,
    I am new to Solaris and i want to create an application using JDBC database connection.
    I want a small piece of code, probably a login page code that verifies the username from a OpenOffice database (.odb) file. I am particular to know the driver name, etc. If possible give the code using JNDI loopkup.
    Thanks in advance,
    Parasou.

    Sure no problem.
    Please stand by while I do your work for you.

  • How to use same database connection..... for application forms.

    hello
    im creating an database application using java swing and mysql.... it an mdi application ..... i want to know that how use a single connection for all forms in the application.... any example... coz im new for the java swing and mysql application .... ill be thankful for reply and solution....

    Crost post:
    http://forum.java.sun.com/thread.jspa?threadID=785812&messageID=4466100#4466100

  • How to use the database connection bean??

    hi,
    i was created a database connection class. can teach me how to call the class at JSP.
    thanx...
    <jsp:useBean id ="dat" class ="Database" scope ="request"/>
         String sql = "INSERT INTO  table"
               "(standard,col )" +
               " VALUES " +
                                                "('a','kk')";
         public static Connection getConnection()
             throws ClassNotFoundException, SQLException
              // Load Sun's JDBC-ODBC Bridge
              Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
              // Make a connection to JDBC-ODBC Bridge drive with
              // the connection URL, jdbc:odbc:DSN
              String url =  "jdbc:odbc:miniproj";
              return(DriverManager.getConnection(url, "anonymous", "guest"));
         public static int executeUpdate(String nonSelectQuery)
             throws ClassNotFoundException, SQLException
              return(executeUpdate(getConnection(), nonSelectQuery));
         public static int executeUpdate(Connection conn, String nonSelectQuery)
             throws ClassNotFoundException, SQLException
              return(conn.createStatement().executeUpdate(nonSelectQuery));
         }

    NOTE that you should always have your classes inside packages. Some versions of Tomcat won't use them correctly otherwise.

  • How TO use configurable Database connection with ADF BC

    I have developed a simple JSF/ ADF BC web application that connects to a database and read/display data from the db tables. I have successfully deployed the application to Tomcat 5.5.17. However, now i need to change the database the application is connecting to. My question is How can I change the Database connection without having to change the application modules or rebuild the war file ??? In other words, is there a specific file (xml) where the database connection can be changed?

    If you set up the application with a data source (I am not sure if this is possible using another app server, I use OC4J), then you would just change it there. However if you created a database connection in the JDEV and pointed your data model to that, then you will have to change and rebuild.
    You might be able to edit the xml file that contains the setttings, I am not sure my CM guys dont allow this, all of our changes have to go through our code repository.

  • How to store jpeg images in SQL server using NI database Connectivity Toolset. Can anyone please help me in this regard.

    Please tell how to store jpeg images in SQL Server using NI Database Connectivity Toolset.

    http://www.w3schools.com/sql/sql_datatypes.asp
    You setup a field as BLOB and store the binary of the picture there. Depending on the database it can be called differently as you can see in the link, in SQL server there's even a Image datatype.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • How to host one application using different database connection on OAS?

    Hi,
    Jdeveloper - 10.1.3.4
    Application - ADF/BC
    Oracle Application Server - 10.1.3
    Above our the specifications for our application,
    We have two database schemas different for development and production therfore we have different databse connections for the two,
    we have one application which is in production and enhacements on the same application are done by the development team.
    Since we have two different schemas for developement and prduction we use different database connections for the application on development and production.
    The problem is our Model and View Controller project are same, only the database connection file changes that's why we are able to host only on application at a time on our OAS. This is probably because the URL generated by OAS for developemnt and prodyction application is same.
    Is there a way we can host two instances of the same application with two different database connections on the a single OAS.
    Thanks & Regards,
    Raksha

    Use different deployment profiles each with a different context root for your application?
    See: http://one-size-doesnt-fit-all.blogspot.com/2009/02/configuring-separate-dev-test-prod-urls.html

  • How to configuare RAC database in single system?

    Hi,
    I have installed Linux in my system. Can i create RAC database in that system? if it is possible , how to create RAC database?..
    Thanks,

    RAC on a single machine? Can't think of any other method than virtual machines.
    Tim Hall has a good article for RAC using virtual machines on Linux here...
    http://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnCentos4UsingVMware.php

  • Why and how we use Logical Database?

    Can anybody explain with example why and how we use logical database?
    Regards,
    Rajan

    Hello,
    SAP comes loaded with all the extras. Among the extras that are most helpful to IT managers are all the access routines needed to pull any business object that managers can think of out of SAP databases. However, SAP has not thought of everything where your particular applications are concerned. SAP organizes its standard database tables to service business units based on conventional business applications. Itu2019s likely your business requires something new, perhaps even something exotic. In that case, you will need to create a new database, using information from different places. Basically, you need a logical database. You need to create a virtual business data object repository consisting of a new kind of record or table that suits your purposes. In addition, the repository should be composed of information that is actually stored in a number of different locations, none of them necessarily logically associated with one another. Letu2019s take a closer look at creating logical databases.
    A case for a logical database
    Suppose my company manufactures widgets of the most obscure variety, and they are components of other widgets. I sell my widgets as raw material for the more sophisticated widgets built by others, but in some cases I actually partner with other manufacturers in creating yet another class of widget. Now, in my world, I consequently have customers who are also partners. I sell to them and I partner with them in manufacturing and distribution. Also, I need an application that uses both of these dual-use relationships.
    Essentially, I have a customer database and a partner database. Neither contains records that are structured to contain the identifying particulars of the other. Thus, I need a hybrid database that gives me tables detailing these hybrid relationships. What can I do? I can go the long way around and write a new database, pulling information from both and creating new objects with a customized program that I write by hand. However, this process is cumbersome and contains maintenance issues. On the other hand, I can use SAPu2019s logical database facility, create my logical database in a couple of minutes, and have no maintenance issues at all.
    Logical database structures
    There are three defining entities in an SAP logical database. You must be clear on all three in order to create and use one.
    u2022     Table structure: Your logical database includes data from specified tables in SAP. There is a hierarchy among these tables defined by their foreign keys (all known to SAP), and you are going to define a customized relationship between select tables. This structure is unique and must be defined and saved.
    u2022     Data selection: You may not want or need every item in the referenced tables that contributes to your customized database. There is a selection screen that permits you to pick and choose.
    u2022     Database access programming: Once youu2019ve defined your logical database, SAP will generate the access subroutines needed to pull the data in the way you want it pulled.
    Creating your own logical database
    ABAP/4 (Advanced Business Application Programming language, version 4) is the language created by SAP for implementation and customization of its R/3 system. ABAP/4 comes loaded with many predefined logical databases that can construct and table just about any conventional business objects you might need in any canned SAP application. However, you can also create your own logical databases to construct any custom objects you care to define, as your application requires in ABAP/4. Hereu2019s a step-by-step guide:
    1.     Call up transaction SLDB (or transaction SE36). The path you want is Tools | ABAP Workbench | Development | Programming Environment | Logical Databases. This screen is called Logical Database Builder.
    2.     Enter an appropriate name in the logical database name field. You have three options on this screen: Create, Display, and Change. Choose Create.
    3.     Youu2019ll be prompted for a short text description of your new logical database. Enter one. Youu2019ll then be prompted to specify a development class.
    4.     Now comes the fun part! You must specify a root node, or a parent table, as the basis of your logical database structure. You can now place subsequent tables under the root table as needed to assemble the data object you want. You can access this tree from this point forward, to add additional tables, by selecting that root node and following the path Edit | Node | Create. Once youu2019ve saved the structure you define in this step, the system will generate the programming necessary to access your logical database. The best part is you donu2019t have to write a single line of code.
    Regards
    Arindam

  • How to organize RAC database files on ASM

    How to Organize RAC database files on ASM.
    Say,
    DISK Group = DATA
    DISK Group= FLASH
    Instance = prod1, prod2
    '+DATA/PROD/datafiles/'
    or
    Need to Organize sepratly for each instance specific db files.
    as
    '+DATA/PROD1/datafiles'
    '+DATA?PROD2/datafiles'
    Thanks in Advance,
    Regards
    Satish

    It would be just PROD - since that's the database name...and BTW, when you use DBCA to create a database using ASM, it organizes data files under PROD and it doesn't use instance names.
    HTH
    Thanks
    Chandra

  • How to use Logical database in function module?

    I will create a function module in HR.
    but how to use Logical database  in function module ?  Logical database PNP always show screen.in function (RFC) code , it is a matter.

    You cannot attach the LDB to the main program of the function group.
    - So you may [SUBMIT|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=submit&adv=false&sortby=cm_rnd_rankvalue] a report which use the LDB and get back the data (export/import), by default in the syntax of SUBMIT the selection-screen will not be displayed
    - Use [LDB_PROCESS|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=ldb_process&cat=sdn_all], fill a structured table for selection, and get data back in another table
    - Use [HR function modules to read Infotypes|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=hrfunctionmodulestoread+Infotypes&adv=false&sortby=cm_rnd_rankvalue].
    Regards

  • When using the Database Connectivity Toolset, reads and writes with long binary fields are incompatible.

    I am trying to write LabVIEW Variants to long binary fields in a .mdb file using the Database Connectivity Toolset. I get errors when trying to convert the field back to a variant after reading it back from the database.
    I next tried flattening the variant before writing it and ultimately wound up doing the following experiments:
    1) If I use DB Tools Insert Data to write an ordinary string and read it back using a DB Tools Select Data, the string is converted from ASCII to Unicode.
    2) If I use DB Tools Create Parameterized Query to do an INSERT INTO or an UPDATE operation, specifying that the data is BINARY, then read it back using a DB Tools Select Data,
    the length of the string is prepended to the string itself as a big-endian four-byte integer.
    I can't think of any way to do a parameterized read, although the mechanism exists to return data via parameters.
    Presuming that this same problem affects Variants when they are written to the database and read back, I could see why I get an error. At least with flattened strings I have the option of discarding the length bytes from the beginning of the string.
    Am I missing something here?

    David,
    You've missed the point. When a data item is flattened to a string, the first four bytes of the string are expected to be the total length of the string in big-endian binary format. What is happening here is that preceding this four-byte length code is another copy of the same four bytes. If an ordinary string, "abcdefg" is used in place of the flattened data item, it will come back as <00><00><00><07>abcdefg. Here I've used to represent a byte in hexadecimal notation. This problem has nothing to do with flattening and unflattening data items. It has only to do with the data channel consisting of writing to and reading from the database.
    I am attaching three files that you can use to demonstrate the problem. The VI file c
    ontains an explanation of the problem and instructions for installing and operating the demonstration.
    Ron Martin
    Attachments:
    TestLongBinaryFields.vi ‏132 KB
    Sample.UDL ‏1 KB
    Sample.mdb ‏120 KB

  • How to use query-database() function in transformation?

    Hi All,
    How to use query-database() function in transformation?
    It is giving four fields but if i write select query in sqlquery field it is saying select node is not found....
    plz help me out
    Regards
    Pavankumar
    Edited by: [email protected] on Jul 29, 2009 2:49 AM

    Hi,
    To answer your query:-
    http://abhishek-soablog.blogspot.com/2008/08/orclquery-database.html
    Cheers,
    Abhi...

  • Can i use single database connection in a hole java application?

    can i use single database connection in a hole java application?.I have so many forms to use database connection.

    Theoretically you can. Not only theoretically. I've seen lots of application which only uses one database connection (they were using, oracle or mysql)
    The first reply given here assumed that the answer to
    your question depends only on the design of your
    application. That is not true.Yes it's true. Nothing in the original questions says that you aren't allowed to open or close the single connection that you have. It's looks more like the OP is interested in sharing a connection (i.e having a singleton or a connection pool with only one connection)
    It does also depend on the behaviour of the database
    in the background.
    Most databases have a time out for connections that
    are idle Not a problem. Most implementations of connection pools and applications which keeps a connection open have a timer which calls e.g. select * from dual (if you are using oracle) when the connection has been idle for X minutes.
    (some, like db2 on z/OS, even cancel
    connections, that are not idle, if they are open a
    certain amount of time or have reached a given limit
    of cpu seconds.)You would also have that problem if you had a connection pool with several connections.
    In essence: If you have no control over the time
    your application runs (and therefore your connection
    is open) or over type or the configuration of the
    database you are accessing, you can't do it.See above.
    The closest thing to what you want would be using
    PooledConnections, iif those are supported for the
    database you want to access.Not true.
    Kaj

  • How to use temporary database?

    hi
    i am using timesten as cachedb for oracle database。i have some problem about how to use temporary database?
    1) what's the difference between temporary and non-temporary database,if i use awt cache group,then timesten will automatically replicate all change to oracle database , even if timesten crashed,i can set up another timesten quickly,no data loss?
    2)since all data is in oracle database,does timesten‘s transaction log and checkpoint file useful ? does timesten need backup ?

    Temporary databases have very limited usefullness; you can't use them with replication or caching for example. They are a very 'niche' use case; I'd recommend that you avoid them for mainstream use.
    TimesTen checkpoiint and transaction log files are always required (except for Temporary database which do not have checkpoint files but do have log files).
    Chris

Maybe you are looking for

  • Regarding REFRESHING of Data in Data warehouse using DAC Incremental approa

    My client is planning to move from Discoverer to OBIA but before that we need some answers. 1) My client needs the data to be refreshed every hour (incremental load using DAC) because they are using lot of real time data. We don't have much updated d

  • Consume a Web Service: No receiver could be determined

    Hello, I have a successful running Web Service on a JAVA stack. Now I want to consume this web service within the ABAP Stack. For this purpose I generated the appropriate proxy object from the WSDL. However, while running my ABAP test program I am re

  • Unable to replicate Business partner Address

    I am replicating Business Partner(BP) from ECC 6.0 to CRM 7.0. r3am1 shows that all objects have been loaded sucessfully....however when I enter data using bp transaction in ECC the address doesn't get replicated in CRM. the adress fields show up emp

  • How to disable F1 Key in Safari?

    How to disable F1 Key in Safari? (from my website)

  • Questions on handling two table controls on one screen.

    Can some people  please share some technology  tips on handling two table controls on one screen .  Thanks Moderator message - You'll find some cool tips if you search the forum or use Google first - post locked Edited by: Rob Burbank on Dec 7, 2009