Column of type BLOB in own tablespace in partition in the table, tablespace to move

Hi all

First off I use Oracle Database 11.2.0.2 on AIX 5.3.

We have a table is partitioned on a monthly basis.

In this table, there is a partition (BOTTOM), this lower score is 1.5 TB in size thanks to a BLOB column called (ATTACHMENT).

The rest of the table is not large, about 30 GB, it's the BLOB column that uses all the space.

The lower part is in its own default tablespace (DefaultTablespace), the BLOB column in the lower score is also in its own tablespace (TABLESPACE_LOB) - 1.5 to

I was invited in order to free up space by moving the TABELSPACE_LOB (from the low partition) to a data archive, confirming the data is there and then remove the lower score of the production.

I do not have enough free space (or time) make an expdp, I think not only its doable with data so much.

CREATE TABLE tablename
(
  xx                          VARCHAR2(14 BYTE),          
  xx                          NUMBER(8),    
  xx         NUMBER,
  ATTACHMENT   BLOB,
  xx             DATE,
  xx             VARCHAR2(100 BYTE),
  xx                     INTEGER,
)
LOB (ATTACHMENT) STORE AS (
  TABLESPACE  DefaultTablespace
  ENABLE      STORAGE IN ROW
NOCOMPRESS
TABLESPACE DefaultTablespace
RESULT_CACHE (MODE DEFAULT)


PARTITION BY RANGE (xx)
( 
  PARTITION LOWER VALUES LESS THAN ('xx')
    LOGGING
    COMPRESS BASIC
    TABLESPACE DefaultTablespace
    LOB (ATTACHMENT) STORE AS (
      TABLESPACE  TABLESPACE_LOB
      ENABLE      STORAGE IN ROW
)

...>>

My idea was to take a table, excluding the attachment column datapump, export using external tables.

Then to create the table on the database archive 'with' the attachment column.

Import data only, as I understand that if you use a dump file that has too many columns Oracle he will manage, I hope it will work the other way around.

Then on the production, make the TABLESPACE_LOB read-only and move it to the new file system.

It's a little more complicated that a normal gesture of tablespace because of how the table is split.

Any advice would be much appreciated.

I was thinking about an approach as:

SWAP PARTITION allows to separate the partition of the table

  • Create a non-partitioned table which is otherwise identical in structure to tablename (nonpart_tablename)
  • ALTER TABLE TableName LOWER WITH nonpart_tablename SWAP PARTITION

Move the segment of the table at TABLESPACE_LOB, or to a different tablespace on its own. It is, as you say, only 30 GB and I think (but not strongly enough to go forward without testing/validation on a smaller scale) that the displacement of the segment of the table in this way does not disrupt the LOB segment, as long as you don't say MOVE LOB.

  • ALTER TABLE nonpart_tablename MOVE TABLESPACE TABLESPACE_LOB

Now the TABLESPACE_LOB tablespace is self-contained and you can make it transportable.

Tags: Database

Similar Questions

  • How to insert a pdf or jpeg image into a column of type blob of a table

    How to insert a pdf or jpeg image into a column of type blob of a table

    Hello
    Try this

    Loading an image into a BLOB column and showing through OAS
    -------------------------------------------------------------

    The steps are:

    Step 1.
    -------

    Create a table to store BLOBs:

    create BLOB table objects
    (id VARCHAR2 (255),)
    blob_col blob
    );

    Step 2.
    -------

    Create a logical directory in the database to the physical file system:

    create or replace the MY_FILES directory as "c:\images";

    Step 3.
    -------

    Create a procedure to load the BLOB from the file system by using the logic
    Directory. Gif 'aria.gif' must exist in c:\images.

    create or replace procedure insert_img as
    f_lob bfile.
    b_lob blob.
    Start
    insert into BLOB ("MyGif", empty_blob()) values
    return blob_col in b_lob;

    f_lob: = bfilename ("MY_FILES', 'aria.gif');
    DBMS_LOB. FileOpen (f_lob, dbms_lob.file_readonly);
    DBMS_LOB. LoadFromFile (b_lob, f_lob, dbms_lob.getlength (f_lob));
    DBMS_LOB. FileClose (f_lob);
    commit;
    end;
    /

    Step 4.
    -------

    Create a procedure that is called via Oracle Application Server to display the
    image.

    create or replace procedure get_img as
    vblob blob.
    raw buffer (32000);
    buffer_size integer: = 32000;
    offset of an integer: = 1;
    length of number;
    Start
    owa_util.mime_header('image/gif');
    Select blob_col from vblob of blobs where id = 'MyGif. "
    Length: = dbms_lob.getlength (vblob);
    While offset< length="">
    DBMS_LOB. Read (vblob, buffer_size, offset, buffer);
    HTP. PRN (utl_raw.cast_to_varchar2 (buffer));
    offset: = offset + buffer_size;
    end loop;
    exception
    while others then
    HTP.p (SQLERRM);
    end;
    /

    Step 5.
    -------

    Use the PL/SQL cartridge to call the get_img procedure

    OR

    Create this procedure in function and call it your PL/SQL code for
    correctly place the images on your HTML page through the PL/SQL Toolbox.

    from a html form

    1. create an HTML form where the image will be. You too
    need the file MIME type.
    2. create a procedure receives the form parameters. The file field will be a Varchar2
    parameter, because you receive the path of the image is not the image itself.
    3 insert the image file into the table by using 'Create a directory NAME as chemin_image' and
    Then use ' insert into the TABLE (row, BLOB_OBJECT, MIME_OBJECT) values (sequence.nextval, '.
    EMPTY_BLOB() 'GIF' or 'JPEG') BLOB_OBJECT, in the variable_blob, back
    variable_consecutive.
    4 load the file into the table using:
    DBMS_LOB. LoadFromFile (variable_blob, variable_file_name, dbms_lob.getlength (variable_file_name));
    DBMS_LOB. FileClose (variable_file_name);
    engage.

    Kind regards
    Simma...

  • How to find the size of the downloaded image on a column of type blob in a table?

    How to find the size of the downloaded image on a column of type blob in a table?

    Vidya,

    You can use the built in function dbms_lob.getlength to get the length (size) of a LOB column or a bfile type.
    Check out this link.

    http://download.Oracle.com/docs/CD/B10501_01/AppDev.920/a96612/d_lob2.htm#1008995

  • compress columns of type blob in a directory and retrieve the zip file in the APEX

    Hi all

    I have a requirement which is,

    I have a table that has a blob column I want to save all the records of the BLOB in the table in a ZIP compressed in a directory.

    Then with I have to go get this zipped file in directory and save in my local computer using APEX.

    Waiting for your answers,

    Bala

    Hi a cold sore.

    In addition to above solution to pass like a Flash of using PL/SQL blob that follows is solutions to compress blobs using Java and PL/SQL:

    NOTE: As these solution based on java solutions you require Java VM support in your database.

    Kind regards

    Kiran

  • update the column of type char to stem after insert or update the same column

    I have the table "people":

    DESC PEOPLE
    Name Null? Type
    ------------------------------- -------- ------------
    ID NOT NULL NUMBER
    NAME VARCHAR2 (25) NOT NULL

    and I need to make sure that the NAME column is always in uppercase letters, so I did as he illustrated in this link:
    http://asktom.Oracle.com/tkyte/mutate/

    I did this: -.
    ==================================
    CREATE OR REPLACE TRIGGER parent_bi
    BEFORE THE INSERT OR UPDATE
    ON people
    BEGIN
    state_pkg.newrows: = state_pkg.empty;
    END;
    /
    -----------------------------------------------------------------
    CREATE OR REPLACE TRIGGER parent_aifer
    AFTER INSERT OR UPDATE
    ON PEOPLE
    FOR EACH LINE
    BEGIN
    state_pkg.newrows (state_pkg.newrows.COUNT + 1): =: NEW. ROWID;
    END;
    /
    ------------------------------------------------------------------
    CREATE OR REPLACE TRIGGER HR. PARENT_AI
    AFTER INSERT OR UPDATE
    ON HUMAN RESOURCES. PEOPLE
    REFERRING AGAIN AS NINE OLD AND OLD
    FOR EACH LINE
    BEGIN
    BECAUSE me in 1... state_pkg.newrows.count
    LOOP
    UPDATE of the people
    NAME = UPPER (NAME)
    People WHERE. ROWID = state_pkg.newrows (i);
    END LOOP;
    END;
    /
    ======================================

    but nothing is coming, as the same that these triggers do not exist.

    So, what is wrong?
    and how I workaround to make this statement:-
    Setting a DAY people SET NAME = UPPER (NAME);
    whenever I update or insert in the name column.

    It is much simpler that that - you just need a BEFORE INSERT trigger

    CREATE OR REPLACE TRIGGER your_trigger_name
      BEFORE INSERT OR UPDATE ON persons
      FOR EACH ROW
    BEGIN
      :new.name := UPPER( :new.name);
    END;
    /
    

    As you can see from this example, which will force all uppercase

    SQL> create table persons (
      2    name varchar2(10)
      3  );
    
    Table created.
    
    SQL> CREATE OR REPLACE TRIGGER your_trigger_name
      2    BEFORE INSERT OR UPDATE ON persons
      3    FOR EACH ROW
      4  BEGIN
      5    :new.name := UPPER( :new.name);
      6  END;
      7  /
    
    Trigger created.
    
    SQL> insert into persons values( 'justin' );
    
    1 row created.
    
    SQL> insert into persons select lower(ename) from emp;
    
    14 rows created.
    
    SQL> select * from persons;
    
    NAME
    ----------
    JUSTIN
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER
    
    15 rows selected.
    

    Also, you generally want to add a check constraint to ensure that NAME = UPPER (NAME).

    Justin

  • Browse file... Column of type BLOB specified in the attribute of the Source element

    Hello world

    I'm trying to insert images as blobs in a database table. I followed the tutorial in the following link, but I'm always redirected to the de.../wwv_flow.accept/ page, which is the page that follows an insertion in the file Explorer WWV_FLOW_FILES table method. The file inserted into the APEX_APPLICATION_FILES table instead of the new table that I created.

    http://oraexplorer.com/2011/03/file-browser-in-Apex-4-with-BLOB-column-specified-in-item-source-attribute/

    FILE BROWSER:


    LINE (DML) AUTOMATIC PROCESSING:

    P100_A4 is simply the maximum ATTACH_ID (PK) + 1

    I just want to insert my files from the file Explorer in this table with the name of file, mime_type and 2 fields of my choice. I use apex 4.2.5. Any help is very appreciated.

    Look in the thread below. The issue I described here has been resolved in this link through other means.

    Browse insert file as BLOB in DB

  • Column of type blob MySQL impossible to upload a file?

    Hello

    IAM using jdeveloper 11.1.1.7

    IAM new to adf

    We use mysql database and glassfish server,.

    Using mysql iam impossible to upload the file in the database

    one you suggest it's urgent for me?

    Hello

    in the dough of class AmImpl code below

    ' Public Sub test (String document_type, String DocumentName, InputStream pFileData integer profileid) survey FileNotFoundException, IOException {}
        {
        BigDecimal blobId = null;
        PreparedStatement stmt = this.getDBTransaction () .createPreparedStatement ("SELECT last_insert_id ()", 1);
        try {}
        Conn connection (Connection) = stmt.getConnection ();
        stmt. Close();
        stmt = conn.prepareStatement ("insert into capt_docs (document_type, document_name, document_file, document_profileid) values(?,?,?,?)");
        InputStream isFile = new FileInputStream (file);
              stmt.setString(1,document_type);
        stmt.setString(2,document_name);
        stmt.setBinaryStream (4, isFile, (int) (file.length (()));
        stmt.setBlob (3, pFileData);
        stmt.setInt(4,profileid);
        stmt.executeUpdate ();
        Conn.Commit ();
        stmt. Close();
        pFileData.close ();
        stmt = conn.prepareStatement ("SELECT last_insert_id ()", 1);
        stmt. Execute();
        ResultSet rs = stmt.getResultSet ();
        If (rs! = null) {}
        RS. First();
        blobId = rs.getBigDecimal (1);
        }
        stmt. Close();
      
        } catch (SQLException e) {}
        e.printStackTrace ();
        } {Finally
        }
      
    }

    }

    and change the settings based on your requiremnt and call this method from your backing bean

    {} public void fileUpload (ActionEvent actionEvent)
        Add the code in the event here...
        BindingContext ctx = BindingContext.getCurrent ();
        DC DCDataControl = ctx.findDataControl("ClinaptAMDataControl"); Name of the application in datacontrolBinding.cpx module
        Class ApplicationModuleImplimentaion
        AppM ClinaptAMImpl = (ClinaptAMImpl) dc.getDataProvider ();
       
        try {}
            InputStream fileData is getInputStream (file);.
           String docname = file.getFilename ();
            RichSelectOneChoice documentType = (RichSelectOneChoice) getComponentById ("soc4");
            System.out.println ("Document Type" + documentType.getValue ());
            RichInputText profileid = (RichInputText) getComponentById ("it1");
            RicheTableau documenttable = (RichTable) getComponentById ('t1');
          
            It is app module method and flow data file entry
            appM.test (getDocumentTypeVar (), docname, fileData (Integer) profileid.getValue ());
            AdfFacesContext.getCurrentInstance () .addPartialTarget (documenttable);
        } catch (FileNotFoundException exception) e {}
            e.printStackTrace ();
        } catch (IOException e) {}
            e.printStackTrace ();
        }
          
    }
  • How to download all the images in the folder to the column of type BLOB (problem of area to create BLOB)

    Hello

    I use JDeveloper 11.1.2.3 version, I need to download all the images in my local folder to the database at a time table. The problem I face is to create BLOBDomain for each of them?

    Best regards,

    Julien

    If you can access the files, that only works if they are on the server, you can read the file and create the domain of the BLOB in the file directly. The technique is the same as in the blob. Only difference is that you pass the file to the method and open the input stream of the file instead of the UploadedFile.

    Timo

  • Store an Image in the column of type BLOB of a Table

    It is about saving an Image file, a temp_photo table.

    UNDER LINUX, I created the Directory object.
    Step # 1
    SQL > create directory MSGS3 as ' / home/HD/om4000/I_MESSAGES ";
    Created directory.

    Step 2: set up the temp_photo Table.

    SQL > create table temp_photo
    (
    ID NUMBER (3) NOT NULL,
    PHOTO_NAME VARCHAR2 (50).
    PHOTO BLOB
    );
    Table created.

    Step: 3 this is the procedure that I have created to load the file from the file system of the database.

    create or replace PROCEDURE load_file)
    number of P_ID,
    p_photo_name in varchar2) IS
    src_file BFILE.
    dst_file BLOB;
    lgh_file directory.
    BEGIN
    src_file: = bfilename ('MSGS3', p_photo_name);
    -Insert a NULL record to lock
    INSERT INTO temp_photo
    (id, photo_name, photo)
    VALUES
    (p_id, p_photo_name, EMPTY_BLOB())
    RETURN photo INTO dst_file;
    -lock the folder
    SELECT photo
    IN dst_file
    OF temp_photo
    ID WHERE p_id =
    AND photo_name = p_photo_name
    UPDATE;
    -Open the file
    DBMS_LOB. FileOpen (src_file, dbms_lob.file_readonly);
    -determine the length
    lgh_file: = dbms_lob.getlength (src_file);
    -Read the file
    DBMS_LOB. LoadFromFile (dst_file, src_file, lgh_file);
    -update the blob field
    UPDATE temp_photo
    Photo SET dst_file =
    ID WHERE p_id =
    AND photo_name = p_photo_name;
    -close file
    DBMS_LOB. FileClose (src_file);
    END load_file;
    /


    Step 4: when I test it by running the procedure in the following assistance:
    SQL > execute load_file (1, 'Omega5000.jpg');

    I get the following error:

    Error from line 5 in order:
    run load_file(1,'Omega5000.gif')
    Error report:
    ORA-22288: file or LOB FILEOPEN operation failed
    No such file or directory
    ORA-06512: at "SYS." DBMS_LOB", line 805
    ORA-06512: at "HD. Load_file", line 23
    ORA-06512: at line 1
    22288 00000 - "file or LOB operation %s failed\n%s".
    * Cause: Failure of the attempted operation on the file or the LOB.
    * Action: See the following error message in the more detailed error stack
    information. In addition, make sure that the file or LOB exists and that
    privileges are set for the specified operation. If
    the error continues, report the error to the user DBA.

    He said: no such file or directory, but I double checked that the file is located in the same directory and directory is it physically (for which I created the above directory object.)
    Can someone help me where I'm doing something wrong. This is the first time I use the BLOB in my table. Can anyone suggest what's not here.

    >
    He said: no such file or directory, but I double checked that the file is located in the same directory and directory is it physically (for which I created the above directory object.)
    >
    Oracle is disagreeing with you.

    Post your proof that the file exists in the path you provided.

    See this example Oracle-base
    http://www.Oracle-base.com/articles/Misc/HTML-with-embedded-images-from-plsql.php
    >
    CONN / AS SYSDBA
    CREATE or REPLACE DIRECTORY of images AS "/ host /";
    GRANT READ, WRITE on DIRECTORY images TO test;
    >
    Write down everything you missed? Tip: Look at the last character of the DIRECTORY string. Second Tip: See the grant?

    SQL>create directory MSGS3 as '/home/mh/om4000/I_MESSAGES' ;
    
  • How to find the name of the column in the tables

    Hello..

    Suppose that there are thousands of table in the database. Out of them a few tables contain the column name as 'ENTRY_BY '.

    I want to know the tables that have columns like "ENTRY_BY".

    ... Please suggest for this query.

    all_tab_cols

    Select * from all_tab_cols

    where column_name like ' % INPUT % ';

    Post edited by: Rajavignesh

  • Please let me know how I can add a new column with a constraint not null, table already has data, without falling off the table... Please help me on this issue...

    Hello

    I have an emp_job_det with a, b, c columns table. Note that this TABLE ALREADY has DATA OF THESE COLUMNS

    IAM now add a new column "D" with forced not null

    Fistly I alter the table by adding the single column "D", if I do, the entire column would be created with alll of nulls for the column DEFAULT D

    ALTER table emp_job_det Add number D; -do note not null CONSTRAINT is not added

    Second... If I try to add the constraint not null, get an eoor as already conatained null values...

    (GOLD)

    In other words, if I put the query

    ALTER table emp_job_det Add number D NOT NULL; -THROWS ERROR AS TABLE ALREADY CONTAINS DATA

    So my question is how how can I add a new column with a constraint not null, table already has the data, without falling off the table

    Please help me on this issue...

    Add the column without constraint, then fill the column. Once all the rows in the table are given in the new column, and then add the constraint not null.

  • Create index partition in the partition table tablespace

    Hello

    I am running a work custom that

    * Creates a tablespace by day
    * Creates the daily table partition in the created tablespace
    * Removes the days tablepartition X
    * Removes the storage space for this partition of X + 1 day.

    The work above works perfectly, but it has problems with the management of the index for these partitioned tables. In the old database (10g - single node), all indexes and partitions exist in a BIG tablespace and when I imported the table creation script in the new database, I changed all the partitions table & index to go in their respective space.

    For example:

    Table_name... Nom_partition... Index_Part_name... Tablespace_name
    ============...================............====================...........=================
    TABL1... TABL1_2012_07_16... TABL1_IDX_2012_07_16... TBS_2012_07_16
    TABL1... TABL1_2012_07_15... TABL1_IDX_2012_07_15... TBS_2012_07_15


    But now, when the job is run, it creates the index in the tablespace TBS_DATA default.

    Table_name... Nom_partition... Index_Part_name... Tablespace_name
    ============...================.............====================...........=================
    TABL1... TABL1_2012_08_16... TABL1_IDX_2012_08_16... TBS_DATA
    TABL1... TABL1_2012_08_15... TABL1_IDX_2012_08_15... TBS_DATA


    I can issue alter index rebuild to move the index to its tablespace default, but how can I make sure that the index is created in the designated tablespace?

    NOTE: the partition/tablespace management work that I run only creates the partition of the table and not the index.


    The new env is a cluster of CARS of 2 nodes 11 GR 2 on Linux x86_64.


    Thanks in advance,
    aBBy.

    try something like this

    ALTER table tab_owner.tab_name add the partition v_new_part_nm
    values less (to_date('''|| v_new_part_dt_formatted ||'') ((', "DD-MON-YYYY)) tablespace ' | part_tbs
    update the index (ind1_name (partition ind_partition_name tablespace ind_part_tbs)
    ind2_name (partition tablespace ind_part_tbs ind_partition_name))
    ;

  • How to insert a column of type long raw

    Hi all

    I'm trying to copy a record with a column of type long raw.
    But it raises an error ORA-00997: illegal use of the long data type.

    For example, the HR employee table: PER_IMAGES

    INSERT INTO per_images (image_id, parent_id, table_name, image)
    SELECT 21,10, 'test', images OF per_images WHERE the image_id = 2

    It triggers ORA-00997: illegal use of the long data type.

    It cannot be resolved by the statement "copy of" ("copy of" only works for the LONG data type, not LONG RAW datatype)

    We try to export the data in long-raw format source to the BLOB data type.
    And then insert BLOB of long-crude recording of destination.
    (i.e. long-raw > > to_lob(long-raw) > > BLOB > > long-crude oil)
    It works without any error message, but there are empty picture in the destination folder.

    Is there a function of BOLB in LONGRAW data conversion system?

    Our version of the database is 9i.


    Any suggestion will be appreciated.

    Best regards
    Zhxiang

    Please read the article
    http://download.Oracle.com/docs/CD/B10501_01/AppDev.920/a96591/adl08lon.htm#121550

  • table col name get the details of the table column and inserting of values depending on the data type of the column

    Hello

    I am train to write a procedure where I would spend the table as a parameter name and then the code would determine it is column names, and then he would insert records in each column depending on the data type. could someone help me with this.

    Thank you

    SM

    Hello

    Perhaps you need to dummy data just for the table.

    Here is my exercise

    create or replace
    procedure generate_rows(p_table_name varchar2, p_count number)
    is
      --
      function insert_statement(p_table_name varchar2) return clob
      is
        l_columns clob;
        l_expressions clob;
        l_sql clob default
          'insert into p_table_name (l_columns) select l_expressions from dual connect by level <= :p_count';
      begin
        select
          -- l_columns
          listagg(lower(column_name), ',') within group (order by column_id),
          -- l_expressions
          listagg(
            case
            when data_type = 'DATE'
              then  'sysdate'
            when data_type like 'TIMESTAMP%'
              then  'systimestamp'
            when data_type = 'NUMBER'
              then  replace('dbms_random.value(1,max)',
                      'max', nvl(data_precision - data_scale, data_length)
                    )
            when data_type = 'VARCHAR2'
              then  replace(q'|dbms_random.string('a',data_length)|',
                      'data_length', data_length
                    )
            else
                    'NULL'
            end, ',') within group (order by column_id)
        into
          l_columns,
          l_expressions
        from user_tab_columns
        where table_name = upper(p_table_name);
        --
        l_sql := replace(replace(replace(l_sql,
          'p_table_name', p_table_name),
          'l_columns', l_columns),
          'l_expressions', l_expressions);
        -- debug
        dbms_output.put_line(l_sql);
        --
        return l_sql;
      end;
    begin
      execute immediate insert_statement(p_table_name) using p_count;
    end;
    /
    
    -- test
    create table mytable(
      id number(4,0),
      txt varchar2(10),
      tstz timestamp with time zone,
      dt date,
      xml clob
    )
    ;
    set serveroutput on
    exec generate_rows('mytable', 10);
    select id, txt from mytable
    ;
    drop procedure generate_rows
    ;
    drop table mytable purge
    ;
    
    Procedure GENERATE_ROWS compiled
    Table MYTABLE created.
    PL/SQL procedure successfully completed.
    
    insert into mytable (id,txt,tstz,dt,xml) select dbms_random.value(1,4),dbms_random.string('a',10),systimestamp,sysdate,NULL from dual connect by level <= :p_count
            ID TXT
    ---------- ----------
             3 WnSbyiZRkC
             2 UddzkhktLf
             1 zwfWigHxUp
             2 VlUMPHHotN
             3 adGCKDeokj
             3 CKAHGfuHAY
             2 pqsHrVeHwF
             3 FypZMVshxs
             3 WtbsJPHMDC
             3 TlxYoKbuWp
    
    10 rows selected
    
    Procedure GENERATE_ROWS dropped.
    Table MYTABLE dropped.
    

    and here is the vision of Tom Kyte for the same https://asktom.oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:2151576678914

    Edit: to improve my code, it must use p_count as bind as Tom.

  • Create a join between a column of type DATE and DATETIME RPD

    Hello

    In my DR. I have a fact table with a DATE column, which also contains a component "hour". The physical layer shows this as a DATETIME column that to this DAY, I've changed since I'm only interested in the part of the date.

    When I join it an alias of my Date dimension, the generated sql physics is similar to:

    DIM_DATE. DATE = FACT_A.FINISH_DATE

    What I really want is:

    DIM_DATE. DATE = TRUNC (FACT_A.FINISH_DATE)


    How can I achieve this at the level of the RPD? Yes, I can add a new column to the table of DW with truncated value, but I want to know why even though I chose the DATE as the type of data to the RPD, the created join does not have a trunk.


    Thank you


    Manish

    The physical layer shows this as a DATETIME column that to DATE, I have changed since I was only interested in the part of date.

    N ° bad idea. The physical layer of the RPD should show what the physical source. So if it isn't a DATE, don't pretend OBIEE is it. For the exact reason that you now - tap you are pregnant OBIEE to write some SQL magic to cast the data type, without even say things which is the original type. OBIEE will not interrogate the metadata in order to check the data types in the source, it will rely on what you tell it in the physical layer.

    How can I achieve this at the level of the RPD?

    You could use an inline view in the physical layer and make your trunc here I guess. Better, as you've already identified, is to store the date as a date if this is going to be a key column to reach.

    I want to know why even though I chose the DATE as the type of data to the RPD, the created join is not a trunk.

    See above. OBIEE does not know it is a DATETIME value, then why would he do a TRUNK?

Maybe you are looking for