connect oracle apex application to multiple databases - oracle-apex

is there any simple way to connect an oracle apex application to another database other than apex admin database (like using WebLogic data source).
I read this but there are a lot of problem with that.
Run these commands
``
java -jar ords.war setup --database AML2
Enter number for [1] Basic [2] TNS [3] Custom URL [1]:3
Enter the Custom JDBC URL:sys/Syspass//192.168.1.1:1521/AML2
java -jar ords.war map-url --type base-path --workspace-id NEW_DB /NEW_DB AML2
``
And get success message after executing each command but when create and execute new workspace and app in the specified path (NEW_DB) get this error
The connection pool named: aml2_pu does not exist
how to resolve this problem or is there any simple or clear way to define connection in a file or WebLogic data source.
thanks for your attention

An APEX installation is in the database, it doesn't "connect to the database", there also isn't something like an "admin database" - as such, it cannot connect to other databases. Your apex application and the data for that application live in the same database instance.
However, if you want to work with data from other databases in your application you can of course do so. The "old way" is using database links, however, nowadays connecting over rest is the way to go.
The documentation you are referencing is for having ORDS pointing to multiple databases. It is possible to have a single ORDS installation point to multiple APEX instances - in a previous job we used to have dev/uat/int instance on the same ORDS instance. Each of those databases have their own apex installation.

Related

Changing an AWS RDS MySQL instance to Postgres

What is the best way to go about this? I have a mobile app a project team developed whereby they setup the database as a MySQL instance. However, with this new project I have with my own developers, we believe Postgres would better suit or needs - but I want everything on one DB instance (data between the mobile app and the new project will be shared). What is the best way to accomplish this?
You will need to create a new RDS instance to switch the engine type to Postgres.
Whilst transitioning you will need to have both running, to migrate the DB across you will want to keep the data synchronised between both. Luckily AWS has the database migration service.
You should try to migrate your existing application to use this first, then remove the DMS setup and shutdown the MySQL database.

WSO2 EMM mysql database setup

I am using WSO2 EMM 1.1.0. The documents talk about using a MySQL instead of H2 https://docs.wso2.com/display/EMM110/Setting+up+MySQL. It talks about editing the master-datasource.xml file and updating the WSO2_CARBON_DB, WSO2_EMM_DB and WSO2AM_DB databases. It then gives steps on priming those db's. But the master-datasource.xml file also contains the WSO2_IDENTITY_DB, SOCIAL_CACHE, SOCIAL_CASSANDRA_DB and JAGH2. I expect all of those can be moved to MySQL as well but I don't see the database scripts to set them up. What is the proper procedures to set up a system that uses MySQL instead of H2? Not to mention that the emm database had the database name hard coded into the setup script "USE WSO2EMM_DB" thus nullifying the master-datasource.xml file.
Thanks,
Brian
It is mentioned in this documentation[1] under the topic 'How to migrate from H2 to MySQL'
[1] - https://docs.wso2.com/display/EMM110/Upgrading+from+a+Previous+Release
You need to configure WSO2EMM_DB, WSO2AM_DB and WSO2CARBON_DB and WSO2IDENTITY_DB if you are going ahead with a larger deployment. H2 is setup just for make the out of the box experience better. You can create those DBs, Configure master_datasources.xml properly for all above DBs. And then run the server with the flag -Dsetup. It will get the configurations done automatically.
If it fails, you can also go to SERVER_HOME/dbscripts folder and find all the scripts for all above databases. Run them separately and run the server in the usual way which mentioned in our documentation.

Copying Embedded H2 database data to another registry instance

I have a local Gov. registry 4.6.0 setup with standard out of box H2 embedded database where I added lots of artifact types and data to each custom artifact type.
I want to copy all data from my local H2 database to another Gov. registry 4.6.0 instance which is running on a server.
I do not want to repeat this on the registry instance running on the server and have to recreate the custom artifact types and have to re add the data that I have locally.
I could not find any documentation that allows me to do that.
Is there any way to do this?
Also how can I connect to and browse the embedded H2 database? Is there some script to run?
Thanks
There are actually two options,
H2 database can be found at /repository/database directory. You can simply copy this directory in to other server and replace it. To do that, 1st stop both server, then copy the directory and replace it with other server's directory. Then restart both.
Registry check-in check-out client. More detail are in docs
You can connect to H2 database and browser it. In this blog, It has been explained. You can go through it.
One way is to use the Check-in client that is shipped with WSO2 GReg. You can use the the Check-in client to take a dump of the registry (with -f option), and then check-in that dump to the new registry db.

WSO2 API Manager with Mysql Cluster backend - NDB sql scripts

I'm setting up the WSO2 API Manager with a MySQL Cluster backend. In the /dbscripts directory within the install directory for the API Manager, there are .sql scripts for setting up the database with either the mysql.sql script, which uses InnoDB, or the mysql_cluster.sql script which uses NDB. My problem is the apimgt database, which from this article: http://docs.wso2.org/display/Cluster/Clustering+API+Manager , says to use the script in /dbscripts/apimgt/mysql.sql, but there is no equivalent script for the MySQL Cluster setup. I attempted to just replace all instances of ENGINE InnoDB with ENGINE NDB in the script, but when trying to import that into MySQL I get: ERROR 1215 (HY000) at line 82: Cannot add foreign key constraint. Does anyone know of a MySQL Cluster script for this database?
Thanks.
API Manager does not provide mysql cluster script with the pack.
For converting it to use in mysql cluster,
Yes you need to change the engine to NDB.
Also you have to remove all the forign key constraints and indexes.

How to profile embed firebird database

Did I make wrong to use firebird database I don't know. It has lot's of good futures but I can't figure out why my query (stored procedure) didn't work.
Is there any profiler/monitoring tool for firebird?
Firebird database is working stand alone so it is embeded db. And It doesn't allow to connect with 2 users. If there is a profiler I wonder how it will connect while I'm executing my queries.
IBExpert and Database Worbench have stored procedure debugger
There is also many monitoring tools http://www.firebirdfaq.org/faq95/
I advice you to install server version if you want to have more than 2 users