How to use tables from database in apex 19.2 - oracle

I've installed Oracle APEX 19.2, on database 12.2. And I don't know how to use tables which exist in database. For instance, I have table 'test' in database and I can't use this table in app builder. I searched in google, but I couldn't find appropriate answer.
Thanks in advance

When you create a workspace, you have to "pair" database users (schemas) with your workspace. It is done in administrative part of Apex (you have to log in as ADMIN).
Once you do that, you'll be able to see tables owned by that user.

Related

Connecting with another Oracle user within the Oracle Apex platform

I have access to that user in SQL Developer. How can I access this same user in Apex, to make any query?
Talk to your Apex admin. They should map that schema (i.e. user with all its objects) to your workspace.
Alternatively, you could create a database link from your current user (the one you already use in Apex) to the one that contains data you're interested in. Then you could access data over that database link, perhaps create synonyms in your schema (to make it simpler). Though, I'd probably go for the 1st option I suggested.
But, if you don't use Apex yet, then - back to Apex admin again; they should create a workspace for you, let you use schema you're talking about, create an Apex developer for you and - that should do it.

Why can't I select a pre-created schema in Oracle 18c XE when creating a new workspace in APEX?

i have just started to work with oracle and apex, so I don't know my way around yet.
I have installed oracle 18c xe and connected it to the sql developer. Then I have installed apex 19.1 and successfully connected to it via localhost and the admin user.
After that i after that i created a new schema in the database and grant them diferent privileges. Now I wanted to create a new workspace and use this pre-created schema but it is not displayed.
I've tried it a few times, but it doesn't work.
What could be the reason?
So far, i've tried to determine the current Application Express engine schema with SELECT DISTINCT TABLE_OWNER FROM all_synonyms
WHERE SYNONYM_NAME = 'WWV_FLOW' and OWNER = 'PUBLIC' but here i don't get a value. I saw this on the oracle manual https://docs.oracle.com/database/apex-18.1/AEADM/managing-schemas.htm#AEADM232
The following steps on this page do not work either
If you've created the schema and created the workspace (it's not clear if you've done that second part), you probably need to add the schema to the workspace. You can do that with APEX_INSTANCE_ADMIN.ADD_SCHEMA. Or you can log into the INTERNAL workspace in the Apex designer and add it there.

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.

How can I access the table that holds GROUPS in Oracle Apex?

How to access table that holds the workspace groups information? I need a SQL method of accessing that table.
Look at APEX_WORKSPACE_GROUPS and APEX_WORKSPACE_GROUP_USERS. I believe these are only available from Apex 4.1 on though.
In older versions you need to (try to) access the tables wwv_flow_fnd_group_users and wwv_flow_fnd_user_groups. You would probably need to add grants on these tables to see them.

Change Oracle Schema at runtime when using SubSonic

In my project, I am using Oracle Database and SubSonic for DAL. I have a problem with SubSonic and Oracle Schema, that is:
When developing, I used a schema DEV in Oracle Database and generate DAL using SubSonic.
After that when release to customer, he used a new schema TEST in Oracle Database and changed the connection string in app.config to connect to Oracle. The error will appear, that is “Table or View does not exist”. I found this error and see that the schema of tables is still DEV.
I do not want re-generate DAL after change schema and when released to the customer. Please help me.
Firstly, your schema should not be DEV. DEV is a user or role.
Your schema name should be related to the data content (eg ACCOUNTS or SALES)
Secondly, consider whether you or the customer is going to decide the schema name. Say you have a product called FLINTSTONE. You may decide that the schema name should be FLINTSTONE. However your customer may want to run two instances of your product (eg one for local sales, the other for international) and use the same database. So they want FS_LOCAL and FS_INTER as the schema names. Is that option a feature of your product ?
Next, decide if your application should connect as the schema owner. There are good security reasons for NOT doing that. For example, the schema owner has privileges to drop tables, which is generally something the application doesn't do and thus, on the principle of least privilege, is something your application shouldn't have privileges to do.
Generally I would recommend some config parameter for the application for the schema name, and after connecting to the database, the app should do an "ALTER SESSION SET CURRENT_SCHEMA = 'whatever was it the config file'". The application database user would need the appropriate insert/update/delete/select/execute privileges on the objects in the application schema. If the application can't do that, you can have a LOGON trigger in the database.
Gary is correct in not using DEV as a schema on your own machine. In using Oracle we typically set up the schema as what the client is going to name their schema. This however does not fix your issue. What you need to do is create a global alias in Oracle that maps say DEV to CLIENTSCHEMA. You should still rename the schema on your machine but this will allow your schema to differ from your clients.

Resources