I have a Postgres 9.1 table plines with a bytea field shape.
Number of records is about 500000.
What is the best way to copy bytea data plines.shape from Postgres to a field shape of an Oracle 10g table olines?
Thank you in advance, ysa
I'd create a program in Java which would connect to PostgreSQL (using JDBC PostgreSQL driver) and Oracle (using Oracle Instant Client) simultaneously and then read a row from Postgres, put this row to Oracle table, repeat.
This would be much easier the other way around... ;-)
Related
I need to migrate the Oracle database to PostgreSQL.
tables in Oracle are partitioned. I need to migrate data from a partial list of partitions of specific tables.
Is this supported by Ora2Pg?
Thanks.
Is there a way to replicate data(like triggers or jobs) from oracle tables to postgres tables and vice versa(for different set of tables) without using external tools? Just one way replication for both the scenarios.
Just a hint:
You can think of create a DB link from Oracle to Postgres which is called heterogeneous connectivity which makes it possible to select data from Postgres with a select statement in Oracle.
Then use materialized views to schedule and store the results of those selects.
As you don't want to use any external tool otherwise the solution should have been much simpler
for 20 tables I need to replicate data from oracle to postgres. For 40 different tables, I need to replicate from postgres to oracle.
I could imagine the following setup:
For the Oracles tables that need to be accessible from Postgres, simply create foreign tables inside the Postgres server. They appear to be "local" tables in the Postgres server, but the FDW ("foreign data wrapper") will forward any request to the Oracle server. So no replication required. Whether or not this will be fast enough depends on how you access the tables. Some operations (WHERE clause, ORDER BY etc) can be pushed down to the Oracle server, some will be done by the Postgres server after all the rows have been fechted.
For the Postgres tables that need to be replicated to Oracle you could have a similar setup: create a foreign table that points to the target table in Oracle. Then create triggers on the Postgres table that will update the foreign table, thus sending the changes to Oracle.
This could all be managed on the Postgres side.
Am new to hiberante JPA. I am working on oracle to postgres migration and we are not using aws dms service for data migration. We would like to move ahead with Java for copying tables which have more than 1 million records. I have problem for below scenario.
Table A - Oracle
Table B - PostGres
Am extracting records from Oracle using ScrollableResults. Once i have the data from Oracle, i need to loop up a value in postgres database for data from Oracle before performing insert into postgres database.
I thought first #ColumnTransformer will help but it is not helping as i dont know how to reference data from oracle on ColumnTransformer expression.
So finally went ahead with writing normal insert query with values and subquery for lookup. Also set hibernate.jdbc.batch_size to 100.
I executed the program in this way and it took 5 mins for 10k records which i feel is slow.
is there any other solution for this problem to improve the performance.
Thanks for all your help
I found the solution. I solved it by storing postgres lookup table in list object then performing search in lookup table list object before performing insert. Now the speed is good.
Hstore is a schema less key value store inside of PostgreSQL that allows us to store data like hashes directly inside of a column
More infor here
http://schneems.com/post/19298469372/you-got-nosql-in-my-postgres-using-hstore-in-rails
What is the equivalent of this in Oacle 11g
Oracle offer a "Big Data" NoSQL system, but not as part of the relational DBMS
http://www.oracle.com/us/products/database/nosql/overview/index.html
We are planning to develop a simple image viewer using oracle and VB.How do we insert an image into an oracle database table?What is required to insert an image into the oracle table?Please provide the query and explanation.
Oracle Intermedia is Oracle's own solution to storing images in
the database.
See http://www.oracle.com/technetwork/testcontent/intermedia-rel-quickstart-083139.html
and http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14302/ch_intr.htm
You can also store images in
the database independent of Oracle Intermedia
using the BLOB column type, if you prefer to avoid Oracle database extensions.