Exporting a table with Long datatype col. name

Hello,
I need help exporting a table, One of the column is long datatype.
How can I do this without using Export Util?
Is it possible.
(If someone has a solution then PLEASE Email
me)
URGENT.
Thanks.
Pankaj Patel.

Just wanted to find out, if you already solved this problem. I have a similar issue with long column. I am trying to sql dump a table with long column that will be imported into another database(probably using sql*load), but the spooled file puts the data from the long column in separate lines 80 char long and not on a single line. I have set the long to 64000 and linesize to 32000. Wrap is on too.
null

Similar Messages

  • How to export a table with a mixed case name using EXP untility

    i'm trying to export a table which has a name with mixed upper and lower case. The command i'm trying is
    exp USER/password TABLES=("MyTableName") FILE=ExportCNCS1.dat
    and does not work.
    Error:
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    About to export specified tables via Conventional Path ...
    EXP-00011: USER.MYTABLENAME does not exist
    Export terminated successfully with warnings.
    I presume its saying the table doesnt exist because its looking for MYTABLENAME rather than MyTableName and doing this because its ignoring the double quotes. Any ideas?

    Or, let the export prompt you for the table name:
    C:\Temp>exp
    Export: Release 9.2.0.7.0 - Production on Mon Aug 14 11:33:28 2006
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Username: scott/tiger
    Connected to: Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.7.0 - Production
    Enter array fetch buffer size: 4096 >
    Export file: EXPDAT.DMP >
    (2)U(sers), or (3)T(ables): (2)U > T
    Export table data (yes/no): yes >
    Compress extents (yes/no): yes > no
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    About to export specified tables via Conventional Path ...
    Table(T) or Partition(T:P) to be exported: (RETURN to quit) > MyTableName
    EXP-00011: SCOTT.MYTABLENAME does not exist
    Table(T) or Partition(T:P) to be exported: (RETURN to quit) > "MyTableName"
    . . exporting table                    MyTableName         14 rows exported
    Table(T) or Partition(T:P) to be exported: (RETURN to quit) >
    Export terminated successfully with warnings.
    C:\Temp>

  • Problem while importing table with blob datatype

    hi i am having a database 9i on windows xp and dev database 9i on AIX 5.2
    while i am taking export of normal tables and trying to import i am successful.but when i am trying to import a table with blob datatype it is throwing "tablespace <tablespace_name> doesn't exist" error
    here how i followed.
    SQL*Plus: Release 9.2.0.1.0 - Production on Mon Oct 8 14:08:29 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Enter user-name: test@test
    Enter password: ****
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    SQL> create table x(photo blob);
    Table created.
    exporting:
    D:\>exp file=x.dmp log=x.log tables='TEST.X'
    Export: Release 9.2.0.1.0 - Production on Mon Oct 8 14:09:40 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Username: pavan@test
    Password:
    Connected to: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    About to export specified tables via Conventional Path ...
    Current user changed to TEST
    . . exporting table X 0 rows exported
    Export terminated successfully without warnings.
    importing:
    D:\>imp file=x.dmp log=ximp.log fromuser='TEST' touser='IBT' tables='X'
    Import: Release 9.2.0.1.0 - Production on Mon Oct 8 14:10:42 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Username: system@mch
    Password:
    Connected to: Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    With the Partitioning, Real Application Clusters, OLAP and Oracle Data Mining op
    tions
    JServer Release 9.2.0.6.0 - Production
    Export file created by EXPORT:V09.02.00 via conventional path
    Warning: the objects were exported by PAVAN, not by you
    import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    import server uses US7ASCII character set (possible charset conversion)
    . importing TEST's objects into IBT
    IMP-00017: following statement failed with ORACLE error 959:
    "CREATE TABLE "X" ("PHOTO" BLOB) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS "
    "255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "TESTTB"
    "S" LOGGING NOCOMPRESS LOB ("PHOTO") STORE AS (TABLESPACE "TESTTBS" ENABLE "
    "STORAGE IN ROW CHUNK 8192 PCTVERSION 10 NOCACHE STORAGE(INITIAL 65536 FREE"
    "LISTS 1 FREELIST GROUPS 1))"
    IMP-00003: ORACLE error 959 encountered
    ORA-00959: tablespace 'TESTTBS' does not exist
    Import terminated successfully with warnings.
    why it is happening for this table alone?plz help me
    thanks in advance

    Here is exerpt from {
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:378418239571}
    =============================================
    Hi Tom,
    I have a dump file containing blob datatypes, when i import the dump file in a schema it gives an
    error stating that the tablespace for Blob datatype does not exists. My question is how do i import
    the dump file in the default tablespace of the importing user.
    Followup March 2, 2004 - 7am US/Eastern:
    You'll have to precreate the table.
    do this:
    imp userid=u/p tables=that_table indexfile=that_table.sql
    edit that_table.sql, fix up the tablespace references to be whatever you want to be, run that sql.
    then imp with ignore=y
    for any MULTI-SEGMENT object (iot's with overflows, tables with lobs, partitioned tables, for
    example), you have to do this -- imp will not rewrite ALL of the tablespaces in that
    multi-tablespace create -- hence you either need to have the same tablespaces in place or precreate
    the object with the proper tablespaces.
    Only for single tablespace segments will imp rewrite the create to go into the default if the
    requested tablespace does not exist.
    ===================================================
    To summarize: precreate target table when importing multi-segment tables

  • How to get length of data on column with long datatype

    How to get length of data on column with long datatype without using pl/sql block

    ...another reason not to use LONG datatype for columns.
    Oracle advises to switch to LOB columns instead
    SQL> create table t
      2  (x long)
      3  /
    Table created.
    SQL> insert into t values (rpad ('x', 10000, 'x'))
      2  /
    1 row created.
    SQL> alter table t
      2  modify x clob
      3  /
    Table altered.
    SQL> desc t
    Name                                      Null?    Type
    X                                                  CLOB

  • How Can I Export A Table With Its Entries ( values )

    Hi guys,
    How can i export a table with the entries that the table is populated with ??!!
    Best Regards,
    Fateh

    To export a table and its data you can do it a number of ways.. Do you have access to SQL Developer? If not you can do it through the APEX SQL Workshop..
    Under SQL Workshop, Utilities, Data Unload, To text (or XML, whichever you are more comfortable with..).. Select your schema, click next button, select the table, click next, select the columns you want exported (select ALL ITEMS in the select List), click next, on optionally enclosed by I usually enter a " (Sometimes I have long strings in columns), click the include column names checkbox to get the column names at the top of the document, click unload data button..
    To get the ddl (code to build table) Sql Workshop, utilities, generate ddl, create script, select schema, select next, click table checkbox, select next, click the checkbox of table you want to get ddl for...
    Thank you,
    Tony Miller
    Webster, TX
    There are two kinds of pedestrians -- the quick and the dead.
    If this question is answered, please mark the thread as closed and assign points where earned..

  • How to select all the colomns_names from a table, with their datatypes ..

    hi :)
    i would like to know, how to select in SQL all the columns names from a table with their datatypes so that i get something like this :
    Table 1 : table_name
    the column ID has the Datatype NUMBER
    the column name has the Datatype Varchar2
    Table 2 : table_name
    the column check has the Datatype NUMBER
    the column air has the Datatype Varchar2
    and that has to be for all the tables that i own ! ..
    P. S : i m trying to do this with java, so it s would be enough if you just tell me how to select all the tables_names with all their colums_names and with all their datatypes ! ..
    thank you :)
    i ve heard it can be done with USER_TABLES .. but i have no idea how :( ..
    Edited by: user8865125 on 17.05.2011 12:22

    Hi,
    The data dictionary view USER_TAB_COLUMNS has one row for every column in every table in your schema. The columns TABLE_NAME, COLUMN_NAME and DATA_TYPE have all the information you need.
    Another data dictionary view, USER_TABLES, may be useful, too. It has one row pre table.

  • Export/import table with XMLTYPE data_type and fine_grained policy

    Hi friends!
    I'm trying to export a table with XMLTYPE and faine-grained policy.
    Source: HP-UX - Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    Target: Linux 2.6.18-238.el5 - Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    I do it thru exp/imp old utilities as mention in metalink ID 1318012.1.
    One of the things that surprised me after exp/imp is that the number of objects increased:
    Objects at Source:
    exp \"/ as sysdba\" owner=xml log=xml file=xml.dmp
    Type
    Number of Objects
    TYPE
    431
    TRIGGER
    6
    TABLE
    17
    PROCEDURE
    2
    LOB
    120
    INDEX
    17
    FUNCTION
    1
    On Target:
    imp \"/ as sysdba\" file=xml.dmp fromuser=xml touser=xml log=xml.log
    Type
    Number of Objects
    TYPE
    431
    TABLE
    32
    PROCEDURE
    2
    LOB
    429
    INDEX
    478
    FUNCTION
    1
    Why is this happening? Is it normal?
    Other problem that I found is triggers are not imported, why!?!?
    Thank you very much for your help!
    José

    Hi!
    The new squema was created empty. If I run the following query:
    select '10g', TABLE_NAME,COUNT(*)
    from  DBA_LOBS@DSN_HP
    where OWNER='XML'
    group by TABLE_NAME
    union
    select '11g', table_name,count(*)
    from  DBA_LOBS
    where OWNER='XML'
    group by TABLE_NAME
    order by 2,1
    As a result:
    Version
    Table_name
    Total
    10g
    ACTION_TABLE
    1
    11g
    ACTION_TABLE
    1
    10g
    Document1767_TAB
    14
    11g
    Document1767_TAB
    13
    10g
    Document1852_TAB
    14
    11g
    Document1852_TAB
    13
    10g
    Document1941_TAB
    16
    11g
    Document1941_TAB
    15
    10g
    Document2016_TAB
    14
    11g
    Document2016_TAB
    13
    10g
    Document2087_TAB
    13
    11g
    Document2087_TAB
    12
    10g
    IBT_XML_RECIBIDOS
    1
    11g
    IBT_XML_RECIBIDOS
    1
    10g
    LINEITEM_TABLE
    2
    11g
    LINEITEM_TABLE
    2
    10g
    PURCHASEORDER
    7
    11g
    PURCHASEORDER
    7
    10g
    PurchaseOrder1145_TAB
    9
    11g
    PurchaseOrder1145_TAB
    7
    10g
    RICARDO
    13
    10g
    RICARDO2
    1
    11g
    RICARDO2
    1
    10g
    RITNTFER
    1
    11g
    RITNTFER
    1
    10g
    RITNTFRE_08
    13
    11g
    SYS_NT3+LEU6vbfGLgQ18DLgrURw==
    69
    11g
    SYS_NT3+LEU6vffGLgQ18DLgrURw==
    76
    11g
    SYS_NT3+LEU6vjfGLgQ18DLgrURw==
    63
    11g
    SYS_NT3+LEU6vpfGLgQ18DLgrURw==
    1
    11g
    SYS_NT3+LEU6vqfGLgQ18DLgrURw==
    2
    11g
    SYS_NT3+LEU6vTfGLgQ18DLgrURw==
    65
    11g
    SYS_NT3+LEU6vXfGLgQ18DLgrURw==
    66
    10g
    TESTCLOB
    1
    11g
    TESTCLOB
    1
    There are many new tables created...I suppose because the differences between versions...
    Any ideas?
    Thanks a lot!
    José

  • Export - only tables with data

    Hai Everybody!
    I have a database in Oracle, which is having hundreds of tables. When i export the database, all the tables will be exported into the .dmp file.
    i want to export only the tables, which are having atleast one row to the .dmp file.
    Can anyone help me by providing the solution.
    Thanks
    JD

    JayaDev(JD) wrote:
    version 10gIn 11g, there is feature called "deferred segment creation". It means, if you create a new table and do not insert any data into it, Oracle will not create segment for that table, hence it will not be displayed in dba_segments.
    That is why, if you try export that table with exp utility, it will not be exported.

  • How to export a table with BLOBs

    Hi,
    when I have to export a table with its own data, I generally export it by using the export on UNIX.
    I've never tried to export a table with a BLOB. Is it possible in the same manner or what else?
    Thanks!

    Hi mark;
    Please see below which could be helpful for your issue:
    Export and Import of Table with LOB Columns (like CLOB and BLOB) has Slow Performance [ID 281461.1]
    Master Note for Data Pump [ID 1264715.1]
    Regard
    Helios

  • How to copy a table with LONG and CLOB datatype over a dblink?

    Hi All,
    I need to copy a table from an external database into a local one. Note that this table has both LONG and CLOB datatypes included.
    I have taken 2 approaches to do this:
    1. Use the CREATE TABLE AS....
    SQL> create table XXXX_TEST as select * from XXXX_INDV_DOCS@ext_db;
    create table XXXX_TEST as select * from XXXX_INDV_DOCS@ext_db
    ERROR at line 1:
    ORA-00997: illegal use of LONG datatype
    2. After reading some threads I tried to use the COPY command:
    SQL> COPY FROM xxxx/pass@ext_db TO xxxx/pass@target_db REPLACE XXXX_INDV_DOCS USING SELECT * FROM XXXX_INDV_DOCS;
    Array fetch/bind size is 15. (arraysize is 15)
    Will commit when done. (copycommit is 0)
    Maximum long size is 80. (long is 80)
    CPY-0012: Datatype cannot be copied
    If my understanding is correct the 1st statement fails because there is a LONG datatype in XXXX_INDV_DOCS table and 2nd one fails because there is a CLOB datatype.
    Is there a way to copy the entire table (all columns including both LONG and CLOB) over a dblink?
    Would greatelly appriciate any workaround or ideas!
    Regards,
    Pawel.

    Hi Nicolas,
    There is a reason I am not using export/import:
    - I would like to have a one-script solution for this problem (meaning execute one script on one machine)
    - I am not able to make an SSH connection from the target DB to the local one (although the otherway it works fine) which means I cannot copy the dump file from target server to local one.
    - with export/import I need to have an SSH connection on the target DB in order to issue the exp command...
    Therefore, I am looking for a solution (or a workaround) which will work over a DBLINK.
    Regards,
    Pawel.

  • Move tables (some with LONG datatypes) across tablespaces in Oracle 9i

    I have a 14GB tablespace which about 3,000 tables (and only tables) in. Only 2.6GB is used so I would like to resize the tablespace to about 3GB initially.
    I moved the tables with "alter table <owner>.<tablename> move tablespace <tablespace>" and this worked for most of the tables but failed on some with this kind of error:
    alter table IFSAPP.COMMAND_SYS_BUFFER_TAB move tablespace IFSAPP_DATA_TEMP
    ERROR at line 1:
    ORA-00997: illegal use of LONG datatypeI then moved the other tables back to the original a little frustrated.
    Further reading suggested exporting and importing the tables is the way to go.
    I prefer the alter table because Oracle manages the lock whilst it moves. If I export and import, the table could change in between, potentially ending with me importing an old copy, couldn't it? [It seems neigh on impossible to guarantee an available window to do much!]
    So I though I could you the alter table move for ALL tables and those that are left, use export/import, to minimise the risk.
    How should I proceed?
    1) Create TEMP_TABLESPACE as 3GB
    2) "alter table ... move tablespace ..." for all tables in ORIGINAL_TABLESPACE to TEMP_TABLESPACE
    3) For the remaining tables, individually:
    a) lock table (not sure how)
    b) export table: exp user/pass tables=tablename file=exp.dmp rows=yes
    c) drop table
    d) create table in TEMP_TABLESPACE*
    e) import table: imp user/pass tables=tablename
    * this means I need to know how to re-create the table. It also means views and indexes and packages are going to become invalid.
    4) drop tablespace ORIGINAL_TABLESPACE
    5) Create ORIGINAL_TABLESPACE as 3GB
    6) "alter table ... move tablespace ..." for all tables in TEMP_TABLESPACE to ORIGINAL_TABLESPACE
    7) For the remaining tables, individually:
    a) lock table (not sure how)
    b) export table: exp user/pass tables=tablename file=exp.dmp rows=yes
    c) drop table
    d) create table in ORIGINAL_TABLESPACE
    e) import table: imp user/pass tables=tablename
    This seems high risk and messy.
    Has anyone advice or tips to make it simpler?
    As it stands I am considering leaving alone, the risks worry me!
    Thanks

    Interesting idea.. so this would create a temporary table in the temporary tablespace.
    Rather than set the default tablespace, can I merely add the tablespace clause?
    COPY FROM user/password@database CREATE TmpTblName TABLESPACE TmpTablespace USING SELECT
    * FROM Table_name;
    Either way - can you confirm for each table, I would need to:
    COPY FROM user/password@database CREATE TmpTblName TABLESPACE temp_tablespace USING SELECT * FROM Table_name;
    At this point all indexes for these will be invalid.
    Drop tablespace ORIGINAL_TABLESPACE
    Create ORIGINAL_TABLESPACE as 3GB
    COPY FROM user/password@database CREATE TblName TABLESPACE original_tablespace USING SELECT * FROM TmpTable_name;
    rebuild any indexes which are unusable.
    recompile any invalid objects

  • ORA-06502: error when inserting into table via db link with long datatype

    Folks,
    I am getting the following error:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small.
    This occurs when an insert is done via a database link into a table that has a LONG data type for one of the columns, and the string contains some carriage returns and or line feeds.
    I have checked by removing the db link, and inserting into a local table with identical column data types, where there is no error.
    So this might be another db link bug?
    So I need to remove the carriage returns and/or line feeds
    in my pl/sql block in the page process. I have tried
    l_text := REPLACE(l_text, CHR(10), ' ');
    l_text := REPLACE(l_text, CHR(13), NULL);
    but still getting the ORA-06502. Would really appreciate some advice here, please.
    Cheers
    KIM

    Scott,
    Time to 'fess up':
    My fault sorry, the error was coming from another page process where I had allowed insufficient string length for one of the variables, and my error message did not identify the page process clearly.
    This leads me to make a request for future releases, could the system error messages state which page process caused the problem?
    One other thing I notice, and this might be a feature not a fault, the page processes are numbered: "Page Process:      3 of 5". However process 3 is not the 3rd one to be processed, and probably refers to the order in which they are created. Should the number reflect the process order?
    Cheers
    KIM

  • Moving a table with long data type column

    hi
    1.how to move a table with a long data type column in 8.1.7.3.0 ver database.
    alter table APPLSYS.FND_LOBS_DOCUMENT move lob(BLOB_CONTENT) store as (tablespace testing)
    ERROR at line 1:
    ORA-00997: illegal use of LONG datatype
    2. and a table with varray type column
    alter table APPLSYS.WF_ERROR move lob("USER_DATA"."PARAMETER_LIST") store as (tablespace testing)
    ERROR at line 1:
    ORA-22917: use VARRAY to define the storage clause for this column or attribute
    table description is:
    SQL> desc applsys.wf_error;
    Name Null? Type
    Q_NAME VARCHAR2(30)
    MSGID NOT NULL RAW(16)
    CORRID VARCHAR2(128)
    PRIORITY NUMBER
    STATE NUMBER
    DELAY DATE
    EXPIRATION NUMBER
    TIME_MANAGER_INFO DATE
    LOCAL_ORDER_NO NUMBER
    CHAIN_NO NUMBER
    CSCN NUMBER
    DSCN NUMBER
    ENQ_TIME DATE
    ENQ_UID NUMBER
    ENQ_TID VARCHAR2(30)
    DEQ_TIME DATE
    DEQ_UID NUMBER
    DEQ_TID VARCHAR2(30)
    RETRY_COUNT NUMBER
    EXCEPTION_QSCHEMA VARCHAR2(30)
    EXCEPTION_QUEUE VARCHAR2(30)
    STEP_NO NUMBER
    RECIPIENT_KEY NUMBER
    DEQUEUE_MSGID RAW(16)
    SENDER_NAME VARCHAR2(30)
    SENDER_ADDRESS VARCHAR2(1024)
    SENDER_PROTOCOL NUMBER
    USER_DATA APPS.WF_EVENT_T
    lob column:
    SQL> select owner,table_name,column_name from dba_lobs where table_name='WF_ERROR';
    OWNER TABLE_NAME COLUMN_NAME
    APPLSYS WF_ERROR "USER_DATA"."PARAMETER_LIST"
    APPLSYS WF_ERROR "USER_DATA"."EVENT_DATA"
    pls help me
    thanks and regards
    srinivas

    1. Export and import
    2. Sql*Plus 'copy' command
    It is a good idea to move from 'LONG' to 'CLOB'.

  • Problem with Exporting a Table with BLOB data.

    Hello All,
    I get error messages while exporting a table from Oracle8i ( 8.1.7.4.1), containing BLOB data:
    ORA-01555: snapshot too old: rollback segment number with name "" too small
    ORA-22924: snapshot too old
    Metalink says there is a bug in release 8.1.7.4.1 and suggests to create a new tablespace (with manual space management) ant move BLOB object to this TB.
    Can i solve this problem without creating a new tablespace ?
    Maybe somebody's experienced in such problem.
    thank you in advance.

    Maybe you could solve Your problem without creating new tablespace.
    Consider changing the value of MAX_ROLLBACK_SEGMENTS to max value if currently is not at that value and creating new bigger rollback segments.

  • Change Tablespace of a table with LONG column

    I have a 9i database that I have just gotten control of. At this point there is just one big dictionary managed tablespace for everything created by users. I am trying to move to multiple locally managed tablespaces with fixed extent sizes but I have run into a problem.
    I have one table with one LONG datatype column. Apparently there is a huge amount of work involved to change the code if I make it a BLOB so that is out.
    At this point I would like to change the tablespace of this table but I can't move it the normal way because of the LONG column. I have found mention of being able to do this with "COPY" but I can't find any documentation on the "COPY" command in the 9i Docs.
    Any help would be appreciated,
    Chris S.

    Chris-
    Can't you create your new table ahead of time in your new tablespace?
    You could then use a statement like:
    COPY FROM old/your_password@olddb TO new/your_password@newdb -
    REPLACE NEWTABLE -
    USING SELECT * FROM OLDTABLE;

Maybe you are looking for