Different database connections at runtime

How can I change different database connections at runtime on the same Application Module ?
I use BC4J as business layer and uiXml as presentation layer.

Does anyone know how to do this?
I need the same, but i couldn't find any documentation about it.
Looking forward to hearing good news.....

Similar Messages

  • How to add two different database connections on Model

    Hi,
    In my application, I need to create View Objects on different databases. So I need to add two different database connections on the Model.
    But it seems like Model can be connected to only one database. I tried adding another project to add the second db connection. But after I created a read-only View Object in the second project, it didn't generate corresponding data control in the Data Controls panel.
    Could anyone help me on this?
    Thanks!

    Do you mean adding the second project folder in ViewController->Project Properties->Libraries and Classpath?Yes, either that or: ViewController -> Project Properties -> Dependencies
    And I didn't see the first Model project in the ViewController classpath. Otherwise it wouldn't work. The first model project IS in 'classpath'. Here's how:
    ViewController -> Project Properties -> Dependencies
    I tried this and recreated the View Object. Still didn't generate the datacontrol. No idea why you had to recreate the VO.
    Is your VO in an application module inside the SECOND project?
    After you are sure that everything is in the ViewController's classpath, just try restarting JDeveloper.
    This is very basic. has to work.

  • 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

  • Set password for database connection at runtime

    Hi there,
    is it possible to set the password and/or the user for the database connection at runtime.
    The use case is to read the values from a file and decrypt them, and the to establish the conenction. So that i don't habe to redeploy everything if there is a change.
    Thanks in advance.

    How exactly do i set these values for the datasource?
    Edited by: Alex on 15.02.2012 09:50
    €: JDeveloper 11.1.1.5.0
    The use case is, that there is a file with an encrypted password. This should be decrypted and then be used for the connection. So when this encrypted passowrd changes, i don't want to edit and deploay the app once again. Instead the new encrypted password should be decrypted via code an then be used.
    Edited by: Alex on 15.02.2012 10:00

  • Different database connections

    Hi,
    I have a problem in an application with two different database connections.
    I divided it into three projects one is the model project for a mysql database, one I the model project for an mssql database and one is a jsf project.
    But I only can use the first database project I add to the jsf project.
    If I use the other SessionFacade he uses the wrong database driver.
    My question is, is it possible to access two different databases out of one project?
    Thanks,
    John

    Does anyone know how to do this?
    I need the same, but i couldn't find any documentation about it.
    Looking forward to hearing good news.....

  • Different database connection or proxy user change

    Hi forms guys,
    in everyday life I am fulltime DBA, so please forgive my spare forms word pool.
    Our users open a forms application that displays a menu with forms applications the user has access to. Users can then click on the menu items and another form pops up. Now having reviewed the code, I can say that the opening of the new forms is done by calling the builtin OPEN_FORM. As parameter "SESSION_MODE" for this function, "SESSION" is supplied. If I understand correctly, this means that another session using THE SAME username/password/connectionstring is created (for the purpose of parallel transactions in parent and child form).
    At the moment each and every user (~400) has it's own database account which has roles (depending on the applications they are granted access to) assigned and also sometimes owns dblinks and synonyms. We want to get rid of them by storing the credentials in OID and just create ONE single application user for every application we host. This user shall contain all nescessary objects such as dblinks and private synonyms.
    The enduser then logs in using the proxy mechanism. For example if user XYZ (defined in OID) wants to start application ABC, then he/she connects like XYZ[ABC_APPUSER]/XYZPASSWD. This must occur when the form opens, directly after the OPEN_FORM call.
    Now my question: Is this possible somehow? Is there a way to have different database connections within a single forms window, if there are different forms? Or is it possible to make a switch to another proxy user within forms? e.g. JDBC has the ability to quickly switch to an other proxy user, without having to re-establish the whole session.
    All I have read so far tells me, that it is not possible. But I would really like to hear that acknowledged by experts. Also other, perhaps better ideas for our intention are welcome.
    Kindest regards
    Matschbirne

    Not really sure how to answer your question other than to say that from within your form's pl/sql you can connect and disconnect as often as you like programatically. However, you can only have one connection at a time (as far as I know). So if you connect as SCOTT and later want to do a login as FRED, you can do so, but SCOTT will no longer be connected.
    Forms does support using Oracle SSO, but for the most part cannot directly access OID. Also, the db login information needed by Forms (when using SSO) is stored in a RAD (Remote Access Descriptor) in OID. The RAD behavior is unique to Forms and Reports. For each SSO user there is a related RAD. At the moment, there is no provided way to have RAD groups (e.g. Admin, Sales, Guests, etc). So each user get their own RAD.
    If you are using Forms 11.1.x, Forms now supports db proxy users.
    More information about SSO and Proxy users with Forms can be found in the Forms Deployment Guide:
    http://docs.oracle.com/cd/E24269_01/doc.11120/e24477/sso.htm
    In the code, you can control the connection using the LOGON, LOGOUT, and LOGON_SCREEN built-ins. Refer to the Forms Builder online help for details on how to use these.

  • ADF Database Connection at Runtime

    Hi,
    I have developed a ADF based Web Application, deploy the code into different appServers [connecting to Different Databases] but unable to connect to the Required Database at Runtime.
    I have the following in my dataSources.xml & web.xml which looks like this.
    dataSources.xml
    <managed-data-source connection-pool-name="AIAQueryConnectionPool" jndi-name="jdbc/AIAQueryDataSource" name="AIAQueryDataSource"/>
    <connection-pool name="AIAQueryConnectionPool">
    <connection-factory factory-class="oracle.jdbc.pool.OracleDataSource" user="aia" password="aia" url="jdbc:oracle:thin:@//occf09.techmahindra.com:1521/ftsit"/>
    </connection-pool>
    web.xml
    <resource-ref>
    <description>AIA data source connection for FastTelco</description>
    <res-ref-name>jdbc/AIAQueryDataSource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    deployed the web Application "TestTransaction" and created ConnectionPool & DataSources for this Application "TestTransaction"
    when i run the Application i am unable to connect to the required Database/(s)
    Is that correct what i was doing ?
    BUT If i have the entry of that specific Database in ./model/common/bc4j.xcfg file i am able to Connect to the Database
    and if i remove the entry from ./model/common/bc4j.xcfg file, I am unable to Connect to the Database.
    Why is it so ??
    Can anybody give me the process / code to Connect to the Database in web based ADF Application at Runtime.
    or
    Pick up the Database Configuration Values from a Properties file and establish a Database Connection ??
    thanks in Advance...
    regards,
    anvv sharma

    Hi,
    I got it working today and not yes'day to the modifications suggested by arun...the only difference being i have stop / start the Application then it started with the working what i have done yes'day
    also thanks for shay....... it was useful link
    regards,
    anvv sharma

  • Dynamic database connections at Runtime dbAdapter

    Hi
    I need to connect to a database defined a runtime in a BPEL process using the dbadapter. All the configuration parameters for making the connection are provided at runtime (connectionURL, User, Password) and i need a way to configure them in the dbAdapter make the connection and execute some SQLStatements.
    Until now we were testing with some bpelx Properties changing dynamically the name of the jndi (jca.jndi) that works fine, but we cant define a datasource for every database. We also tried with another set of properties for setting the connection at runtime (jca.mcf.ConnectionString, jca.mcf.Password,jca.mcf.UserName) unsuccessfully.
    Do you know a way to define connections parameters at runtime in dbAdapter? Is that possible with SOA version 11.1.1.6 ?
    If this is not possible what alternative do you suggest for making dynamic connections to a database.?
    Regards
    Sergio

    You can try using the function query-database and formulate the 4th parameter which is JDBC connect string at runtime.
    oraext:query-database()
    Returns a node-set by executing the sql-query against the specified database. The second parameter rowset indicates if the rows should be enclosed in a element. The third parameter row indicates if each row should be enclosed in a element. The fourth parameter datasource is either a JDBC connect string (jdbc:oracle:thin:USER-NAME/PASSWORD@HOST:PORT:SID) or a JNDI name for the database. Only Oracle Thin Driver is supported if JDBC connect string is used. Usage: oraext:query-database(sqlquery as string, rowset as boolean, row as boolean, datasource as string). Example: oraext:query-database('select last_name from employee where id=1234',false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL'.
    This does not require a database adapter .

  • Choose Database Connection at runtime?

    I have a few databases with the same structure but different content. In fact it are databases from the same application, but from different customers.
    But the choice of the database connection is part of the VC model.
    What will be the easiest way to use the same model with different databases?

    Hi
    I think that you should create seperate systems for each DB and then in your VC model use guard conditions to allow access to the specific data base.
    Jarrod Williams

  • Changing database connection at runtime

    Hi All,
    I have multiple screens based from different database instances. How can I make a single menu screen which will allow log in for another database connection? I tried using the LOGIN_SCREEN built in but it does not change the connection once you are already connected to one database.

    If you want to change connections, you first have to logout. Besides the logon_screen builtin does not change the connection, but it only sets several application properties.
    In the Forms Help there is an example how to use the logon_screen. It basically comes to the next pl/sql code:
    declare
    MyUsername VARCHAR2(40);
    MyPassword VARCHAR2(40);
    MyConnect VARCHAR2(40);
    begin
    logon_screen;
    MyUsername := Get_Application_Property(USERNAME);
    MyPassword := Get_Application_Property(PASSWORD);
    MyConnect := Get_Application_Property(CONNECT_STRING);
    logout;
    if MyConnect is not null then
    logon(MyUsername,MyPassword&#0124; &#0124;'@'&#0124; &#0124;MyConnect);
    else
    logon(MyUsername,MyPassword);
    end if;
    end;
    null

  • Date dimension fragmentation from 2 different database connections

    Hi Everyone,
    In obiee 10g, is it possible to implement fragmentation on a date dimension from 2 different physical database connections (not schemas)?
    For example:
    Physical connection & dimension 1: physical1.obiee_rpd.w_mcal_day_d.date
    physical connection & dimension 2: physical2.obia_rpd.w_mcal_day_d.date
    the fact table will be: physical1.obiee_rpd.w_fact_f.fact
    The 2 physical dimension tables will be joined to the 1 fact table in the physical layer.
    I then create a BMM with 2 LTS : physical1.obiee_rpd.w_mcal_day_d and physical2.obia_rpd.w_mcal_day_d.
    I then create 1 logical column in that BMM which sources both physical1.obiee_rpd.w_mcal_day_d.date and physical2.obia_rpd.w_mcal_day_d.date.
    Then, i set up fragmentation to use physical1.obiee_rpd.w_mcal_day_d.date when physical1.obiee_rpd.w_mcal_day_d.date < '04/30/2012' and use physical2.obiee_rpd.w_mcal_day_d.date when physical1.obiee_rpd.w_mcal_day_d.date >= '05/01/2012'.
    The problem is that the query that answers generates always uses physical1.obieerpd.w_mcal_day_d.date , regardless of the date filter applied!_
    Any tips?
    Thanks!

    Hy,
    Can you try the following.
    Define:
    - one logical date dimension with two logical table sources (physical1.obiee_rpd.w_mcal_day_d.date and physical2.obia_rpd.w_mcal_day_d.date)
    - one logical fact table with two Logical Table Source (LTS). And in each LTS, define the same logical level in the content tab and don't forget to check the checkbox "This source should be combined with other sources at this level".
    Cheers
    Nico
    Edited by: gerardnico on Jun 25, 2012 4:23 PM Date and not datum (Dutch)

  • Changing Database connection at runtime in CR2008

    Hi,
    I have a VS2008 application which is using CR2008 to generate pdf reports for the user. Problem is I am not able to change the database connection to any server other than the one that was used to create the report template.
    My environment has CR2008 SP2. I have tried reports with no paramter as well as the ones with parameters both dont seem to work.
    I have already tried a couple of things:
    a) report document refresh after loading it
    b) setting the database connection as
    this._crReport.DataSourceConnections[0].SetConnection(dbServerName, dbName, dbUserId, dbPwd);
    c) setting the database connection as
    tbls = this._crReport.Database.Tables;
                    bool test = false;
                    foreach (Table tbl in tbls)
                        tblLogonInfo = tbl.LogOnInfo;
                        tblLogonInfo.ConnectionInfo = connInfo;
                        tbl.ApplyLogOnInfo(tblLogonInfo);
                        test = tbl.TestConnectivity(); ** note this alwys return a true for the changed database server
    I have read a couple of thread but none has worked for me...Is this a known issue with CR2008?
    Thanks
    Kajal

    Hi Kajal,
    I am assuming that you are not changing the schema of the report at any point of time. I would suggest you to try pointing to the other database through designer to make sure that you can hit the database and the schema is correct. You can also create a udl file to check the database connectivity.
    Then just for testing purpose you can try the following code:
    ReportDocument reportDoc = new ReportDocument();
    reportDoc.Load("path of the report");
    reportDoc.SetDatbaseLocation("uid","pwd","Servername","tablename");
    reportDoc.SetParameterValues("Parameter-Name","values");
    CrystalReportViewer.ReportSoure=reportDoc;
    Does that help?
    Thanks.

  • Allow users to change database connection at runtime

    Folks,
    CR 12.2.0.290
    BOE 12.1.0
    I develop CR on desktop and then save to the BOE repository.  Users need the ability to point the report to a different Oracle schema.  Tables and elements are the same, just the data is stored via streams so that each location has its own reporting schema.  So one (16 total) report needs to run against multiple schemas based on which origin the user is trying to report against; one at a time.  Other than having a set of reports for each site, how can I allow the users to select the schema to run against at runtime?
    Thanx
    Mike

    When you schedule a report with InfoView, there is a Database option where an ODBC connection, user and password can be specified.  Can this be used?  (I'm not familiar enough with Oracle to know for sure...  Also, this option doesn't show if the report uses Business Views.)
    HTH,
    Carl

  • Using predefined JDBC database connection in runtime for BC4J

    I've created an aplication using BC4J context, however I want to have several distinct users acessing this aplication, so I create the connection to the database using stantart JDBC 2.0, and now I want my application to use this connection instead of the one defined for BC4J.
    The database user owner of the objects must be locked.
    Is this possible?
    Many thanks.
    Nuno

    In Forms I used the following code to change the user at runtime. I created 3 char fields 'u','p' and 'c' for username, password and connect string respectively.
    declare
    uname varchar2(10);
    begin
    uname := get_application_property(username);
    -- To display your current username
    message(uname);
    pause;
    logout;
    logon(:u,:p&#0124; &#0124;'@'&#0124; &#0124;:c);
    end;
    Have a nice day,
    Abhijith Unnikannan,
    Oracle Support Services

  • Configuring Database connection at runtime

    Hi,
    I am new to JDBC and urgently needs ur help.
    What I want is to provide the URL (Connection String and DB info) in a config file and read that in the code. Also I should be able to change the DB location and connection string at runtime so that the next time the code executes, it takes the new connection string. I heard something about MBeans, can anyone help me in this.
    Thanks in advance
    Pankaj
    PS: I might use JBoss or Tomcat.

    Thanks for the reply..
    Yes, but how to do it using MBean? Is Mbean the only solution available or there are some better approaches?
    regards
    Pankaj

Maybe you are looking for

  • No Microsoft files listed in the settings "convert into PDF files"

    Hi, I wanted to convert different Microsoft Office files, but it doesn't work. There are no Microsoft files listed in the settings "convert into PDF files". I had the trial version of Adobe Acrobat Pro XI installed on a MAC in Windows that runs troug

  • How to check RMAN log

    Dear all , I am perform cold backup using RMAN .It execute successfully but i want know which are those view and table having last backup time ,path and other(Including cold and Hot Backup) . Thanks And Regards Shaikh Abdul Moyed

  • SCEP for Yosemite

    Hi, Can someone please tell how to obtain SCEP for OS X Yosemite. I can't seem to find it. Please be detailed in your reply. Thanks.

  • Mac book pro running hot

    My mac book pro is running very hot. My fans are going like crazy but it doesnt seem to be doing the job. Should i try to clean my fans or something?

  • On Apple TV. Can the USB port be used for a keyboard and mouse interface

    On Apple TV. Can the USB port be used for a keyboard and mouse interface