ORACLE import/export CLOB data - oracle

I am trying to import an excel file into an oracle table via sql developer. One of the oracle columns is of type CLOB, and during the verification step of the import wizard, i get the following message in the information column: "Data Types CLOB, not supported for import." The data fields i am attempting to import for the CLOB column is empty. Does anybody have any idea what might be wrong? Thanks.
If it is not possible, How can I import/export CLOB data in Oracle?

You just need to use a more recent copy of SQL Developer. We support importing into a CLOB field now from Excel.
And then when it's over, checking the data...

Related

How to export data from tables with BLOBs as SQL inserts

I need to export data from one schema and import it to another. But in the second schema there are tables with different names, different attribute names, etc, but these tables are suitable for data in first schema. So I export data as SQL inserts and manually rewrite names etc. in this inserts.
My problem is with tables which have columns with type BLOB. PL/SQL Developer throws error:
Table MySchema.ENT_NOTIFICATIONS contains one or more BLOB columns.
Cannot export in SQL format, use PL/SQL Developer format instead.
But, when I use PL/SQL Developer format (.pde) it is some kind of raw byte data and I can't change what I need.
Is there any solution to manage this?
Note: I use PL/SQL Developer 10.0.5.1710 and Oracle database 12c

Date datatype in SQL Server gets changed to nvarchar datatype in informatica

I am importing a SQL Server table into Informatica as a source. One of the column's datatype in the SQL Server table is DATE.
When I import it, its showing up as nvarchar in Informatica.
Can someone help me understand this?
Can you please provide more details? Here's a quick test I've done:
I've created a sample table on SQL Server 11 with date, datetime and smalldatetime columns:
Imported it as Source to Informatica 9.5.1:
As you can see, all looks pretty good. Let me know what can I do to replicate the issue. Or simply alter the imported source to reflect the table structure.
I have a table (in SQL Server DB ) with columns defined as 'date'. When I imported, they converted to 'nvarchar (10)'. however, I have another column defined as 'datetime', which imported as datetime properly.
Looks there is an issue with 'date' defined column.
This can also be because of a particular driver you are using to import the table. I haven't tried it any time with SQL Server however have seen this issue with Oracle table imports.
To solve this problem I have to import the table through "DataDirect 7.1 SQL Server Wire Protocol"

Import an excel spreadsheet to oracle using Toad

I am trying to import an excel spreadsheet into Oracle using Toad. The gotcha is that the table I am importing into has a primary key field that I use a "sequence".nextval to populate in a normal stored procedure insert.
Using the Toad import wizard, I tried putting in 'table_seq.nextval' as an expression but when I execute the wizard at the end I get the error: Could not convert variant of type (UnicodeString) into type (Double).
So is it possible to import Excel data using sequence.nextval with the Toad import wizard or is there a better way?
I also gave some thought to just letting Excel generate the key by starting the seed beyond what is currently in the table. But being new to Oracle, would this mess-up the sequence I have setup for the table? For example, if before the insert, the next available ID is say 500 and the inserts from Excel inserted rows from 500 to 5000, would the next execution of a stored procedure for that table's sequence try to use 500?
Thanks in advance!
Yes, the sequence will remain at 50, and you'll get primary key violated exception when using stored procedure.
That's because sequences are not linked to tables in any way. And cannot be linked. They are separated objects.
The best approach I see is to use a trigger on insert for each row which will set the id to nextval.
Code example:
CREATE OR REPLACE TRIGGER trg_table_name_set_id
BEFORE INSERT
ON table_name
FOR EACH ROW
BEGIN
SELECT table_seq.nextval INTO :new.id FROM DUAL; --id would be the id column in your table
--or, if you are on 11g, simply
--:new.id := table_seq.nextval;
END trg_table_name_set_id;

Loading XMLTYPE data with IMPDP

I am trying to take a schema from an existing database and place it in a new database.
I've created dependant tablespaces for the data and everything seems to work ok except any tables with XMLTYPE columns error and fail with the error message below. The XMLTYPE are unvalidated CLOBs
KUP-11007: conversion error loading table "SCHEMA"."TABLE_NAME"
ORA-01400: cannot insert NULL into (XML_COLUMN)
KUP-11009: data for row: XML_COLUMN : 0X''
Some investigation seemed to indicate that using TABLES=TABLE_NAME instead of SCHEMA=SCHEMA would help but I have had no such luck.
Note that there are no constraints on this column and that some data could indeed be null (though after the import I get 0 of my several million records)
The command I am using to initiate the datapump is:
impdp TABLES=SCHEMA.TABLE_NAME DIRECTORY=DATA_PUMP_DIR DUMPFILE=oracledpexport.dmp LOGFILE=LOGFILE.LOG TABLE_EXISTS_ACTION=REPLACE
We have been facing some problems during ORACLE import process.
The IMPDP process was not able to import tables containing XML data types.
The reason for this is due to a bug in ORACLE 11g R1 version.
The work around for this is to use EXP process to create a dump instead of EXPDP.
For a permanent fix, we have to explicitly save XML Type columns as CLOB
Also, Oracle has confirmed that this issue has been fixed in ORACLE 11gR2 version.

importing data "BLOB" type from one DB to another in oracle

i am facing problem, while importing data from one DB to another. The problem is with when i want to import a table which contains BLOB type data. Can any one please help me, how to import BLOB type data or how to move BLOB type data from one DB to another.
Please help me.
Do you want to simply move a table from one Oracle DB to another? Use Oracle Data Pump.
Copy data from one Oracle DB into another Oracle DB, perhaps into a different table structure? Use PL/SQL with DBMS_LOB package.
Also, have a look at the Large Objects Applilcation Developer's Guide.

Resources