Good Day. I have a situation which I am unsure of how to solve. I have searched numerous places and found nothing concrete.
The scenario:
I have 3 Oracle Apex 5 applications running on a single server using Oracle Express locally in order to run the app. I however had to go to Oracle 12c which is installed as a separate instance on the same server and it's listener is now listening on 1522 where XE is still listening on 1521.
I am needing to find a way to export the schema, tables, apps etc. into 12C from XE, then simply configure the apps to connect to the 12C instance and no longer on XE. I can then remove XE completely.
I know I am supposed to post what I have tried, but simply have no code, I have tried to do a export DDL but the script does not seem to carry the Schema data at all.
Question: How can I migrate everything on the XE instance to the 12C instance without breaking either instances.
Any direction would be appreciated.
Two steps: data(base) migration & (Apex) application migration.
The simplest way to move data is to perform export and import. Although you can use the original EXP and IMP utilities, consider using modern Data Pump Export and Import.
EXP and IMP are somewhat simpler; export (DMP) file is created on your disk
Data Pump requires you to create an Oracle directory (object) which points to a directory on the disk. As it is XE installed on your computer, no problem if it is, for example, C:\Temp
syntax is very similar in both cases, especially if there's nothing fancy in your data
The second step is application migration; you should first install Apex in the new Oracle 12c. Make sure it is up and running (create a workspace, assign a schema (you've just imported) to it, create a developer).
Then export the Apex application(s) - if there are only a few of them, a simple way is to do export from the application itself (you'll see the "Export/Import" button in the "main" application page within the App. Builder). Follow the wizard. The result will be a plain textual (.SQL) file.
In Apex on 12c, revert the process - do the Import by navigating to previously exported .SQL file, follow the wizard once again. Once the import is finished, you should be able to run the application.
Good luck!
Related
I would like to use Oracle database instead of MySQL in Joomla. Is this possible with Joomla, is there a workaround or a solution on how to implement Oracle database with Joomla? Any information will be greatly appreciated.
It is said that it can be done, but it is not a job for beginners and took those guys 3 working days to do it.
Here's why that combination doesn't work by default:
The database and table creation script does not work without modification.
The connection and the database class are written to connect to MySQL and not to Oracle (so they all use MySQL functions).
Some of the extensions use native MySQL functions directly, instead of connecting using the Joomla Database interface (class).
This is what they did to make it work:
We fix the SQL installation script to accommodate the Oracle database in case of a new installation. In case of an existing installation, we export all the database, as well as its data to a SQL file, and then we modify the SQL file (using find and replace) to make it work with an Oracle database.
We load the modified installation file or the modified exported SQL file into the Oracle database.
We then create a copy of the Joomla database class, and then we modify all the functions to work with Oracle instead of MySQL.
We ensure that the Oracle drivers are properly installed and loaded by the php.ini file.
We rename the original MySQL database (you will know in the next step why) to something like database_name_old.
We switch to the new database class and fully test the website to see if some extensions are not working. If an extension ceases to work then it is a sign that this extensions is calling the original MySQL database (which no longer exists because it was renamed) directly.
Hopefully, you aren't a beginner and those guidelines will help you do it. Otherwise, check how much it might cost by visiting the page.
I have downloaded the SQL Developer. Currently, I am using my school database but it is for temporary use. I want to use it after finishing my college. I do not know how can I make local connection in SQL Developer. Can you please help me in this.
Oracle SQL Developer is a tool you use to access an Oracle database.
So, if you want to use Oracle on your own computer, regardless there is (or is not) a connection to your school network, you'll have to install the database as well. I'd suggest Oracle 11g Express Edition. The installation process is simple; more or less, clicking NEXT a few times does the job. I'd, though, recommend you to follow the Installation Guide and pay attention to what the Installer asks (for example, write down passwords you choose).
Furthermore, in order to "copy" the database (actually, I believe you mean "schema" in this case) to your database, the right way to do that is to use Data Pump. You'd use Export in school to export the database, and Import on your computer to import it.
However, as Data Pump requires access to a directory (it is an Oracle object which points to a file system directory, usually on the database server; it is created by SYS and other users are granted read and/or write privileges on it). If you can't get access to it, you can use the original EXP and IMP utilities. EXP creates the DMP file locally; you'd put it onto a memory stick (or, if you're on the network, copy it directly to your PC) and import it.
If you're unsure of whether you can (or can not) do that, ask your teacher.
Once the schema is imported into your database, use SQL Developer to access it. Should be no problem to do that.
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.
i am newbie to oracle and i like to export database from remote database and import it on local machine. eOn both machines i have oracle 10.2.
I need to know how to export/import schema and data from oracle 10.2 using SQLDeveloper 3.0.0.4.
To export from remote database, i have used export Tool-> Database Export -> export wizard.
and at the end i have got only sql file with DDL and DML statements but somewhere in file it is written
"Cannot render Table DDL for object XXX.TABLE_NAME with DBMS_METADATA attempting internal generator error.
I have ignored previously mentioned message and tried to run those DDL and DML statements but all this ended up with errors.
Is it possible that all this tied with read-only database user? More over, i dont find any table under tables but also tables under other users in SqlDeveloper.
Thanks in advance
As a test, can you select one object in the tree, and navigate to the script panel? SQLDEV also uses DBMS_METADATA to generate those scripts.
Also, as a work-around, try using DataPump to export and import your data. It will be much more efficient for moving around larger schemas.
Your note about not seeing tables under indicates your schema doesn't actually own any tables. You may be working with synonyms that allow you to query objects as if they are in your account. You could be running into a privilege issue, but your error message doesn't indicate that. Error messages often come in bunches, and the very first one is usually the most important.
If you could try using the EXPORT feature say against a very simple schema like SCOTT as a test, this should indicate whether there is a problem with your account settings or with the software.
I'm not sure with SQL Developer 3.0 but with version 3.1 you can follow this:
SQL Developer 3.1 Data Pump Wizards (expdp, impdp)
I am working on a test server with an Oracle 11g installed. I was wondering if there is anyway I can replicate the database(environment + data) on my local Linux machine. I am using a CentOS 5.3 on Windows XP with SUN Virtual Box. On Windows I am using sqldeveloper client to connect to the 11g database.
There are a number of ways to move the data over:
Restore an RMAN backup on your test server
Export and import the data using exp/expdp/imp/impdp
Export and import using a transportable tablespace (Further Info)
Use database links to duplicate the data using SQL
You can use the Database Configuration Assistant to generate a template from your production database. This will give you all the parameters and tablespaces, among other things. You will need to tweak the configuration somewhat; for instance the file paths may be wrong, and some parameters may need downsizing. You can then feed that template into DBCA to clone the database on you Linux machine.
To get the schemas and data you should use Data Pump (rather than the older Import / Export utlities). This can be run off the command line or from PL/SQL.
Bear in mind that using production data in a development or test environment can cause you to run foul of data protection laws and other compliance issues. It depends on what your application does and what jurisdiction you operate under. But if your production system contains citizens' personal data you need to be very careful. There are products out there which will apply masking as part of a data import process (Oracle sells one) but they tend to be expensive. Rolling your own masking product can be tricky: if this applies to your situation be sure to get your compliance staff (legal team) involved early.
I would suggest you install Oracle XE which is free to use on your local if your development is not something that is related to core database features. You can then use the methods given above to pump data into Oracle XE and compile your code on it, though for development I don't think you would need data as much as that in production.