ORA-03237 when creating table with BLOB columns on Oracle 9i

I am playing with my new Oracle 9i database. I am trying to copy
tables from my 8.1.6 db. Three tables won't create due to this
new message. The 9i documentation says it's soemthing to do with
freelist groups but my DBA says he hasn't set up any.
The tablespace is one of these newfangled locally managed
tablespaces (predetermined size 8k).
I can create these tables if I change the BLOB column to datatype
VARCHAR2(4000).
I have raised this through the usual channels, but I thought I'd
try this site as well.
Cheers, APC

victor_shostak wrote:
Figured, Virtual Columns work only for Binary XML.They are only supported, currently, for Binary XML.

Similar Messages

  • ORA-00904 on CREATE TABLE with virtual column based on XMLTYPE content

    Hello,
    this is another one for the syntax gurus...
    Trying the following, fails with ORA-00904: "MESSAGE"."GETROOTELEMENT": invalid identifier
    CREATE TABLE XML_TEST_VIRT
       MSG_TYPE         GENERATED ALWAYS AS (MESSAGE.GETROOTELEMENT()) VIRTUAL,
       MESSAGE  XMLTYPE             NOT     NULL,
       IE906    XMLTYPE             DEFAULT NULL
       XMLTYPE COLUMN MESSAGE STORE AS SECUREFILE BINARY XML
       XMLTYPE COLUMN IE906   STORE AS SECUREFILE BINARY XML
    /while this one succeeds
    CREATE TABLE XML_TEST_VIRT
       MSG_TYPE         GENERATED ALWAYS AS (EXTRACT(MESSAGE, '/*').GETROOTELEMENT()) VIRTUAL,
       MESSAGE  XMLTYPE             NOT     NULL,
       IE906    XMLTYPE             DEFAULT NULL
       XMLTYPE COLUMN MESSAGE STORE AS SECUREFILE BINARY XML
       XMLTYPE COLUMN IE906   STORE AS SECUREFILE BINARY XML
    /The GETROOTELEMENT member function of SYS.XMLTYPE is declared as "DETERMINISTIC PARALLEL_ENABLE" so the method getting called is not the problem as the 2nd case proves.
    Using the column MESSAGE which is of type XMLTYPE directly seems to be the problem. But the question is "why". The EXTRACT function result is of type XMLTYPE and calling its member works, the column is also of type XMLTYPE yet calling its member fails...
    Thanks in advance for any insights on this.
    Best Regards
    Philip

    Hmmmm ... I don't know if I should smile or frown with the implication that I am an OO guy :D :D
    Most of my colleagues when I started working as a software engineer, treated me as too low-level because of my C background (started doing C in 1985).
    In my last job, my colleagues hated my guts because I was asking them to squeeze every bit of performance out of C++ by using STL which is definitely not OO (although C++ is).
    My current colleagues treat me as a DB guru (which I most definitely am not) and they overlook/forget the fact that most of them use Java libraries in their projects, that I wrote for them !
    I am inclined to believe that I do not fall into any category in the end...
    The only thing I am for sure - and I am proud of it - is inquisitive. I want to know everything there is about the tools I use, and so I end up spending hours and hours investigating... (Microsoft found that out the hard way when I filed 16 bug reports in 8 days when Visual C++ 6 came out ! Not that it hurt them though...)
    This is where my confession ends (and my working on the XML validator starts...)
    Καληνύχτα Marco
    Philip (Φίλιππος in Greek)
    PS: I did not follow the last solution anyway. I just wanted to verify its operability ;)

  • ORA-00904 on create table with xmltype column

    Hi,
    I am trying to create a table with syntax
    CREATE TABLE ss_test(docid integer primary key, content varchar2(4000),acl XMLType)
    XMLType column acl store as object relational
    XMLSchema "acl.xsd" element "acl"
    varray xmldata."ace" store as table ace_tab;
    and getting ORA-00904.
    acl.xsd is registered as
    begin
    dbms_xmlschema.registerschema('acl.xsd',
    ' <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xdb="http://xmlns.oracle.com/xdb">
    <xs:element name="acl" xdb:SQLType="ACL_TYPE">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="ace" maxOccurs="100">
    <xs:complexType>
    <xs:attribute name="id" type="xs:integer"/>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>',true,true,false,false);
    end;
    Couldnt figure out whats wrong with the syntax. Any pointers ?
    Thanks,
    Rakesh

    Hmmmm ... I don't know if I should smile or frown with the implication that I am an OO guy :D :D
    Most of my colleagues when I started working as a software engineer, treated me as too low-level because of my C background (started doing C in 1985).
    In my last job, my colleagues hated my guts because I was asking them to squeeze every bit of performance out of C++ by using STL which is definitely not OO (although C++ is).
    My current colleagues treat me as a DB guru (which I most definitely am not) and they overlook/forget the fact that most of them use Java libraries in their projects, that I wrote for them !
    I am inclined to believe that I do not fall into any category in the end...
    The only thing I am for sure - and I am proud of it - is inquisitive. I want to know everything there is about the tools I use, and so I end up spending hours and hours investigating... (Microsoft found that out the hard way when I filed 16 bug reports in 8 days when Visual C++ 6 came out ! Not that it hurt them though...)
    This is where my confession ends (and my working on the XML validator starts...)
    Καληνύχτα Marco
    Philip (Φίλιππος in Greek)
    PS: I did not follow the last solution anyway. I just wanted to verify its operability ;)

  • Error while importing a table with BLOB column

    Hi,
    I am having a table with BLOB column. When I export such a table it gets exported correctly, but when I import the same in different schema having different tablespace it throws error
    IMP-00017: following statement failed with ORACLE error 959:
    "CREATE TABLE "CMM_PARTY_DOC" ("PDOC_DOC_ID" VARCHAR2(10), "PDOC_PTY_ID" VAR"
    "CHAR2(10), "PDOC_DOCDTL_ID" VARCHAR2(10), "PDOC_DOC_DESC" VARCHAR2(100), "P"
    "DOC_DOC_DTL_DESC" VARCHAR2(100), "PDOC_RCVD_YN" VARCHAR2(1), "PDOC_UPLOAD_D"
    "ATA" BLOB, "PDOC_UPD_USER" VARCHAR2(10), "PDOC_UPD_DATE" DATE, "PDOC_CRE_US"
    "ER" VARCHAR2(10) NOT NULL ENABLE, "PDOC_CRE_DATE" DATE NOT NULL ENABLE) PC"
    "TFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS"
    " 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "TS_AGIMSAPPOLOLIVE030"
    "4" LOGGING NOCOMPRESS LOB ("PDOC_UPLOAD_DATA") STORE AS (TABLESPACE "TS_AG"
    "IMSAPPOLOLIVE0304" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 NOCACHE L"
    "OGGING STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEF"
    "AULT))"
    IMP-00003: ORACLE error 959 encountered
    ORA-00959: tablespace 'TS_AGIMSAPPOLOLIVE0304' does not exist
    I used the import command as follows :
    imp <user/pwd@conn> file=<dmpfile.dmp> fromuser=<fromuser> touser=<touser> log=<logfile.log>
    What can I do so that this table gets imported correctly?
    Also tell me "whether the BLOB is stored in different tablespace than the default tablespace of the user?"
    Thanks in advance.

    Hello,
    U can either
    1) create a tablespace with the same name in destination where you are trying to import.
    2) get the ddl of the table, modify the tablespace name to reflect the existing tablespace name in destination and run the ddl in the destination database, and run your import command with option ignore=y--> which will ignore all the create errors.
    Regards,
    Vinay

  • How to read/write a binary file from/to a table with BLOB column

    I have create a table with a column of data type BLOB.
    I can read/write an IMAGE file from/to the column of the table using:
    READ_IMAGE_FILE
    WRITE_IMAGE_FILE
    How can I do the same for other binary files, e.g. aaaa.zip?

    There is a package procedure dbms_lob.readblobfromfile to read BLOB's from file.
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#sthref3583
    To write a BLOB to file you can use a Java procedure (pre Oracle 9i R2) or utl_file.put_raw (there is no dbms_lob.writelobtofile).
    http://asktom.oracle.com/pls/ask/f?p=4950:8:1559124855641433424::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:6379798216275

  • Sample insert into table with BLOB column

    This is my first opportunity to work with BLOB columns. I was wondering if anyone had some sample code that shows the loading of a blob column and inserted into the table with a blob column.
    I have to produce a report (including crlf) and place it into a blob column. The user will download the report at a later time.
    Any suggestions / code samples are greatly appreciated!!!!

    You can enable string binding in TopLink.
    login.useStringBinding(int size);
    or you could enable binding in general,
    login.bindAllParameters();

  • Error ORA-01426: numeric overflow when Creating table with double data type

    Hi,
    I am using ODP.NET to create a table with data from SQL to Oracle. The problem is with double data type fields that is equivalent to FLOAT(49) in Oracle. My syntax is:
    CREATE TABLE SCOTT.ALLTYPES
    F1 NUMBER(10),
    F10 DATE,
    F2 NUMBER(10),
    F3 NUMBER(5),
    F4 NUMBER(3),
    F5 FLOAT(23),
    F6 FLOAT(49),
    F7 NUMBER (38,5),
    F8 NVARCHAR2(500),
    F9 NVARCHAR2(500)
    Th error is with field F6 but I am not sure what is the correct type equivalent to double in SQL.
    I woul appreciate if anyone can help me with this problem.
    Sunny

    Does this simple test work for you?
    In database:
    create table float_test
      f1 float(49)
    );C# code:
    using System;
    using System.Data;
    using System.Text;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace FloatTest
      /// <summary>
      /// Summary description for Class1.
      /// </summary>
      class Class1
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
          // connect to local db using o/s authenticated account
          OracleConnection con = new OracleConnection("User Id=/");
          con.Open();
          // will hold the value to insert
          StringBuilder sbValue = new StringBuilder();
          // create a string of 49 number 9's
          for (int i = 0; i < 49; i++)
            sbValue.Append("9");
          // command object to perform the insert
          OracleCommand cmd = con.CreateCommand();
          cmd.CommandText = "insert into float_test values (:1)";
          // bind variable for the value to be inserted
          OracleParameter p_value = new OracleParameter();
          p_value.OracleDbType = OracleDbType.Double;
          p_value.Value = Convert.ToDouble(sbValue.ToString());
          // add parameter to collection
          cmd.Parameters.Add(p_value);
          // execute the insert operation
          cmd.ExecuteNonQuery();
          // clean up
          p_value.Dispose();
          cmd.Dispose();
          con.Dispose();
    }SQL*Plus after executing above code:
    SQL> select * from float_test;
            F1
    1.0000E+49
    1 row selected.- Mark

  • Table with BLOB  column re-partitioning

    Currently I have a table with a blob column Z partitioned on Column X I want to re-partition the table on Column Y is there a quick way of doing this.
    INSERT INTO SELECT * has limitations on the blob size I guess.
    Can someone explain this?
    Edited by: user10229350 on Mar 1, 2010 7:36 AM

    I am using hash partitioning looks like split partition doesn't apply for hash partition:
    "The SPLIT PARTITION clause of the ALTER TABLE or ALTER INDEX statement is used to redistribute the contents of a partition into two new partitions. Consider doing this when a partition becomes too large and causes backup, recovery, or maintenance operations to take a long time to complete. You can also use the SPLIT PARTITION clause to redistribute the I/O load.
    This clause cannot be used for hash partitions or subpartitions."

  • Calculate size of table with BLOB column

    Hello,
    when trying to calculate the occupied space for a table, I'm using DBA_SEGMENTS, which works fine as long as the table does not have a BLOB column.
    As far as I can tell, the size of the BLOB data is stored with the SEGMENT_TYPE = 'LOBSEGMENT', but I cannot find a view that tells me which DBA_SEGMENT row belongs to the BLOB column in the table I'm checking.
    To give you an example:
    select sum(BYTES)
    from DBA_SEGMENTS
    where owner = user
    and segment_name = 'MY_TABLE'
    group by SEGMENT_NAMEreturns 262144
    running:
    SELECT sum(length(blob_column))
    FROM my_tablereturns 821333
    There are entries in DBA_SEGMENTS for my user with the type LOBSEGMENT, but I cannot find a way to map the correct DBA_SEGMENTS row to the table I am checking.
    Any ideas?
    I'm using Oracle 10.2.0.3.0 on Redhat
    Thanks in advance
    Thomas

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_1092.htm#i1581211
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:266215435203#993030200346552097

  • Error when creating table with nested table of object

    Dear all,
    I tried to create a table that contains nested table of an object but got an error:
    create or replace type some_obj is object (
      a number, b blob
      4  /
    Type created.
    create or replace type some_type is table of some_obj;
      2  /
    Type created.
    SQL>
    create table test (obj_id number, temp some_type) nested table temp store as nes_tab;
    Table created.
    SQL> create table test (obj_id number, temp some_type) nested table temp store as nes_tab
    ERROR at line 1:
    ORA-00955: name is already used by an existing objectWhat is causing the error? How can I troubleshoot this?
    best regards,
    Val

    Valerie Debonair wrote:
    never mind, I put "/" at the end of the create statement that makes executing create table twice....Yep. If I'm writing a script, I tend to just stick with "/" for all my statements, including the SQL as well as the DDL, otherwise it can be confusing whether a ";" is needed or not or whether it will try and execute it twice like you found.
    "/" works for all.

  • How to know exact size of table with blob column

    I have a table with one BLOB column. I ran this query.
    select bytes/1024/1024 from user_segments where segment_name='GMSSP_REQUEST_TEMP_FILES'
    (user_segments is a view)
    it gave me 0.125
    It means size of table is 0.125. I have uploaded 3 files to this table. Each of them is of 5 mb. After that I check size of table. but result was same. i.e 0.125.
    Can any body tell me how to know exact amount of space consumed by files. I am expecting following result
    size should be (5+5+5+0.125)MB
    Any help is appreciated.
    Thanks.
    Akie

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_1092.htm#i1581211
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:266215435203#993030200346552097

  • Uploading a file (.doc, .xls, .txt) into an Oracle table with BLOB column

    Hello All :
    I have been trying to figure out for a simple code I can use in my JSP to upload a file (of any format) into an Oracle table with a BLOB column type. I have gone through a lot of existing forums but couldnot find a simple code (that doesnot use Servlet, for eg.) to implement this piece.
    Thanks a lot for your help !!

    Hi.
    First of all to put a file into Oracle you need to get the array of bytes byte[] for that file. For this use for example FileInputStream.
    After you get the byte array try to use this code:
            try {
                Connection conn = myGetDBConnection();
                PreparedStatement pstmt = conn.prepareStatement("INSERT INTO table1 (content) VALUES(?)");
                byte[] content = myGetFileAsBytes();
                if (content != null) {
                    pstmt.setBinaryStream(0, new ByteArrayInputStream(content), content.length);
                pstmt.close();
                conn.close();
            } catch (Exception ex) {
                ex.printStackTrace();
            }or instead of using ByteArrayInputStream try pstmt.setBinaryStream(0, new FileInputStream(yourFile), getFileSize());Hope this will help...
    regards, Victor Letunovsky

  • Import table with BLOB Column

    hi
    I would like to export table "A" containing data in BLOB column and then import the same table into another user's table "B".
    i got the following error
    ORA-06502PL/SQL: numeric or value error

    When you export from one user's table A to another user table B. you should have privilege to import from the user X.
    Do this
    exp system/password file=filename.dmp log=filename.log tables=A owner=X
    exp scott/tiger file=emp.dmp tables=(emp,dept)
    imp scott/tiger file=emp.dmp full=yes
    imp system/password file=filename.dmp log=filename1.log fromuser=X touser=Y tables=A
    Now table A is imported into Y schema. drop the table B(if you do not need old table B) then rename table A to B.
    If you need old data in Table B then generate insert statements for the data and insert them into new table B

  • Migrating a table with BLOB column from one db to another

    Hello everybody,
    I have two databases D1 and D2. Each database contains table T1 (same structure in both databases). T has a BLOB column and is populated in D1. I have to move all the data from T database D1 into T database D2.
    D1 and D2 are located on different machines. T in D1 is a huge table (milions of records). What is the best solution to migrate the T data between the 2 databases?
    Any help will be appreciated.
    Thank you in advance.
    daniela

    Depending on the version of the database you have, you could use transportable tablespaces.
    http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96524/c04space.htm#9370

  • How to migrate data fSQL server 2005 Tables with image column To ORACLE 11g

    Hi ....
    I am in the middle of migrating our database from sqlserver 2005 version to ORACLE 11g instance, and i'm facing a problem when trying to load data into one of the oracle table which has blob column and some more. The data file was extracted from sql server 2005 table which has image column and some more. All other columns are sinking with the migration as expected but the image column is not getting loaded into oralce blob.
    I tried loading data using sqlloader.
    Is there any other way to migrate data directly between these two versions of database?. Pls help...
    Edited by: user13310523 on 21-Jun-2010 23:48

    Welcome to the forum,
    Hi,
    To link Oracle with SQL Server follow this steps:
    1-Install Oracle ODBC drivers on the server (your local Oracle database) that will access the remote SQL Server database using the database link.
    2. Setup the ODBC connection on the local Oracle database using the Windows ODBC Data Source Administrator
    3. Test the ODBC drivers to ensure that connectivity is made to the SQL Server database.
    4. Ensure that your global_names parameter is set to False.
    5. Configure the Oracle Heterogeneous services by creating an initodbc.ora file within the Oracle database.
    7. Modify the Listener.ora file.
    SID_NAME is the DSN for the remote database.
    ORACLE_HOME is the actual Oracle home file path.
    PROGRAM tells Oracle to use heterogeneous services.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME=Cas30C) -- Enter the DSN on this line
    (ORACLE_HOME = c:\oracle10gdb) -- Enter your Oracle home on this line
    (PROGRAM = hsodbc) ) )
    8. Modify the Tnsnames.ora file. This is the Oracle database installation accessed by the users to connect to the ODBC drivers
    (DESCRIPTION=
    (ADDRESS_LIST=
    (Address=(PROTOCOL=TCP)
    (HOST=
    -- (Server x)
    (PORT=1521))) -- Enter the port on which the server x Oracle installation
    -- is listening
    (CONNECT_DATA=(SID=Cas30c)) - Enter the DSN name
    (HS=OK) -- Enter this value. It tells Oracle to use hetergeneous services
    9. Reload the listener on local Oracle database
    10. Create a database link on the local Oracle installation that accesses the heterogeneous connection, which, in turn, connect to SQL Server.
    11. Run a SQL Server Select statement from the Oracle installation using the database link
    Thanks
    BelMan :)

Maybe you are looking for

  • How to save Custom control records module pool program ?

    Hi guru , 1. How to save Custom control records module pool program ? I wrote multiple lines of record in custom control Who to save that records ? thanking you. Regards, Subash.

  • VF11 - Billing Date should be defaulted with system date

    Hi All, My requirement is to default the System date in Billing Date for the transaction VF11. Please let me know whether any Exits/BADI exist for this. I tried to create the field exit but the problem is for this Billing Date field there is no Param

  • Anomaly Detection not detecting host machines (learned OS)

    I have an ASA5540X firewall with the internal (software based) IPS module. The module has the up-to-date signatures and seems to be running correctly. However, after enabling anomaly detection (ad0), and specifying the internal zones, I don't see any

  • Hide/Show the column content

    Hi Guys, Is it possible to show /hide the column contents on particular conditions for a dataTable?? In other words, there may be a situation where I wanted to hide the object for row1 but not for row2 I tried with setRendered method. But the problem

  • EXS 24 audio files missing from G4 to mac Pro. Export solves, but why?

    Hi. I recently upgraded from G4 DP to Mac Pro (huge jump). While some of my sample libraries work straight away...others do not, claiming "file not found" when I know they're there. A cure that works is to go back to the G4, load the files into EXS24