Can OracleXE's APEX access another Oracle Database (10g) on the same Server, or is it Restricted to those Users/Tablespaces in the XE Database? - oracle

My work uses Oracle 10G and is planning on installing Apex. In the meantime, I have downloaded Oracle XE and have taught myself APEX on it; however, I can only access users/tablespaces that I have made in the XE database. What I would like to do is use the XE's Apex to access the users/tablespaces in the production databases of my work.
My colleague says that this should be possible because my workstation is connected to the server, and that there should be a way to configure access from my XE's Apex to the 10g's databases, such as by setting up an appropriate DAD.
I see nothing in the Apex user interface to allow this. I've read every word of the Apex documentation but nothing registered.
XE uses the embedded PL/SQL gateway, as opposed to 10/11G which uses either an Apex Listener or an HTTP Server with the mod_plsql plugin.
Thank you,
Matthew Moisen

I have done this before where we didn't have access to the actual database hosting the data to be worked with save for the standard port 1521 listener access. Apex at the time was new enough to the organization that the DBA's also had a voodoo taboo on using their database server as a webserver gateway as well. You can use your database instance with APEX installed as a "middle tier" or app server with the following steps:
Set up an account on your 10g database that is accessible remotely via dblink.
Set up dblinks to your 10g database table on your workstation with XE installed, use the account and connection information for the 10g database as set up in (1). Note, you may have to update a TNS names file or explicitly indicate your host/networking settings within the dblink itself.
For simple sanity and simplicity in coding your apex projects, set up synonyms for all your dblinked objects (i.e., table1 for table1#dblink) so you're not referencing the dblinks directly in your apex code. Making changes later will be easier if you adhere to this.
That's it. One proviso is that you need to know that LOBs will not work with the out-of-the-box functionality of APEX driven DML operations while using dblinks. This may have changed with the newest version. One workaround you may consider is trying to use a stored procedure which passes your LOB data as a input parameter which will do your DML operation for you.
Otherwise, this approach works nicely. The place where I implemented this model has several production level apps, a test and a development tier all using servers hosting APEX separately from the actual data sources. We used Oracle Standard Edition One (for the support), but Oracle XE should work as well since APEX is the platform in common between either Oracle version.

Related

Identify oracle Container Databases (CDB) without connecting

We have a custom inventory system, for tracking all of our database, including Oracle v12 and v19 based databases. But as our DBA team has work with Container Databases (CDB), we need to identify, which one is a standalone or container, but we don't have any option to connection to the, due to our security policy.
Is there any way to Identify oracle Container Databases (CDB), without connecting to them?
As after reviewing Oracle official documentation: https://docs.oracle.com/database/121/ADMIN/cdb_mon.htm#ADMIN14174.
It seems that it's not possible, as the documented clearly mentioning, that first, it's necessary to connect to the database, and only then to run the following command: SELECT CDB FROM V$DATABASE;
And if the CDB column returns YES, the current database is a CDB. and NO, if the current database is a non-CDB.

ORACLE Application Express - how to connect to your tables in production

I've been trying for days but cannot find the answer to this. I am using Oracle Application Express (APEX), someone else setup the initial connection to a "Apex" database in oracle, but I am trying to connect to our production database in oracle. I am making web forms and the web forms are connected to the "Apex" database that was setup already, but I need to connect to our production database so we can create reports from the data entered through the web forms. I need the tables to show up in the create page option from the production database, currently its coming from the apex database, please help.
Create Page View with Tables (from apex)
Thank You so much in Advance!
What is the "production database"? Is it really a different database (than the one you're currently connected to), or is it a user in the same database?
if former:
you could create a database link between those two databases and create synonyms for production users' tables in one of schemas your workspace is assigned to.
another option is to install Apex onto the production database, so that you could use current installation as "development" and then deploy the application into the "production-based" Apex
if latter, you might do the same (i.e. create synonyms, just without the database link), or simply assign the production schema to your workspace
You may be interested to read Mike's response to a question with a similar misunderstanding regarding architecture.
https://community.oracle.com/thread/4135843
Once you have your head wrapped around this, you can consider the parsing schema to your application. This schema defines the table access your application has, in the normal way Oracle handles table privileges.
Then it's up to you to define who has access to what pages, using APEX Authorisation Schemes.

Oracle APEX 5.1 connect to remote db using JDBC and query data

I have only used db links to get access to remote db so far. Now I have to find a way to use JDBC to connect to remote db and get data. Can someone guide me what all things would I need to ask the remote db admin in order to setup a jdbc connection, and once I have the connection, how do I query the database using java stored procedure, just like I am querying it over remote db right now with db link?
You've described a fairly complicated problem, but haven't given any information about your database or operating system. Are you connecting to a SQL Server database? MySQL? Are you running on Linux? Windows?
First, you'll need a driver. That's going to depend on the database, operating system and versions thereof that you're using. For example, here is the Microsoft ODBC Driver for SQL Server (Oops, looks like it's currently unavailable.)
Second, you need to set up Oracle Heterogenous Services. That's fairly complicated and not something I can answer here. You might start with the Database Gateway for ODBC User's Guide.
Oracle does have gateways for various other databases, but they're licensed additionally from the database itself.

Oracle database, moving changes between databases

We have application where all logic is implemented in oracle database using pl/sql.
We have different oracle databases for development and production.
When developer make changes in development database after testing we move changes from development database to production database using schema compare tool of toad. Problem here is that developer must have password of production database. We want only admin to know this password.
Can somebody advice me better way of moving changes between databases without need of having production database password, what is best practice for this ?
I posted this question on oracle OTN forums and got some advices there. Maybe it will be interesting for somebody.
Her is a link
I do not recommend to use comparison tools for generating of database migration scripts.
Development and production databases (and also test databases) must be identical except for current changes made by developers in development databases. Generally speaking this assertion is not correct, because there are many kinds of differencies between development and production databases, e.g. partitioned objects, additional objects for audit (triggers, tables), replication-based objects (snapshots), different tablespaces etc.
Every developer must know, what changes were made by him and applied to development database.
If developer was able to change schema and data in developer database, then he/she must be able to create programs for these DDL and DML changes.
To delegate the same developer an ability to run these migration programs on production database is a bad idea. But if you don't have a better way of database migration, then you can use one of following:
1. Configure Oracle authentication by OS. OS authentication allows Oracle to pass
control of user authentication to the operating system.
2. TOAD can save passwords without disclose them. DBA will insert required password
to local TOAD installation at developer PC (if developers use PC).

Connecting to different database versions

I maintain a set of applications that use Pro*C to connect to Oracle 10g databases. These applications are generally involved with moving data from one database to another. In each case a connection is made to the source database and a separate connection is made to the target database. For reasons that are out of my control the target databases are to be upgraded to 11g whilst the source databases are not. I have searched the internet unsuccessfully, well I have posed the problem as many different ways as I can think of in google, in order to determine whether connecting to different versions of the database is acceptable .The only, almost relevant, documentation I can find is this Can anyone point me to any other documentation that would allay my clients fears?
The official client/ server compatibility matrix for Oracle is My Oracle Support 207303.1 "Client/ Server/ Interoperability Support Between Different Oracle Versions". That is probably the documentation that your clients would want to see.
The quick version is that if your application were to use, say, the 10.2 Oracle client, you would be able to connect to databases from 9.2.0.4 to 11.2.0.x. If your application were to use the 9.2 Oracle client, you'd be able to connect to databases from 8.1.7.x to 11.2.0.x. If you used an earlier version of the Oracle client, you would not be able to connect to an 11.1 or an 11.2 database.

Resources