Create tables in Oracle the same as they are in Postgres - oracle

I have multiple Tables in PostgreSQL
extract_a, extract_b and so on now I want to create all of these tables in Oracle by using Pentaho.
I set the Data type Varchar2(4000) in all my tables fields. Tables created successfully but when I tried to insert the data it give men an error
"Identifier is too long"
How do I create these tables Oracle ?

Related

Ora2Pg - copy selected partition data for a specific table

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.

Oracle SQL Auto-updating Table From a Different Database

I have two tables from different database, db1.names and db2.names_rep. db1.names is constantly getting new data and I need it to reflect in db2.names_rep.
I've created a dblink connecting for db1 in db2 named dblink_db1.
CREATE DATABASE LINK dblink_db1
CONNECT TO user IDENTIFIED BY pass
USING '(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))
(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=SID)))';
and a trigger that calls the db1.names table
create or replace trigger "names_trigger"
after insert or update or delete on "names#dblink_db1"
for each row
begin
if inserting then
insert into "names_rep" (name_id, student_names)
values (:NEW.name_id, :NEW.student_names);
elsif updating then
update "names_rep"
set name_id=:NEW.name_id, student_names=:NEW.student_names
where name_id=:NEW.name_id;
elsif deleting then
delete from "names_rep"
where name_id=:OLD.name_id;
end if;
end;
The dblink is working as i can invoke this query successfully in db2
select * from names#dblink_db1
I'm receiving an error that says this
Error report: ORA-00942: table or view does not exist
00942. 00000 - "table or view does not exist"
*Cause:
*Action:
Lastly, I've read about Oracle Streams. Is that an alternative to Triggers? I'm hoping I don't have to specify each operation as to what is done in Trigger
You are trying to create a trigger in database db2 on a table in db1. I'm not sure that's possible.
I think the trigger needs to be created in db1, and to insert/update/delete rows over a link to db2.

Extraction of an Oracle table in Pentaho

When I try to extract a table from Oracle database to Pentaho, there's no result. I get the following message:

Is it possible to join a hive table with oracle table?

I have a problem in writing Query using HiveQL.
Is it possible to join a hive table with oracle table?
if yes how?
if no why?
To access data stored in your Hive tables, including joining on them, you will need Oracle Big Data connector.
From the documentation:
Using Oracle SQL Connector for HDFS, you can use Oracle Database to access and analyze data residing in HDFS files or a Hive table. You can also query and join data in HDFS or a Hive table with other database-resident data. If required, you can also load data into the database using SQL.
You first access Hive tables from Oracle Database via external tables . The The external table definition is generated automatically from the Hive table definition. Hive table data can be accessed by querying this external table. The data can be queried with Oracle SQL and joined with other tables in the database.
You can use the Hive table that uses data and can access this Hive table from Oracle Database.

Convert ntext to clob

I have to copy data from one table to another which one table is in Oracle and one is in MSSQL Server. I want to copy the data from MSSQL Server table to Oracle table. The problem is that the MSSQL Server table has one column which is of data type ntext and the destination column in Oracle table is clob.
When I use the query
insert into oracle.table select * from sqlserver.table#mssql; I get the following error:
SQL Error: ORA-00997: illegal use of LONG datatype
Can anyone advice on this please?
I tried it through a PL/SQL Procedure and it worked. I created a cursor, passed in the values to my variables declared in VARCHAR2 and then run an EXECUTE IMMEDIATE for the INSERT INTO....SELECT * FROM <TABLE_NAME>#MSSQL.

Resources