Migrating Stored Procedure from PostgreSQL to Oracle - oracle

I would like to migrate the Stored Procedure from PostgreSQL to Oracle, can someone suggest me a free tool for doing it ?

Well, SQLDeveloper is free.
But really, if you are moving code from postgresql to oracle, more than likely it's not a simple matter for exporting and importing; you will need to do some coding.

Related

Reading and Updating data of Oracle DB without License

I've got to update the data of an Oracle DB but I'm not the owner and ain't got any Oracle License.
The goal is to explain to my interlocutor how to create a dump from his Oracle DB, to find out how to restore this dump in a DB (a free version of Oracle or something else), update some data in some tables, and then make another dump to send it back to my interlocutor.
So the differents questions I have are:
1- Is it possible to create a dump (maybe in SQL format) without any specifics dependencies to Oracle ?
2- Is there a way to restore this dump in a free lightweight Oracle, or another kind of DB like Postgresql ?
3- Does Oracle, is able to handle any kind of dump et restore it in an Oracle DB or is there any constraints to respect ?
I am very new to Oracle and ain't got, on my personal computer, any possibility to try out the dump/restore by myself; that's why, any help will be appreciated !
1- Is it possible to create a dump (maybe in SQL format) without any specifics dependencies to Oracle ?
Oracle offers Data Pump utilities (export and import) for such purposes. You'd export table (or schema) - result is a ".dmp" file, readable by import utility. You'd then move that file to your own server (see #2 for the rest)
2- Is there a way to restore this dump in a free lightweight Oracle, or another kind of DB like Postgresql ?
On your own server (which could be a laptop; no problem), you'd install a free Oracle Express Edition (XE) database. Currently, the last version is 21c, but some others should still be available in Oracle Technology Network's Download section.
3- Does Oracle, is able to handle any kind of dump et restore it in an Oracle DB or is there any constraints to respect ?
XE database has its limits - from your point of view, the most important is that it can handle up to 12GB of user data. Therefore, if the .dmp file doesn't contain more data than that, you should be able to import it.
Another constraint is the compatibility. Not all exports can be imported into all databases. There's a matrix which shows which versions match; it is available on My Oracle Support site (but you have to have access to it, which you - as you said - don't. Though, generally speaking, "close" Oracle database versions can interchange .dmp files. It would be best if these two database versions match, of course.

Reverse Engineer an Oracle Database with Flyway

Is it possible to reverse engineer an oracle database using flyway?
I need to dump all the schema's from a database, including all objects, but don't need the data.
I found this, but it's from 4 years ago
Reverse engineering an existing database with flywaydb?
Could someone confirm if that's still the case and you can't reverse engineer an oracle database with flyway?
Thanks
Oracle SQL Developer can achieve this. You can find the feature in Tools/Database Export menu. Here is the docs page.

equivalent of pragma autonomous_transaction of Oracle in postgres

In oracle there is a built in way to make a transaction autonomous, but in Postgres there is none (still, as far as I know). What should one do in pl/pgsql code to make an equivalency of autonomous transaction functionality in Postgres? Any hack or by pass in coding guide would be helpful. Thanks.
Currently, the way to do this is to use a connection from the database to itself with the dblink contrib module.

Oracle DDL export

I am trying to recreate an oracle database in an HSQL database.
this is to enable better unit testing on the local developer systems.
What I need to know is is there anything tool/command I can use in the oracle server/client, that can provide me all the DDL commands for all the objects (tables, synonyms, views etc) in the oracle database.
I am planning to go through the created DDL commands and try to convert these commands into HSQL compatible commands.
Is it possible?
Any suggestions will be welcome.
system information:
Oracle DB: Oracle enterprise server 11g R2.
HSQL DB: hsql 2.2.9
You can use the DBMS_METADATA package along with the data dictionary to generate the DDL for your objects. For example, to generate the DDL for every table in a schema
declare
l_ddl clob;
begin
for t in (select * from user_tables)
loop
l_ddl := dbms_metadata.get_ddl( 'TABLE', t.table_name, USER );
<<do something with l_ddl>>
end loop;
end;
Are you sure that it makes sense to test with a completely different database than what you're really going to deploy to? Even if you translate the DDL to the closest analogue, it seems very likely that you'll get different results for some tests depending on the database you're connected to. Are you sure that you can't install Oracle (potentially Oracle XE if your concerns are primarily about licensing) on the developer's machines?
There are quite a few products that can help.
OpenSource:
http://www.liquibase.org/manual/formatted_sql_changelogs
Commercial with free trial:
http://www.devart.com/dbforge/oracle/schemacompare/new-export-oracle-schema.html
If you use a tool that is generally designed for use with Oracle databases only, you may get quite a lot of non-standard Oracle DDL that needs converting. A cross platform tool is more likely to reduce the work.
When HSQLDB is used in the ORA compatibility mode, it can translate some Oracle types in the DDL to a similar SQL Standard type. So the types may not pose a problem.
One open source inactive project do exact same thing.
http://schemamule.sourceforge.net/index.html

BEA : Migration of live workflow instances

I want to migrate database server from Oracle 9i to Oracle 11g (WebLogic version is 8.1 SP5).
After migration, WebLogic version will remain the same. Only database gets changed.
How can I achieve this?
Is taking DB dump before migration and importing dump after migration enough for this task?
Or do I need to do other things as well?
Thanks.
Yes, most likely a DB dump will do the trick. Oracle data types are backward compatible, so, you are covered.

Resources