Exporting CLOB data w/Oracle 8i
Is there a way to export CLOB data from a table to an external
file in a directory of our choice??? Our application
specification is asking us to build this capability but I am
unable to find any way to do this. Any assistance would be
useful. Thanks a million!!
null
OCI really seems like the right way to do this. You know you have to use something like C to interact with the port. And the only Oracle stuff you are doing is an insert. You could even write the insert in a stored proc and call it from OCI. Below is an example of that. You should really give OCI a shot at this. I'm certain you can learn enough of it for this project.
http://download-east.oracle.com/docs/cd/B10501_01/appdev.920/a96584/oci05bnd.htm#433702
Tom Best
Similar Messages
-
Is there any method to export the data from oracle 10g in any format !!!!!
is there any methods to export the data from oracle 10g in the format of excel or csc or txt or anyother. i already downloaded the sql developer tool but it only exports the data of upto one lakh rows ,but i have two tables of more than 3 lakh and 10 lakh rows respectively.for this i used 'where' command to break the file through sql developer but that didnt work
plz help me out if any thing possible
i need to again import this data into microsoft sql if there is any direct method plz let me know
its urgent
Message was edited by:
user628031
Message was edited by:
user628031Take a look at DUMP_CSV function by Tom Kyte.
-
CMP to insert CLOB Data in Oracle
I have a CMP which tries to insert CLOB data into Oracle Database using XMLType column. We have tried multiple options
1. Inserting String data into XMLType column - if the value is more than 4000 chars, it gives an error
2. Inserting CLOB Data into XMLType column - Using the OracleCLob option in the deployment descriptor results in a SQLExcepotion Inconsistent datatype expected number found CLOB.
Can anybody provide a solution to this problem?I have a CMP which tries to insert CLOB data into Oracle Database using XMLType column. We have tried multiple options
1. Inserting String data into XMLType column - if the value is more than 4000 chars, it gives an error
2. Inserting CLOB Data into XMLType column - Using the OracleCLob option in the deployment descriptor results in a SQLExcepotion Inconsistent datatype expected number found CLOB.
Can anybody provide a solution to this problem? -
Export CLOB data in flat file from oracle 8i
hi,
I am in a bad situation. The oracle system crashed and i am trying to retrieve from backup. The backup was hot online backup and for some reason didnt happen correctly. Only thing remaining is DBF and redo log. I somehow managed to recreated the control files. But i cannot login to oracle using sqlplus using any user. Only thing that works is server manager and connect as internal.
Now i need to retrieve data from tables having CLOB data to a flat file.
Any suggestions?
using oracle 8.1.The backup was hot online backup and for some reason didnt happen correctly.How did you verify this?
But i cannot login to oracle using sqlplus using any userDo you get any error? -
Export & Import data in Oracle (Urgent)
I just wonder whether Oracle 8i has the 'Export & Import data' feature in their DBA Administration tool.
Inside DBA Studio, I found a option to export/import data to text file, but we must connect to Oracle Management Server (OMS) first before we can use that feature. I found the same feature available in Oracle 7.3.3 in Oracle Data Manager.
How to make sure that I have a OMS installed on my server? (I purchase a Oracle 8i Standard Edition, does it include OMS?)
Can we export from a table (database A) to a table in database B? Or We can only do this thru. a dump file?With every installation of an Oracle DB you get the exp(ort) and imp(ort) utilities. You can use them to move data from one user to another.
Run them from the dos-prompt like:
exp parfile=db_out.par
imp parfile=db_in.par
with db_out.par=
file=db.dmp
log= db_out.log
userid=system/?????
owner=???
constraints=y
direct=n
buffer=0
feedback=100
and db_in.par=
file=db.dmp
log= db_in.log
userid=system/???
touser=??
fromuser=???
constraints=y
commit=y
feedback=100
null -
HY000 error retrieving CLOB-data from oracle database via ODBC
Hello,
I get error HY000 [Oracle][ODBC][ORA] ORA-00932: inconsistent datatype when I want to show a CLOB column in my crystal report. The type of the field in the report is memo - in the database it is CLOB.
How to retrieve CLOB-data from an Oracle 11GR2 database via ODBC in Crystal Report Version 12.3.0.601?
Thanks in advance for any help.
kind regards
Monika AnnaHello,
Who's ODBC driver are you using?
Try our DataDirect drivers - https://smpdl.sap-ag.de/~sapidp/012002523100008666562008E/cr_datadirect53_win32.zip
Thank you
Don -
Clob data type oracle to oracle issue
Hi Guys
i am unable to load clob data type and am getting the following error
" java.lang.NumberFormatException: For input "string: "4294967295"
i also have checked for clob data type in topology manager -- technology -- oracle -- data type
and it is available.
i have added the following statement in my parameter file
set ODI_ADDITIONAL_JAVA_OPTIONS=%ODI_ADDITIONAL_JAVA_OPTIONS% " -Doracledatabasemetadata.get_lob_precision=false";
but i don't see any statement like the one below after which i have to add the above statement.
set ODI_ADDITIONAL_JAVA_OPTIONS="-Djava.security.policy=server.policy";
please let me know how to make the clob data type work
Regards
janakiramHi Sutirtha
Yes i am able to view source data with clob data type by Right click onto your source datastore ---> View data
I have checked metalink
it says
1. Oracle recommends the setting of the "get_lob_precision" flag to FALSE to avoid this message when dealing with LOB family datatypes (CLOB, BLOB, NCLOB, BFILE...).
i have used the follwoing setting
set ODI_JAVA_OPTIONS="-Djava.security.policy=server.policy"
set ODI_ADDITIONAL_JAVA_OPTIONS=%ODI_ADDITIONAL_JAVA_OPTIONS% "-Doracledatabasemetadata.get_lob_precision=false"
2. checked the internal id of CLOB data type and it ends with 999
but still i have the same problem
Regards
janakiram -
Unable to retrieve CLOB data from oracle
hello I am trying to retreive a clob data from database. I am passing "country" to get "information". after submitting data it is showing SQLException caught: General error .
whatz wrong.? can anybody help?
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class ClobTest2 extends HttpServlet{
public void doGet( HttpServletRequest req, HttpServletResponse res )
throws ServletException, IOException
Connection conn = null;
Statement st = null;
ResultSet rs = null;
res.setContentType( "text/html" );
PrintWriter out = res.getWriter();
String coun$ = "";
coun$ = req.getParameter( "coun" );
try{
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver");
conn = DriverManager.getConnection( "jdbc:odbc:clobtester", "temp", "sol" );
st = conn.createStatement();
rs = st.executeQuery( "SELECT information FROM testclob WHERE country = '"+coun$+"' ");
while( rs.next() )
out.println(rs.getClob(1) );
catch( ClassNotFoundException e )
out.println( "Could not load database driver" + e.getMessage() );
catch( SQLException e )
out.println("SQLException caught: " + e.getMessage() );
e.printStackTrace();
catch( Exception e )
System.err.println( "Problem closing the database" );
try{
st.close();
conn.close();
}catch( Exception e )
System.err.println( "Problem closing the database" );
}certainly but this problem can go on several
category. and I am the needy one to get the solutionHowever I don't need to answer cross-posted questions. And I don't. -
Exporting test data from Oracle Test Manager
Hi,
I have created some test datas (req.s,tests etc) in my OTM.Suppose if iam reinstalling OATS,how can i get this test data in the new OTM.Can i export this test data to some .csv(windows) format,so that i can use by importing in to OTM.
Can anyone help me in this topic?
Alex,can you please?
Thanks,
Sandeep.Sandeep
All the data is stored on a database all you need to do during the upgrade is point to the old database instead of creating a new one.
if you are upgrading from a Microsoft based database to an Oracle database there is a data migration utility.
You don't need to do anything manually.
Once you have finished the upgrade you will need to login in the admin app http://localhsot:8088/admin with a user that has administrator rights, as this will take care of any DB upgraded that needs to be applied.
Regards
Alex -
Error selecting CLOB data from Oracle DB
I am using CRXI with an Oracle 10g database.
Recently, some columns were changed from Data Type LONG to CLOB. Now, I get 2 error messages when trying to select any of these columns: 'Failed to retrieve data from the database' and 'Database connector error: cannot obtain error message from server'.
I am using the Microsoft ODBC for Oracle. Is there some other ODBC which can select this data type?MS's ODBC driver for Oracle only supports Oracle 7, it's noted on MS's MSDN site.
Use Oracles ODBC Driver or Data Direct that ships with CR.
Don -
Loading BLOB / CLOB data from oracle source to oracle target
Hello Friends,
Source and Taret DB are Oracle 11g.
I am havnig CLOB and BLOB source columns and I am linking these links to CLOB/BLOB cloumns of Target .
but the image of source ( BLOB ) is not got loaded and when I tried to view the Image - It shows *'IMAGE COULD NOT BE DECODED FROM BINARY STREAM '.*
For BLOB Coulmn - the is what i am using for target - NVL(WRK_IMAGE.IMAGE_DATA, EMPTY_BLOB())
For CLOB Column - NVL(WRK_CALLOUT_V.CALLOUT.getClobVal(), EMPTY_CLOB()) -
For CLOB i don't have any issue - but for BLOB I could not able to see the blob image .
Appreciate if you can let me know where the issue is .
thanks/kumartry with some other image. if issue exists then open the raw form of the image and check the header.
-
Loading of CLOB data in Oracle 10g 10.2.0.1 on linux 32 bit
I am trying to load data (including clob field) in Table by using SQL loader, i got csv file and i am doing it by using control file
Following are the contents of control file
LOAD DATA
APPEND
INTO TABLE schema.c1
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
SEARCH INTEGER EXTERNAL,
clob_filename FILLER CHAR(2000),
text LOBFILE(clob_filename) TERMINATED BY EOF,
DATE_A TIMESTAMP "YYYY-MM-DD HH24:MI:SS.FF",
SURNAME CHAR,
SECONDNAME CHAR,
TITLE CHAR,
DOB TIMESTAMP "YYYY-MM-DD HH24:MI:SS.FF",
Field by the name of TEXT is having 4000 characters, all data is loaded except CLOB field (text) and when i am looking at log it is showing following 10 errors with field contents because thre are 10 records to load.
SQL*Loader-502: unable to open data file 'it consist of field contents'
SQL*Loader-553: file not found
SQL*Loader-509: System error: No such file or directory
Regards,The error seems clear to me. It is trying to find a non-existent file. Did you check what your file names are in the data file and if the related files exist?
-
Export Chinise data in XLS file using toad
Hii..
I have one table which have chinise data
All data is correct .
I am exporting chinese data from Oracle table,I am facing problem
I export data through toad in flat file
and import it in XLS file using UTF character set .
After importing all character gets converted to ???? marks.
I cant see the data properly in the XLS file .
my guess data base is not exporting file as unicode and hence charactger gets converted
How I export data which I show correct data in chinise?Hi
I am using 8.5 version of toad .I tried with sql developer also but no vail..
can I set like this
ALTER SESSION SET NLS_LANGUAGE='SIMPLIFIED CHINESE';
ALTER SESSION SET NLS_TERRITORY='CHINA';
ALTER SESSION SET NLS_CHARACTER_SET='AMERICAN_AMERICA.UTF8';
and my NLS_LANG in windows for 10g client is AMERICAN_AMERICA.WE8MSWIN1252
PLz suggest mi
My NLS_SESSION_PARAMETERS in database are as follows
PARAMETER VALUE
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE -
Hi,
I am using PHP4.4 and Oracle 10g for my research work. I defined 'protein_seq' field as CLOB in a table. I uploaded data into it using sqlloader.
Now, I want to display the value of that field based on user requirements. When i did like this, I am getting 'Object' as value instead of original value.
$s4 = OCIParse($conn, "select * from protein_uniprot where uniprot_id LIKE '$protein%'");
OCIExecute($s4, OCI_DEFAULT);
while (OCIFetch($s4)) {
$proteinseq = OCIResult($s4, "PROTEIN_SEQ");
echo $proteinseq;
Could you please help me how to fetch CLOB data from oracle table using PHP.
Thanks,
Rani.convert the lob column to varchar2. Use [dbms_lob |http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#BABEEAAH] package to convert
select dbms_lob.SUBSTR(column,2000,1) from table- - - - - - - - - - - - - - - - - - - - -
Kamran Agayev A. (10g OCP)
http://kamranagayev.wordpress.com -
Exporting Text data from PHP to Oracle CLOB data (Carriage return - issue)
This is my original text content in PHP - Data type - Longtext
SECTION - 1
This a test description.This a test description.
This a test description.This a test description.
This a test description. This a test description.I exported the above content from PHP as a SQL script file (insert into.. ) - export.sql [ insert into table_name (id, text_content) values (1, '') ]
while exporting data from PHP table into export file.. it replaced the "Carriage return" with "\r\n\r\n" in the insert statement for text_content column
When I run this INSERT statement in Oracle (for longtext, I have created a CLOB column in Oracle), the following text_content data is inserted into CLOB column in Oracle.
SECTION - 2
This a test description.This a test description.\r\n\r\nThis a test description.This a
test description.\r\n\r\nThis a test description.This a test description.Now I have created a item named P1_TEXT_CONTENT of type TEXTAREA and try to fetch the CLOB data into this page item.
BUT textarea displays the entire content including "\r\n\r\n" as mentioned in SECTION - 2
I want to display the content in textarea (item - P1_TEXT_CONTENT) without "\r\n\r\n" same as the original content with "Carriage return" as mentioned in SECTION - 1
What are the options we have?
Thanks,
DeepakDeepakJ wrote:
I want to display the content in textarea (item - P1_TEXT_CONTENT) without "\r\n\r\n" same as the original content with "Carriage return" as mentioned in SECTION - 1
What are the options we have?Run an update on the Oracle table following the inserts to replace the escaped CR/LFs with real ones:
update foo
set clob_column = replace(clob_column, '\r\n', chr(13) || chr(10));You might want to experiment to see which characters are actually necessary. As an OS X/Linux user I'd probably just use a single LF chr(10).
Maybe you are looking for
-
Using Time Machine and external USB drive for multiple Macs
I just bought a 1.5TB external portable drive. I have 4 macs in the household that might have about 400 - 500 GB of total HD capacity for the four of them. I am very confused on whether to create a separate partition for each mac, or let Time Machi
-
Can Time Capsule support an additional external hard drive?
A friend of mine is using Airport Extreme and has both his printer and external hard drive hooked through it accessing both wirelessly. The Apple site says this works great with Extreme but does not say you can do the same thing with Time Capsule. I
-
How do I transfer music and photos from my iPhone 4s to my iPad
HHow do I transfer music and photos from my iPhone 4s to my ipad
-
Ref Cursors in a stored Procedure
Can some help me with an answer to the below question. How many ref cursors can be declared in a stored procedure in oracle? Thanks
-
I've installed acrobat 9 from Xerox and it will not open? Can anyone help