DBFS in read-only tablespace as LOB archive solution

I am trying to come up with an architecture to solve the following requirement
1. transactions will have LOB attachments
2. Transactions will be live for short period of time, after which they will be 'closed'
3. all transaction details, including LOBs must be kept for minimum of 7 years
4. want to minimise backup requirements, so that we aren't backing up large amounts of basically static data.
Here is my proposed solution
1. table for the LOBs will be in the 'live' part of the database.
2. There will be a DBFS created in the database as DBFS SecureFiles Store
3. The tablespace holding the DBFS_SFS will be read-only.
4. Periodically (monthly?) the DBFS_SFS will be made read-write, the LOBs from closed transactions will be moved from the 'transactional LOB table' to the DBFS_SFS and replaced with DBFS Link
5. DBFS_SFS will be made read-only, and full database backup performed
6. subsequent backups will skip read-only, until the next iteration
have I missed anything that may prevent this from working?
phil

Thanks for the reply
Firstly, the app availability is expected to be 12x5, so the plan would be the full backup would be during the weekend, but I appreciate the issue re backup timing
What I would really like is if there were some way to have the DBFS SFS in a separate database, and register it as a hierarchical store, but there doesn't seem to be a way to do that. Even if I was able to write the appropriate DBFS Store Provider (a la the DBFS sample store at http://www.oracle.com/technetwork/database/application-development/522110) , you run up against the 32K limit of dealing with LOBs in a remote database (unless I have missed something somewhere)
Phil.

