ADF app, single deployment - possible to access multiple databases?

Hi,
I am writing an ADF app that I'd like to connect to multiple different databases. In other words the app will be deployed once on a Weblogic server and will use a parameter to connect to the appropriate database for each user session. Ideally there will be no hard coded connection details embedded within the app before it is deployed, the different potential connections should be able to be administered on the app server.
I have been looking at Dynamic JDBC Credentials and understand it is used to connect to different database users - can it also be used to connect to different databases?
Alternately, is there a way to switch between different JDBC Datasources at runtime?
ADF/Jdeveloper 11.1.1.3, WLS 10.3.3.
Cheers,
Kevin.

Here is my opinion, because I work with both schemas. The
main advantage to use one datasource for all DBs in a SQL Server is
the simplicity of administration.
But the main disadvantage is security, because you are using
a single user to access all DB in a server, you don't have
isolation, and a user that knows your schema can access data of
other DBs that he sould not be authorized.
Another issue is is a user must access 2 differents DB with
different permissions (a DB only read and the other read/write),
you'll have to create another datasource, user, etc for it.
But the decision depends in the enviroment. If you are a
hosting company, I would use 1 datasource for user or DB. If the
servers and DBs are of the same company, I could use one datasource
for each SQL server.
Best regards

Similar Messages

  • Using Single Datasource to Access Multiple Databases

    Hi,
    We would like to know the pros and cons of accessing multiple
    databases through a single datasource, versus accessing each
    database through its own datasource. Our environment includes
    multiple web servers w/ the latest version of ColdFusion MX 7,
    clustered through a load balancer. Each web server has 800+ dsns
    pointing to different SQL databases on the same SQL server. We have
    noticed that the ColdFusion administrator is taking a long time to
    display or verify all datasources and sometimes it even times out.
    Another problem is that sometimes the neo-query file gets corrupted
    (for unknown reasons) which results in the deletion of one, or
    more, or all datasources on the web server.
    Because of the issues above we are researching the
    possibility of removing most of the datasources, and then accessing
    each database through a single bridge datasource. In that regard we
    plan to change our queries by inserting the sql db name and user in
    front of each table in the query such as:
    <cfquery name="query" datasource="single_dsn_name">
    select * from [#dbname#].dbo.tableName
    </cfquery>
    In the example above, obviously #dbname# would be a variable
    that will hold the name of the requested database. The code above
    would similarly apply to queries using, update, insert and join
    words.
    Are there any limitations or negatives from scalability,
    performance, and reliability perspective in implementing the above
    scenario versus having one datasource for each database.
    Also, if there is a better way of accomplishing this, we
    would love to hear about it.

    Here is my opinion, because I work with both schemas. The
    main advantage to use one datasource for all DBs in a SQL Server is
    the simplicity of administration.
    But the main disadvantage is security, because you are using
    a single user to access all DB in a server, you don't have
    isolation, and a user that knows your schema can access data of
    other DBs that he sould not be authorized.
    Another issue is is a user must access 2 differents DB with
    different permissions (a DB only read and the other read/write),
    you'll have to create another datasource, user, etc for it.
    But the decision depends in the enviroment. If you are a
    hosting company, I would use 1 datasource for user or DB. If the
    servers and DBs are of the same company, I could use one datasource
    for each SQL server.
    Best regards

  • 1 user license access multiple database

    Hi all...
    I have a question :
    In SAP B1 8.8, can 1 user license (for 1 physical user) access multiple databases?
    Multiple database is created for Head Office and Branches.
    Since Finance Accounting Manager is centralized at Head Office, so the Manager must have access to multiple databases.
    Can only 1 user license applied to this Finance Accounting Manager?
    Regards,

    Hi Ingrid,
    Finance/Logistic/CRM Limited will perform as professional user license in the multiple db accessing in one server except  the functionality authorization. You must make sure that all the users that use the Finance/Logistic/CRM Limited license have the same user code in the dbs
    JimM
    <ultra - said it once>

  • Accessing Multiple Databases

    I have a requirement in which I will need to use the same classes to
    access different databases. In other words, let's say I have a Person
    class. I'd like to use the enhanced Person class to pull people from a
    SQL Server database, and an Oracle database.
    The documentation mentions that you can access multiple databases by using
    different kodo.properties files with different names. However, it doesn't
    mention using different mappings, that I can see.
    What I'm thinking I could do is extend kodo.jdbc.meta.FileMappingFactory.
    Then I could have a .mapping file for each different database. My
    extension would just need to know to access *.sqlserver.mapping or
    *.oracle.mapping for instance.
    Is this plausible? If so, any hints on extending FileMappingFactory? How
    is that guy determining the name of the mapping file? Can I simply
    override a method?
    I'm hoping this will work, so that I don't have to create a
    SQLServerPerson and an OraclePerson. Any ideas appreciated.
    Thanks,
    Steve

    Ok, in answer to my own question, I'm providing the following which I hope
    Abe or Stephen will look at, and tell me this won't break everything.
    It seems that jdbc-class-ind is only read at the base level, and thus I
    couldn't add an "indicator" for each of my subclasses. So, as I wrote
    previously, I needed a way to read my jdbc-class-ind-value in my .mapping
    file for each class. Here is the code I came up with:
    <code>
    public class MyFileMappingFactory extends FileMappingFactory {
    JDBCConfiguration myConfiguration = null;
    static Logger log = Logger.getLogger(MyFileMappingFactory.class);
    public synchronized void readMapping(ClassMetaData type,
    MappingInfoRepository repos) {
    super.readMapping(type,repos);
    try {
    String[] persistentClasses =
    myConfiguration.getPersistentClassesList();
    MappingRepository mappingRepos =
    myConfiguration.getMappingRepository ();
    for (int i=0;i<persistentClasses.length;i++) {
    String className = persistentClasses;
    try {
    Class clazz = Class.forName(className);
    ClassMapping mapping = mappingRepos.getMapping(
    clazz, clazz.getClassLoader(), true);
    mapping.addExtension(
    "jdbc-class-ind-value",
    mapping.getMappingInfo().getAttribute("jdbc-class-ind-value"));
    catch (Exception e) {
    log.error("Could not set jdbc-class-ind-value for class '" +
    className + "'.");
    catch (Exception ex) {
    public void setConfiguration(Configuration conf)
    myConfiguration = (JDBCConfiguration) conf;
    super.setConfiguration(conf);
    </code>
    I did a lot of introspection using JBuilder as well as the Javadoc to
    figure out what I needed to call. Basically, I need to have
    kodo.PersistentClasses set in my config file, and I added an attribute to
    the .mapping jdbc-class-map element. Finally, my kodo.properties has to
    point to my custom MappingFactory.
    It all seems to work, but I wanted to verify with the experts I'm not
    breaking anything. I had hoped to figure out how to put an <extension> in
    the .mapping file so that it stood out even more as being "custom code",
    but could not figure out how to read such an element.
    Steven Kouri wrote:
    I think you've answered my question, but it doesn't help my problem. I
    actually did both: I loaded the static classes in my code as well as used
    the kodo.PersistentClasses property. Neither helped this situation.
    The reason it seems is when the fromMapping() gets called. It only got
    called after calling execute() on my query. Thus, the rest of my mappings
    hadn't been loaded yet. I put a breakpoint in fromMapping(), and here was
    my stack trace:
    execute()
    executeWithArray()
    executeWithMap()
    internalCompile()
    getMetaDatas()
    getMappings()
    getMapping()
    getMappingInternal()
    getMapping()
    getMappingInternal()
    intialize()
    fromMapping()
    So, I need to figure out a way to get my code to read all the mappings
    before I do an execute(). I think. :) I'll investigate further unless
    you can give me a pointer in the right direction.
    Thanks!
    Steve
    PS: 1pm? 1PM? I'm here before 7am! But then, I usually leave at 4pm. :)
    Abe White wrote:
    Is the .mapping file preparsed, or is it only accessed when a class is
    requested from the datastore?
    We only resolve mappings when the classes are actually used. Have you
    listed all your persistent classes in the kodo.PersistentClasses
    configuration property, as suggested by the documentation for
    MetadataValueIndicator?
    PS: It's 5:37pm on a Friday. I'm going home. You should too! :)
    When you decide to start work at 1pm, you tend to stick around a little
    later.

  • How to access multiple database present in single instance

    Hi Team,
    In oracle 11.2, can there be multiple databases in an instance???  In one of our environment, I could see multiple databases in an instance. Could you please help me in giving the data dictionary or query to access those databases?
    Actually, querying v$database, I could see only one database which is same as instance name. But in inventory, there are multiple database in an instance?
    I am still not exactly clear about this. Can someone help me with this?
    Thanks!
    Vidhya

    In Oracle one instance manages one (1) database. A database consists of multiple *schemas*.
    Other vendors erroneously call a schema 'database'.
    So, no, you didn't see multiple databases.
    There is also one datadictionary, consisting of a set of views.
    All views beginning with dba_  list the entire database, all schemas.
    All views beginning with all_ list the objects you have access to.
    All views beginning with user_ list your own objects.
    The view DICT show you the contents of the datadictionary.
    Oracle also has online documentation at http://docs.oracle.com
    From your question it is clear you should read the document called the 'Oracle Concepts Manual'.
    You can find all documentation for 11gR2 here Oracle Database Online Documentation 11g Release 2 (11.2)
    Too many people here don't make any effort to read it. This is probably the reason why you got no response.
    Sybrand Bakker
    Senior Oracle DBA

  • 403 error accessing ADF app /  500 Internal Server Error accessing page

    Jdeveloper 10.1.3.2
    AppServer 10.1.3
    I have developed and ADF-BC application. It runs great using the local embedded oc4j server. I setup a deployment profile and used the ear file to deploy to the application server. It deploys without error. When I try and test it by drilling down to the app in the enterprise manager, I get a 403 forbidden error. If I try and access the main jspx page directly (http:/server:port/myapp/faces/app/myapp.jspx), I get a 500 Internal Server Error with the following text:
    java.lang.NoSuchMethodError: oracle.adf.share.perf.StateTracker.isActive()Z     
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:137)     
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)     
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)     
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)     
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)     
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)     
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)     
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)     
    at java.lang.Thread.run(Thread.java:595)
    Thanks in advance for any help.
    Message was edited by:
    jnewhart

    I have updated the ADF library on the application server per this document.
    http://www.oracle.com/technology/products/jdev/howtos/10g/adf_runtime_update_howto.html
    I used the manual method since jdeveloper is not installed on the AS. If it were I would use the ADF installer. Unfortuantely, it did not seem to help.

  • ADFS login keeps coming up when accessing multiple sites

    We have 2 sites on SharePoint 2013 running on Windows 2012. We have installed ADFS and the login page is also working fine for email and role. When i login to the first site and then click on the link to move to second site, still we login screen
    opens.

    Unfortunately your post is off topic here, in the TechNet Site Feedback forum, because it is not Feedback about the TechNet Website or Subscription.  This is a standard response I’ve written up in advance to help many people (thousands, really.)
    who post their question in this forum in error, but please don’t ignore it.  The links I share below I’ve collected to help you get right where you need to go with your issue.
    For technical issues with Microsoft products that you would run into as an
    end user of those products, one great source of info and help is
    http://answers.microsoft.com, which has sections for Windows, Hotmail, Office, IE, and other products. Office related forums are also here:
    http://office.microsoft.com/en-us/support/contact-us-FX103894077.aspx
    For Technical issues with Microsoft products that you might have as an
    IT professional (like technical installation issues, or other IT issues), you should head to the TechNet Discussion forums at
    http://social.technet.microsoft.com/forums/en-us, and search for your product name.
    For issues with products you might have as a Developer (like how to talk to APIs, what version of software do what, or other developer issues), you should head to the MSDN discussion forums at
    http://social.msdn.microsoft.com/forums/en-us, and search for your product or issue.
    If you’re asking a question particularly about one of the Microsoft Dynamics products, a great place to start is here:
    http://community.dynamics.com/
    If you really think your issue is related to the subscription or the TechNet Website, and I screwed up, I apologize!  Please repost your question to the discussion forum and include much more detail about your problem, that could include screenshots
    of the issue (do not include subscription information or product keys in your screenshots!), and/or links to the problem you’re seeing. 
    If you really had no idea where to post this question but you still posted it here, you still shouldn’t have because we have a forum just for you!  It’s called the Where is the forum for…? forum and it’s here:
    http://social.msdn.microsoft.com/forums/en-us/whatforum/
    Moving to off topic. 
    Thanks, Mike
    MSDN and TechNet Subscriptions Support <br/> Read the Subscriptions <a href="http://blogs.msdn.com/msdnsubscriptions">Blog! </a>

  • Oracle dblink to sql server, accessing multiple database on same sql server under one dblink

    Hi, we have successfully managed to set up an Oracle dblink over to sql server and retrieve data.
    The sql server user were using via the dblink has access to more than one database on the same sql server
    But the question is how in oracle (if at all possible) do you prefix the sql statement to access this ?
    Eg:
    Sqlserver_prod has user sqlserver_user which appears to be set up as default database on sqlserver_db1
    But we have select access to sqlserver_db2
    all work fine as sqlserver_user
    select * from  table_fromdb1
    select * from  dbo.table_fromdb1
    select * from  sqlserver_db1.dbo.table_fromdb1
    as does
    select * from  sqlserver_db2.dbo.table_fromdb2
    over in Oracle
    Oracle_db has dblink sqlserver_prod.world connecting as sqlserver_user
    all working fine
    select * from "table_fromdb1"@sqlserver_prod
    select * from "dbo"."table_fromdb1"@sqlserver_prod
    but how (if at all possible) do I access from oracle
    sqlserver_db2.dbo.table_fromdb2
    without having to create a new sqlserver_db2_user referenced in a new dblink
    if oracle to oracle would be
    select * from remote_oracle_schema.table@remote_oracle_db

    Hi, ok cheers, I see, original gateway was connecting purely at host_name level
    HS_FDS_CONNECT_INFO=sqlserver_host
    Planning to amend this to be
    HS_FDS_CONNECT_INFO=sqlserver_host//sqlserver_db1
    With exisiting dblink
    And to create new gateway
    HS_FDS_CONNECT_INFO=sqlserver_host//sqlserver_db2
    With new exisitng dblink,will see how we get on
    Cheers again

  • Generic Reports accessing Multiple Database Servers

    <p>Hi,</p><p>I have a report which is accessing a table present within SQL Server. This is done by creating a system DSN which points to SQL Server at report design time through the database expert from the Crystal Reports Developer. The same table is also present in another database server ie ORACLE. The requirement is that I should be able to execute the report against ORACLE database at runtime. I have seen a lot of examples to do this using ODBC and OLEDB ie changing datasources at runtime but all of these have to specify the database username and password at runtime. </p><p>Is there any way for me to achieve this without passing the username and password at runtime? If so it would be great if i could get all possible approaches to achieve this. </p><p>Thanks in advance</p><p>Joseph Samuel</p><p>&#160;</p>

    I am doing the samething.
    I found that if the report is created under OS Auth mode of Oracle, then it is OK in integrated security mode in runtime, you don't need to set any logon information in runtime, but sure, please follow the OS Auth requirement of Oracle.
    But if the report is created using stand security mode and wish it to be run under integrated security mode in runtime, then a logon error would occurs, but if the crystal report view control set to enable the database logon promot, then we can still enter something in username textbox and check the "use integrated security" checkbox, then the report is still OK.
    I wish to have the database logon prompt disable and override the logon information in program in runtime and let the report shown without any problem, but up to now, i still have no any idea.  I will come back after I got any solution for this.

  • Is it possible to access a database on a different  server?

    Hi Folks
    Forgive me if this has been asked already. We are in the
    process of moving one of our sites to a new server. It will reside
    there alone. I have several Access databases that are shared
    between two different websites. Now these sites will reside on two
    different servers. Is there any way to access one Access database
    that resides on one server from another server? The good part is
    the second sever will be using the data for read-only outputs.
    Thanks in advance for any help you can priocdie.
    John

    MS Access is not really intended for networking in this
    manner, and I would imagine that you would have problems with
    locking contention at the very least with two CF servers vying for
    access. Also, another major problem with attempting to set up an
    Access DSN where the ColdFusion server is on a different machine
    from the Access database is file permission. Normally, ColdFusion
    is setup on its server under an administrator account, so if you
    attempt to connect to an Access database on another server over a
    mapped network drive, the admin account on your CF server usually
    does not have the appropriate privileges on the machine hosting the
    Access database. This usually requires you to install CF under a
    user account that has privileges on both machines. (There have been
    tech notes on this subject in the past.)
    Bottom line, not a good idea at all. I would seriously
    consider migrating to anything but Access for these and many other
    reasons, the least of which is that Access is usually not suitable
    for anything but a development or prototype environment.
    Phil

  • Designer 6i accessing multiple database

    Hi
    I have just installed Des6i and a repository in a particular Oracle 8i DataBase on Windows 2000. I would like to acess other Database (on Linux) with the same Designer and Repository. Is it possible?
    It seems that I have to install one repository per Database. Am I wrong somewhere?

    It's like client-server. Client is your Designer and repository is a server part.
    And granted users can use your repository and you can use several repositories(with diferent conectstring).
    null

  • Using Java within a stored proc to access multiple database connections

    Hi List;
    We have an environment where we have needs to provide cross database visibility between Oracle, Sql Server and PostgreSQL. So we need the capability for Oracle to query PostgreSQL and Sql Server tables, PostgreSQL must be able to query Oracle and Sql Server tables and Sql Server must be able to query Oracle and PostgreSQL tables.
    I'm thinking that we can implement stored procs which are either written in java or call a java process . The java code in turn should be able to connect to any DBMS desired via JDBC query the tables in question and return the result set to the calling database.
    Any thoughts on how feasable this is would be appreciated. Does this seem like a solid solution? Any initial concerns or red flags? what about performance via JDBC?
    Thanks in advance for your help.

    John,
    from your description I understand that you essentially program the VO yourself. So I suggest that you read chapter 35.9 of the 'Fusion Developer’s Guide for Oracle Application Development Framework' (I guess you know where to find it). Since you still call the actual SQL not all of the chapter apply, but you get the idea how it works.
    And yes you analyzed the behavior correct. executeQueryForCollection() is allways called bevore getQueryHitCount().
    Timo

  • Universe accessing multiple databases

    <p>Hi,</p><p>Here is the problem I am facing:</p><p>1. we have 20 databases. The structure of these databases is same, data is different. </p><p>2. we need to create an XI environment, where people can query on these databases using web intelligence.</p><p>How can I create 1 universe that can read from 20 different databases?</p><p>Thanks.</p>

    A stupid method:
    - Duplicate the universe 20 times and create 20 connections to 20 DB
    - one universe connect to one DB
    - In webi, u add query for the DB you want
    Â any better methods ?Â

  • Multiple Database access in a single transaction

    Hello All,
    I have read in a book which states that "according to J2ee Specification,a single transaction(an EJB method for example) may not be provided access to multiple JDBC resource providers.."
    Does it mean that i cannot access multiple databases from different vendors in a single EJB transaction??
    Any help is very much appreciated
    Thanks

    Hello Sebastien,
    Thanks for your response!!!
    Let me make it bit more clear.In deploymewnt descriptor,we define jndi name for any resource and do a lookup on that resource from the code.
    Let us consider that resource as JDBC data source for our discussion.usually you define any jdbc data source under a JDBC resource provider.
    So my question is,in a single transaction can you access multiple data sources defines under multiple JDBC resource providers.
    Ex:A datasource "x "defined under resource provider "A"[say DB2 jbdc provider] and a datasource "y" defined under respurce provider "B"[say mysql jdbc provider].
    Thanks

  • Multiple DataBase Connection in a Single Form

    hi all
    Is it Possible to have Multiple Database Connection With a Single Form
    Block a : Retriving data from a database Service a/Schema A.
    Block b : Retriving data from a Remote Database Service b / Schema B.
    If yes how to do this.
    regards
    jai
    email:[email protected]

    Sure you can access a database this way,
    but can you base a block on this database connect? No you can't.
    Frank

Maybe you are looking for