Similar Messages

  • Data warehouse backups and read only tablespaces

    Hi all,
    I am working on a data warehouse database with following specs:
    Version: Oracle 10.2.0.3 Enterprise
    OS: Solaris
    App: Data warehouse
    We use RMAN to take 'level 0' & 'level 1' backups. We have block change tracking enabled and RMAN backups up data files and archive logs straight to tape.
    I am exploring ways of reducing the 'level 0' backups and was specifically focussing on using read-only tablespaces for this purpose.
    I have often seen it mentioned that a best practice in D/Ws is to store the old static partitions of fact tables in read only tablespaces so as to reduce the backup size.
    In case you have already implemented such a scheme, I would like to know how you have implemented it.
    I am thinking of the following mechanism:
    -- Start using backups at tablespace level rather than 'level 0' at database level.
    -- Record the latest SCNs of all datafiles prior to back up.
    -- If the latest SCN has not changed since last backup and the tablespace is in read only mode then
    -- Check if a backup copy of the tablespace has been done within the recovery window and is accessible.
    -- If the copy exists then don't backup that tablespace, else backup the tablespace.
    -- If the tablespace is read/write then back it up.
    I haven't delved into the low level details, but this seems to be lot of work. So just wanted to know from you if there's any ready made feature which makes all this easier.
    Many thanks in advance.

    Thank you so much for your help.
    Backup optimization was indeed the thing I was looking for. To be honest I had done a bit of RTFM, but I didn't check the advanced user guide.
    Although my specific question has been answered, it would be interesting to know what other things other people are implementing to reduce backups etc.
    I am also thinking of following options:
    -- Turn on index monitoring to get rid of unused indexes.
    -- Stop the backups of 'index' tablespaces.
    -- Archive off old data.
    Any other ideas for reducing DW backup size?
    Many thanks.

  • Read Only Tablespace Backup Issue

    Hii!!
    I had been trying to to take Read Only Table space Backup. So, firstly changed the tablespace using
    SQL> alter tablespace users read only;
    Tablespace altered.
    2. Then took backup of all the data files using OS Copy command.
    Now , the issue i am facing is that can i change the table space to read_write mode???? If yes , then how?? , plz help...

    I had been trying to to take Read Only Table space Backup. So, firstly changed the tablespace using
    SQL> alter tablespace users read only;
    Tablespace altered.
    2. Then took backup of all the data files using OS Copy command.
    Now , the issue i am facing is that can i change the table space to read_write mode???? If yes , then how?? , plz help...Yes you can do,
    SQL> alter tablespace users read write;After successful restore,
    sys@11GDEMO> select tablespace_name,status from dba_tablespaces where tablespace_name='CKPT';
    TABLESPACE_NAME                STATUS
    CKPT                           ONLINE
    sys@11GDEMO> alter tablespace ckpt read only;
    Tablespace altered.
    sys@11GDEMO> select tablespace_name,status from dba_tablespaces where tablespace_name='CKPT';
    TABLESPACE_NAME                STATUS
    CKPT                           READ ONLY+
    sys@11GDEMO> alter tablespace ckpt read write;+
    Tablespace altered.
    sys@11GDEMO> select tablespace_name,status from dba_tablespaces where tablespace_name='CKPT';
    TABLESPACE_NAME                STATUS
    CKPT                           ONLINE+
    sys@11GDEMO>
    Edited by: CKPT on Jul 6, 2011 11:22 AM

  • Backing up database with read-only tablespaces

    I am trying to develop a script that will dynamically build RMAN scripts for backing up
    a database with read-only tablespaces. The application running on this database creates
    new tablespaces in read-write mode on weekly basis, populates them, and then puts them in read-only mode. So I need to backup all read-write tablespaces plus take backup of all read-only tablespaces once. The problem is that the application also includes a process that puts a tablespace back into read-write mode, updates it, and puts it back into read-write mode. So I need to be able to access "a history" of the tablespace - when was it put into read-only mode - to compare it with a history of backups. While history of backups is available in RMAN views, I couldn't find any way to extract tablspaces
    history.
    There should be RMAN command to the effect
    "backup all read-write tablespaces and read-only tablespaces if they have not been backed up at least once since becoming read-only".
    Regards,
    Sev
    null

    just rsync the files to a compressed Zpool. do this using shadow migration, and you only loose access to the data for a few seconds.
    1) make new dataset with compression
    2) enable shadow migration between the new and old
    3) change the database to use the new location
    4) watch as data is automatically copied and compressed :-)
    the the down side, you need extra space to pull the off.

  • How to backup read only tablespace in rman

    Hi,
    I am using oracle 10gR2 in solaris 10.
    I am taking Rman full backup using catalog.
    My target database have 5 datafiles, in that one datafile is in read only mode.
    When I issue the backup command in rman. it takes only 4 datafiles. its not taking the readonly datafile.
    I want to take backup of all 5 datafiles.
    kindly help me..
    Many Thanks

    My target database have 5 datafiles, in that one datafile is in read only mode.I presume that you mean to say that 1 Tablespace consisting of 1 datafile is Read Only.
    What does SHOW ALL in RMAN present ?
    If you have BACKUP OPTIMIZATION set to ON, the Read Only Tablespace will not be backed up after the first backup.
    You could still explicitly backup the tablespace with a BACKUP TABLESPACE tablespacename; , although a BACKUP DATABASE would exclude it.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com
    Edited by: Hemant K Chitale on May 3, 2010 12:02 AM

  • I want to use ZFS filesystem compression on a history database with read-only tablespaces.  What is the best way to get the datafiles compressed?

    I have 5 history databases that total about 2.2 Terabytes. They use about 15 filesystems, but I can start with 2 that are isolated to only one database.  I have asked for ZFS compression to be set on the filesystems, but since these are read-only tablespaces, I do not think any compression will happen.  Can I simply offline, copy and rename the files from one filesystem to the other to make the compression happen?

    just rsync the files to a compressed Zpool. do this using shadow migration, and you only loose access to the data for a few seconds.
    1) make new dataset with compression
    2) enable shadow migration between the new and old
    3) change the database to use the new location
    4) watch as data is automatically copied and compressed :-)
    the the down side, you need extra space to pull the off.

  • Why r we not use tablespce begin backup with read only tablespace

    why r we not use tablespce begin backup with read only tablespace

    Please learn English prior to posting. The schools in India are not that bad!
    Please RTFM.
    Please stop asking doc questions at lightning speed.
    Please go figure
    Sybrand Bakker
    Senior Oracle DBA

  • Tablespace read only fails

    Hi,
    10gR2 on Solaris10
    There is a data  tablespace  that resists turning it into read only tablespace.
    How to find what session is holding locks on objects within that tablespace?
    Thx,

    There are some attempt here:
    select bl.INST_ID, bl.sid, bl.TYPE, bl.LMODE,bl.REQUEST,s.USERNAME
    from GV$GLOBAL_BLOCKED_LOCKS bl, gv$session s
    where bl.INST_ID=s.INST_ID and bl.SID=s.sid;
    INST_ID   SID TY      LMODE    REQUEST USERNAME
             3   186 PS          4          6 USERWEB1
             3   376 PS          4          0 USERWEB1
    select o.name object_name, u.name owner, lid.*
      from (select
      2    3                 s.inst_id, s.sid, s.serial#, p.spid,nvl (s.sql_id, 0), s.sql_hash_value,
      4                 decode (l.type,
      5                         'tm', l.id1,
      6                         'tx', decode (l.request,
      7                                       0, nvl (lo.object_id, -1),
      8                                       s.row_wait_obj#
                           -1
      9   10   11                        ) as object_id,
    12                   l.type lock_type,
    13                 DECODE (l.lmode,
    14                         0, 'NONE',
    15                         1, 'NULL',
    16                         2, 'ROW SHARE',
                           3, 'ROW EXCLUSIVE',
    17   18                         4, 'SHARE',
    19                         5, 'SHARE ROW EXCLUSIVE',
    20                         6, 'EXCLUSIVE',
    21   22                        ) mode_held,
                   DECODE (l.request,
    23   24                         0, 'NONE',
    25                         1, 'NULL',
    26                         2, 'ROW SHARE',
    27                         3, 'ROW EXCLUSIVE',
    28                         4, 'SHARE',
    29                         5, 'SHARE ROW EXCLUSIVE',
    30                         6, 'EXCLUSIVE',
    31                         '?'
    32                        ) mode_requested,
    33                 l.id1, l.id2, l.ctime time_in_mode,s.row_wait_obj#, s.row_wait_block#,
    34                 s.row_wait_row#, s.row_wait_file#
    35            from gv$lock l,
    36                 gv$session s,
    37                 gv$process p,
    38                 (select object_id, session_id, xidsqn
    39                    from gv$locked_object
    40                   where xidsqn > 0) lo
    41           where l.inst_id = s.inst_id
               and s.inst_id = p.inst_id
    42   43             and s.sid = l.sid
    44             and p.addr = s.paddr
    45             and l.sid = lo.session_id(+)
    46             and l.id2 = lo.xidsqn(+)) lid,
    47         SYS.obj$ o,
           SYS.user$ u
    48   49   WHERE o.obj#(+) = lid.object_id
    50   AND o.owner# = u.user#(+)
    51   AND object_id <> -1;
    no rows selected
    SELECT username U_NAME, owner OBJ_OWNER,
      2  object_name, object_type, s.osuser,
      3  DECODE(l.block,
      4    0, 'Not Blocking',
      1, 'Blocking',
      5    6    2, 'Global') STATUS,
      7    DECODE(v.locked_mode,
      8      0, 'None',
      9      1, 'Null',
    10      2, 'Row-S (SS)',
    11      3, 'Row-X (SX)',
    12      4, 'Share',
    13      5, 'S/Row-X (SSX)',
    14      6, 'Exclusive', TO_CHAR(lmode)
    15    ) MODE_HELD
    16  FROM gv$locked_object v, dba_objects d,
    gv$lock l, gv$session s
    17   18  WHERE v.object_id = d.object_id
    19  AND (v.object_id = l.id1)
    20  AND v.session_id = s.sid
    21  ORDER BY username, session_id;
    no related users or tables
    SELECT SUBSTR(TO_CHAR(w.session_id),1,5) WSID, p1.spid WPID,
    SUBSTR(s1.username,1,12) "WAITING User",
      2    3  SUBSTR(s1.osuser,1,8) "OS User",
      4  SUBSTR(s1.program,1,20) "WAITING Program",
      5  s1.client_info "WAITING Client",
      6  SUBSTR(TO_CHAR(h.session_id),1,5) HSID, p2.spid HPID,
      7  SUBSTR(s2.username,1,12) "HOLDING User",
      8  SUBSTR(s2.osuser,1,8) "OS User",
      9  SUBSTR(s2.program,1,20) "HOLDING Program",
    10  s2.client_info "HOLDING Client",
    11  o.object_name "HOLDING Object"
    12  FROM gv$process p1, gv$process p2, gv$session s1,
    13  gv$session s2, dba_locks w, dba_locks h, dba_objects o
    14  WHERE w.last_convert > 60
    15  AND h.mode_held != 'None'
    16  AND h.mode_held != 'Null'
    17  AND w.mode_requested != 'None'
    18  AND s1.row_wait_obj# = o.object_id
    19  AND w.lock_type(+) = h.lock_type
    20  AND w.lock_id1(+) = h.lock_id1
    21  AND w.lock_id2 = h.lock_id2
    22  AND w.session_id = s1.sid
    23  AND h.session_id = s2.sid
    24  AND s1.paddr = p1.addr
    25  AND s2.paddr = p2.addr
    26  ORDER BY w.last_convert DESC;
    no related objects

  • Is there any performance value to making a tablespace READ ONLY?

    In 9i, if I were to set a tablespace which only contains data to be reported over - is there any value in making it READ ONLY other than "safety" of the data? I am particularly interested to know if it can increase performance.
    Thanks

    When you say safety, you are partly correct, because data cannot be deleted, but it can be dropped, check the below SQL statements.
    With regard to performance, yes you will gain some. For better performance while accessing data in a read-only tablespace, you can issue a query that accesses all of the blocks of the tables in the tablespace just before making it read-only. A simple query, such as SELECT COUNT (*), executed against each table ensures that the data blocks in the tablespace can be subsequently accessed most efficiently. This eliminates the need for Oracle to check the status of the transactions that most recently modified the blocks.
    http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96521/tspaces.htm#922
    SYS@BABU> create tablespace test_ts datafile 'D:\ORACLE\ORADATA\TEST_TS1.DAT' SIZE 15M
      2  EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;
    Tablespace created.
    SYS@BABU> CREATE TABLE TAB1 (A NUMBER) tablespace test_ts ;
    Table created.
    SYS@BABU> BEGIN
      2  FOR A IN 1..10 LOOP
      3  INSERT INTO TAB1 VALUES (A);
      4  END LOOP;
      5  COMMIT;
      6  END;
      7  /
    PL/SQL procedure successfully completed.
    SYS@BABU> ALTER TABLESPACE test_ts READ ONLY;
    Tablespace altered.
    SYS@BABU> DELETE FROM TAB1;
    DELETE FROM TAB1
    ERROR at line 1:
    ORA-00372: file 6 cannot be modified at this time
    ORA-01110: data file 6: 'D:\ORACLE\ORADATA\TEST_TS1.DAT'
    SYS@BABU> truncate table TAB1;
    truncate table TAB1
    ERROR at line 1:
    ORA-00372: file 6 cannot be modified at this time
    ORA-01110: data file 6: 'D:\ORACLE\ORADATA\TEST_TS1.DAT'
    SYS@BABU> DROP TABLE TAB1 ;
    Table dropped.

  • Slightly off topic: Read-only tables pre 11g

    Hi gang
    I'm just writing up a database quiz for a local user group and I was hoping I could get a bit of inspiration from the database experts.
    One of the questions will be "prior to 11g with the introduction of read-only tables, how could you make a table read-only?". The answers I've come up with:
    1) Security priviliges (schema + grant SELECT)
    2) Triggers
    3) Create a check constraint with disable validate
    4) Read-only tablespace
    5) Read-only database (standby)
    6) (Slightly crazy) Create view, and instead-of triggers that do nothing (similar to 2)
    7) Write the query results on a piece of paper and then turn the database off
    Anybody have any other answers, real or slightly off topic like mine please? ;)
    Cheers,
    CM.

    Check constraint and trigger solutions may have problems with sqlldr direct path operations, so using it together with alter table disable lock may be mandatory depending on the needs. Especially if DDLs are also wanted to be avoided.
    This topic was once mentioned on Tom Kyte's blog or asktom but I couldn't find the source to link here.
    SQL> conn hr/hr
    Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
    Connected as hr
    -- cleaning objects
    SQL> drop table tong purge ;
    Table dropped
    SQL> drop view vw_tong ;
    View dropped
    -- creating the demo table
    SQL> create table tong ( col1 number ) ;
    Table created
    SQL> alter table tong add constraint cc_tong check ( 1=0 ) disable validate;
    Table altered
    SQL> alter table tong disable table lock;
    Table altered
    -- some DDL tests
    SQL> drop table tong ;
    drop table tong
    ORA-00069: cannot acquire lock -- table locks disabled for TONG
    SQL> truncate table tong ;
    truncate table tong
    ORA-25128: No insert/update/delete on table with constraint (HR.CC_TONG) disabled and validated
    SQL> alter table tong parallel ;
    alter table tong parallel
    ORA-00069: cannot acquire lock -- table locks disabled for TONG
    SQL> lock table tong in exclusive mode ;
    lock table tong in exclusive mode
    ORA-00069: cannot acquire lock -- table locks disabled for TONG
    -- some DML tests
    SQL> select * from tong ;
          COL1
    SQL> update tong set col1 = col1 + 1 ;
    update tong set col1 = col1 + 1
    ORA-25128: No insert/update/delete on table with constraint (HR.CC_TONG) disabled and validated
    -- creating dependent objects test
    SQL> create index nui_tong on tong(col1) nologging ;
    Index created
    SQL> create view vw_tong as select * from tong ;
    View created
    added comments to the code
    Message was edited by:
    TongucY

  • Grant read only-rights to own schema

    Hallo,
    i have a schema (and i am the owner) of schema bbi. Now I wanna give to me read-only- rights. Is this possible? What ist the sql-query to give this rights to bbi? Which rights do I have as the owner of a schema? Which tables are nessasary?
    Hope I do not mix anything!!
    Thanks, Katrin

    One possible way would be to put your table into an
    read-only tablespace, but then no one could update
    it.Although the owner can still drop tables in a read-only tablespace (since that only involves updating entries in the data dictionary).
    I'd second Andrew's question about why you'd want to do this. Normally, you would have one user that owned all the objects and grant many other users read-only access to that schema.
    Justin

  • Can I make a LOB segment tablespace 'READ ONLY' so no backup?

    Greetings
    Environment: Oracle 11.2.0.3 on Solaris 10.5
    LOB newbie here.
    I am currently supporting a database, but not the application, that is loading fairly large XML files into CLOB columns. Today I have 121 LOBSEGMENTs taking up about 1GB of space and in the same tablespace as the owner table.
    I understand that the CLOB data will not be changing that often.
    My issue is now my RMAN backup is much larger and is filling the mount point where the backup files are stored.
    I'd like to move the LOBSEGMENT objects to a different tablespace, back it up once and mark the tablespace as READ ONLY so it doesn't get backed up every time.
    I am currently doing a full database backup every day and archivelog backups every 4 hours.
    Can I use something like: ALTER TABLE 'X' MOVE LOB 'Y' STORE AS TABLESPACE 'Z' ?
    Is it then possible to alter the 'Z' tablespace to READ ONLY and not affect the user's ability to update the other parts of the table?
    Other alternatives are most welcome!!
    Thanks very much!!
    -gary

    Thanks for the quick response.
    I don't want you to give up, I'd just like some advice from your experience.
    Even though I am working in a test environment I was hesitant to execute the above commands so as not to cause the application to fail as the user is loading the XML data.
    I want the tablespace storing the LOBSEGMENTs to be READ ONLY but I wasn't sure if I could specify just the LOBSEGMENT part of a row to be READ ONLY without causing update problems for the other columns in the table.
    I realize the new LOBSEGMENT tablespace will be READ ONLY and the original tablespace with the rest of the data will remain READ WRITE.
    Also, I'm assuming if the CLOB data ever needs to change I should be able to alter the tablespace back to READ WRITE, have the user make the changes, be sure the new data is backed up and alter the tablespace back to READ ONLY.
    Is this how you would handle the situation?
    Thanks very much!
    -gary

  • Read Only access to tablespace

    Hi,
    Oracle 10.2.0.4
    How can I grant read only access to a tablespace for a user.
    Thanks

    It is no ussual.... a tablespace is a box where one or more user store his data... sure you do not want to say user and not tablespace?
    Grant select to the objects of this tablespace...DBA_TABLES or ALL_TABLES...
    Select 'GRANT SELECT ON ' || OWNER || '.' || TABLE_NAME || ' TO <USERNAME> ' FROM DBA_TABLES WHERE TABLESPACE_NAME = <TABLESPACE>

  • Unable to Make tablespace Read Only in 10g

    Hi All,
    I am using Oracle database 10g R2 (10.2.0.3) on AIX 5.3 platform. Our database is using ASM based storage.
    I am trying to make a tablespace read only but its not returning the command once I execute that.
    I have checked the sessions status and confirmed that no user is writing/reading the tablespace. The tablespace is having 150GB size and having only one table in it.
    I had given following command using sys user.
    alter tablespace SMS_DATA read only;
    However this command was kept running for three hours before I kill that. I have tried to take another tablespace off-line and have face same situation.
    Can any one tell me why this simple task is unable to complete.
    PS: My database is working fine and user are running queries and getting results in desired time.
    Regards
    Farooq

    Hi,
    I have diagnosed the problem by running v$transaction commands and found that one transaction is running since morning.
    FKHALID>SELECT SES_ADDR, START_SCNB,START_TIME FROM V$TRANSACTION ORDER BY START_SCNB;
    SES_ADDR START_SCNB START_TIME
    07000004C63E69E0 515936552 09/01/09 08:41:16
    07000004C937FB20 590533316 09/01/09 20:16:02
    07000004C639E360 590777564 09/01/09 20:20:42
    07000004C5346740 590860241 09/01/09 20:22:41
    07000004D23B86E8 590863096 09/01/09 20:22:46
    FKHALID@PAKEDWP>SELECT SQL_TEXT, SADDR FROM V$SQLAREA,V$SESSION WHERE V$SQLAREA.ADDRESS = V$SESSION.SQL_ADDRESS AND SQL_TEXT LIKE 'alter tablespace%';
    SQL_TEXT SADDR
    alter tablespace SMS_DATA read only 07000004C937FB20
    this shows that sess_addr (07000004C63E69E0) is creating the problem as my command is waiting for completion of this command.
    Now I have joined the view with v$session and have found the sid.
    SELECT a.sid,a.serial#, a.username, b.xidusn, b.used_urec, b.used_ublk ,b.ses_addr FROM v$session a, v$transaction b WHERE a.saddr = b.ses_addr;
    After killing that process, I was able to change the status of tablespace successfully.
    Thanks for your prompt response.
    Regards
    Farooq
    Edited by: Fkhalid on Sep 1, 2009 7:34 PM
    Edited by: Fkhalid on Sep 1, 2009 7:44 PM

  • Which table shows the tablespace in read-only mode or read-write mode.

    HI All,
    Can someonoe help me out to find which table shows whether the a tablespace is in Read-only mode or Read-write.
    Thanks,
    naveen

    Try this:
    select tbl.table_name, tb.tablespace_name, TB.STATUS from dba_tablespaces tb, dba_tables tbl
    where TB.TABLESPACE_NAME = tbl.TABLESPACE_NAME and TB.TABLESPACE_NAME = 'YOUR_TABLESPACE_NAME' and tbl.table_name = 'TABLE_NAME'

Maybe you are looking for

  • Purchse Order Text using SECATT

    Dear all I am using SECATT for material master uploading. I want to upload Purchase Order Text using SECATT Please suggest me how can  I upload same using SECATT. Vipin

  • Hp f4440 won't print offline

    My hp F4440 scanner/printer will not print when I am offline.  When I click on "print", the print job is added to the que but does not print.  I am certain this is an easy fix, I just can't seem to find it.  It sits there in the que until I print som

  • GR non valuated help

    hello to all, Good day. I have an issue with GR non valuated being ticked in a PO.  I have one user request to have this field unticked.  But based on checks done, seems that the PO has already been GR/IR.  Can you still proceed with unticking the ch

  • Maximum character length of user id (UID)

    hello i have couple questions about sunone directory (1) what is the max length of UID i can have? (2) where can i find the development (programmer's ) guide to find such information? thank you,

  • My font on my yahoo homepage is so small it's almost unreadable how do i fix this?

    my homepage is so small it is almost unreadable. when I open up my email it is so small I can't read it. How can I fix this?