table to a different tablespace to audit and return

How to make sys.aud$ table of audit in another tablespace and moving back step by step, including the index log segment?

is - anyone of you has scripts?

You can follow this steps and the upper part of this use your own common sense-

(1) find the audit settings
SELECT name, value of the parameter $ v whose name like '% audit_trail % '.
If true, then size can be quite large

(2) find the size
Select nom_segment, nom_tablespace, bytes/1024/1024 SIZE_MB, owner of dba_segments where nom_segment = '$ AUD.

(3) find the existing table
Select * from dba_indexes where table_name = '$ AUD.
Select * from dba_tables where table_name = '$ AUD.

4)
CREATE TABLESPACE mytest DATAFILE «...» ' SIZE 100M AUTOEXTEND ON EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTOALLOCATE AUTO;

(5) move now
ALTER table sys.aud$ move tablespace mytest;
ALTER table sys.aud$ move lob (sqlbind, sqltext) store as lobsegment (tablespace mytest);
ALTER index... rebuild mytest tablespace online;

(6) now move if necessary
ALTER table sys. AUD$ ' move tablespace system;
ALTER index... rebuild online tablespace system;

(8) optional for drop tablespace
Drop tablespace mytest, including data files;

Thank you
Kerry

Tags: Database

Similar Questions

  • Index rebuild after moving table to a different tablespace?

    Index rebuild after moving table to a different tablespace?

    Oracle-Meng wrote:

    Index rebuild after moving table to a different tablespace?

    Only if you want to reuse.

    See DBA guide

    http://docs.Oracle.com/CD/B28359_01/server.111/b28310/tables006.htm#i1106606

    Pass an array to a new Segment or a Tablespace

    Move a table changes the ROWID of the rows in the table. This causes the indexes on the table to be marked UNUSABLE , and DML, access the table using these clues you will receive an ORA-01502 error. The indexes on the table must be deleted or rebuilt. Similarly, all the statistics in the table become invalid and new statistics should be collected after the removal of the table.

  • Move the tables to a different tablespace

    Hello
    I created 6 tables with my account in the USERS tablespace. If users wish to access (and he has privileges), it can be accessed as - username.nameoftb.
    Now, I would like to create new tablespace, move there all the USERS tablespace tables and if someone (who has permissions) to have access, it can, but only with the table name. Without using the username who created them.

    Could you please help me, how to proceed?
    -move the tables to a different tablespace
    -users can access without using the name of the creator

    Thank you!

    1. change the SMSC table. ERSUSERWISESUMMARY move tablespace ERST_01 nologging;

    Can also rebuild the indexes as well.

    ALTER Index SMSC. INDX_ERSDATA_STRTTIME reconstruction tablespace ERSX_01 nologging;

    2 create a synonym for this object

    create public synonym mrbt_activation for owner_name.object_name;

    Concerning
    Asif Kabir

  • Is it possible to move a subset of a table to a different tablespace?

    Hello again,

    We are planing to remove old data in our database.

    When we did the last time that we did something like this:
    remove the table so xy date timestamp < DATE; -date is a special code, all data before should be deleted.

    To is a bit more complex there is a cascade constraint (?) in the child table that will be deleted when the parent in xy row is removed.

    Due to the amount of data that will be deleted our DBAs had much to do with the logs (redo and archive) switching in the past.
    Now our DBAs fact the suggestion to move the data, will, which should be deleted, to a different tablespace (new). After you have moved the new tablespace should be deleted.
    I understand our DBAs want to reduce it again or archive newspapers.

    But is it really possible to move only the selected rows of a tablespace to another? I have found that tutorials to move an entire table.


    Thanks in advance
    Andreas

    Andreas S. wrote:

    But is it really possible to move only the selected rows of a tablespace to another? I have found that tutorials to move an entire table.

    Partitioned tables, Yes. The non partitioned tables, no *.

    * There are hacks that could be considered in an attempt to force the movement of the line of a tablespace to another, but these are ugly, nasty and all simply horrible - and is not reliable either.

  • Adding images to a table with a different number of rows and columns

    I get images from PC file in labview table... I can specify the number of columns and get a picture with the size of the column, but must continue to put images in the table until the size of line is filled.  My goal is to have the pictures in the folder to be a 37-49 lines columns... Unfortunately the berries stops (see VI) until all the images are introduced in my table... How can I keep having these columns add pictures until all lines are met (and all the images are filed in the new array)?

    Hi Lynn:

    I changed my index of 49 x 49, give my columns entry 37... then all the images appear.  Thanks for your help. Kudos to you...

  • How to move a LOB to a different tablespace

    Hello
    I have a PRODUCT table where one of its fields is a LOB.
    The table has been created the TBL1 tablespace and Lob his field to a tablespace dedicad TBL_LB1
    I have to move the table to a different tablespace.
    The statement that I would use is

    ALTER TABLE PRODUCT MOVE TABLESPACE storage TBL2 (initial then the 4M 4 M);

    Can you tell me how to write the statement to move the Lob field to the new tablespace TBL_LB2?
    I don't know what syntax to use to move the Lob of TBL_LB1 to TBL_LB2 field

    Thank you

    Published by: user12180597 on 14-Dec-2009 6.20

    Hello

    Something like that

    ALTER TABLE Product
        MOVE LOB() STORE AS (
            TABLESPACE TBL_LB2
        )
    

    Concerning
    Anurag

  • CREATE TABLE to another OWNER/SCHEMA and in a different TABLESPACE?

    I am connected to a user of the SYSTEM. Now, I want to create a table of aaa. The owner of this table should not be SYSTEM but user KARL. and STORAGE space should not be SYSTEM but the tdtc TABLESPACE (existing).

    As far as I know I can do this by running the following command:

    CREATE TABLE KARL.aaa (an INTEGER,...) Tttt TABLESPACE;

    Regarding the TABLESPACE parameter, I'm not sure. Is it possible to return a user Karl TABLE in a TABLESPACE that is not assigned to him?

    In addition, I have another problem.
    I have a script with hundreds of CREATE TABLE, ALTER TABLE + CREATE INDEX DDL statements.
    Each of them are not prefixed with schema/owner and a TABLESPACE clause.

    I can put a single statement at the top of the script somehow that such Oracle
    to use
    -Karl OWNER as a schema/owner for all DDL stements
    -Thomas TABLESPACE as TABLESPACE for all DOF stements
    ?

    In MYsql, there is a statement «use < database >» Is soemthing similar to Oracle?

    Thank you
    Peter

    Yes... you can do. For example, a user who has a secret password that you do not want to give... as a schema of the application. User B needs to make paintings/objects in A schema and you want to follow this as user B. First configure Oracles Fine grain auditing and then grant "connect via" user A to user B as follows:
    -----

    SQL> create user b identified by abc123
      2    quota unlimited on users;
    
    User created.
    SQL> grant create session to b;
    
    SQL> create user a identified by abc123
      2    quota unlimited on users;
    
    User created.
    
    SQL> grant create table
      2      , create session
      3     to a;
    
    Grant succeeded.
    
    SQL> alter user a grant connect through b;
    
    User altered.
    
    SQL> connect b[a]/abc123@a486
    Connected.
    
    SQL> show user
    USER is "A"
    SQL> create table a.my_proxy_table
      2  ( c1 number
      3  , c2 varchar2(50)
      4  , c3 date
      5  );
    
    Table created.
    

    -----
    See I have connected using the syntax "username [proxyuser]." Also note that user B is by proxy user has, as evidenced by my order 'show user '. The connection through can be granted/revoked as needed without disclosing A goes to B. In addition, your audit tables or xml logs will follow the fact that user B created the table a.my_proxy_table.

    Hope this helps,
    John

  • After spending tables and index a different tablespace, index got unusable?

    Hello

    I moved to table and index a different tablespace. After the many indices obtained unusable. I did not understand thiis?

    How can I do still usable?

    best regards and thank you?

    If you bâtait the index (after moving the table, by the way), then they should be usable without something extra to see.
    Check this procedure only one (small) table and index if this index can be used later. If not, then you have a mystery :-)

    Kind regards
    Uwe Hesse

    http://uhesse.WordPress.com

  • Penetrating the table $ FGA_LOG a new tablespace in 10.2.0.1

    Hi all
    I want to penetrating a tablespace of the table again to $ FGA_LOG
    Unfortunately, we are in version 10.2.0.1

    I know that there is a patch to the 10.2.0.3

    I don't want to just move it manually, should I?
    or I can always install the patch 6989148 of 10.2.0.3
    on my 10.2.0.1

    Thank you

    See this Metralink Note:-72460.1

    Oracle stores audit trail records in a single table, "SYS. AUD$ ', being a dictionary database table, it is not supported to change.» However, it is supported to change the settings for storage by default (except INITIAL) in 'SYS. AUD$.

    By changing the 'SYS. AUD$ "storage settings, the table can grow as big as you want, but only within the space of SYSTEM tables. The Oracle8i / Oracle9i Administrator's Guide covers ways to manage this growth in the SYSTEM tablespace, but without the added flexibility provided by moving 'SYS. AUD$ "to a different tablespace.

    The following script allows to move the 'SYS. AUD$ "table out of the storage SYSTEM and the SYS to the user of the SYSTEM (although it could be any other user).

    1. start the database with:

    AUDIT_TRAIL = none

    2. run the following in Sqlplus:
    connect sys /.

    create the table system.aud$
    tablespace
    As select * from aud$;
    create index system.i_aud1 on system.aud$ (sessionid, its$ tid);

    AUD$ and rename aud$ _temp;
    create view aud$ in select * from system.aud$;

    Connect the system.

    grant all on aud$ sys with the option grant.
    Grant delete on aud$ to delete_catalog_role;

    3. restart the database with:

    AUDIT_TRAIL = DB

    4 re-create the views of data for checking dictionary:

    connect sys /.
    @%ORACLE_HOME%/rdbms/admin/cataudit.sql

  • How to move partitions/sub-sub-partitions in a different tablespace?

    Hi Uisng oracle 1.20.3 and have a partitioned table using partitioning of the interval range-hash - code below.

    Works great just one problem.

    We want to move that geneerated system partitions to different storage spaces later and also rename epartitions th.

    Assign the partition to a different tablespace get the following message when you try

    ALTER table move partition tablespace bi_dw_data SYS_P2283 por_rt

    Get message ora-14257 - cannot move one partition other than the range, list, system or a hash partition.

    How we avoid this.

    Us that we must go first all subparts?

    Tried this

    modify subpartition of moving table SYS_SUBP2269 tablespace bi_dw_data;

    but get the statement not valid message message ora-01735
    -- Create table
    create table POR_RT
    (
      plant_issue_id    NUMBER not null,
      pf_run_num        NUMBER,
      partitioning_date DATE
    )
    partition by range (PARTITIONING_DATE)
    subpartition by hash (PLANT_ISSUE_ID)
    (
      partition PART_200912 values less than (TO_DATE(' 2010-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        tablespace BI_SUPPORT_DATA
        pctfree 10
        initrans 1
        maxtrans 255
      (
        subpartition SYS_SUBP2261 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2262 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2263 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2264 tablespace BI_SUPPORT_DATA
      ),
      partition PART_201001 values less than (TO_DATE(' 2010-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        tablespace BI_SUPPORT_DATA
        pctfree 10
        initrans 1
        maxtrans 255
      (
        subpartition SYS_SUBP2265 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2266 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2267 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2268 tablespace BI_SUPPORT_DATA
      ),
      partition SYS_P2273 values less than (TO_DATE(' 2010-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        tablespace BI_SUPPORT_DATA
        pctfree 10
        initrans 1
        maxtrans 255
      (
        subpartition SYS_SUBP2269 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2270 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2271 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2272 tablespace BI_SUPPORT_DATA
      ),
      partition SYS_P2283 values less than (TO_DATE(' 2010-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        tablespace BI_SUPPORT_DATA
        pctfree 10
        initrans 1
        maxtrans 255
      (
        subpartition SYS_SUBP2279 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2280 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2281 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2282 tablespace BI_SUPPORT_DATA
      ),
      partition SYS_P2278 values less than (TO_DATE(' 2010-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        tablespace BI_SUPPORT_DATA
        pctfree 10
        initrans 1
        maxtrans 255
      (
        subpartition SYS_SUBP2274 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2275 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2276 tablespace BI_SUPPORT_DATA,
        subpartition SYS_SUBP2277 tablespace BI_SUPPORT_DATA
      )
    );
    Published by: user5716448 on March 22, 2013 04:49

    You cannot move the parition composite directly, you must move subpartition this usings

    ALTER table move subpartition tablespace ;

    changing the partition using tablespace

    ALTER TABLE.

    CHANGE the DEFAULT ATTRIBUTES FOR the PARTITION TABLESPACE ;

  • Move objects with BLOBs to a different tablespace

    Hello

    I have a tablespace that contains many objects from different schemas. Now I want to spend a single table and there is indication of this space to a different tablespace. This table contains BLOB data.
    How would I go to do this? Thank you.

    No index should be moved to the specific statement: for example, with ALTER INDEX REBUILD TABLESPACE .

  • How to put text user_datastore indexes in different tablespace

    I am trying to create a user_datastore text index in a different tablespacce

    I do not see a preference here:

    http://download.Oracle.com/docs/CD/B28359_01/text.111/b28304/cdatadic.htm#i1006810

    So I can't put it here:

    BEGIN
    ctx_ddl.create_preference ('event_store', 'user_datastore');
    ctx_ddl.set_attribute ('event_store', 'procedure', 'event_search_pkg.event_filter');
    ctx_ddl.set_attribute ('event_store', 'TYPE_SORTIE', 'CLOB');
    END;

    And if I try to put a different tablespace here I get an error:

    CREATE INDEX event_index ON events (index_col) INDEXTYPE IS ctxsys.context
    PARAMETERS ("event_store of the data store") TABLESPACE ENCRYPTED_TS

    Because I can't do it with a domain index. Put parameters doesn't work either:

    CREATE INDEX event_index ON events (index_col) INDEXTYPE IS ctxsys.context
    PARAMETERS ("datastore event_store
    storage ENCRYPTED_TS)

    Is there a way I can create an index of user_datastore using a different tablespace?

    First of all keep in mind the index itself can be assigned to a specific tablespace, but it's really irrelevant what the index itself does not store. It's the underlying tables to index such as DR$ indexname$ I,... $R, $X etc which occupy space and these can be assigned to specific storage using a [preference STORAGE | http://download.oracle.com/docs/cd/B28359_01/text.111/b28304/cdatadic.htm#i1008935].

    The fact that you are using a data user store makes no difference: it is the same for all types of data store.

  • Pass correctly index partition to a different tablespace

    Oracle Version: 10.2.0.3.0

    Hello

    I have a clue of sous-partitionnee - & gt; partitioned by range and sous-partitionnée of the list. I have to move the index to a different tablespace. I moved all the subparts successfully, but views of the index always show me references to former storage space.

    I moved all of the following subparts: ALTER INDEX MYINDEX REBUILD SUBPARTITION MYSUBPARTITION TABLESPACE NEWTABLESPACE;
    Now when I look at 'dba_segments' view corresponding index segments, they are correctly moved to the new tablespace.

    But,

    in the column 'def_tablespace_name' in view 'dba_part_indexes' value is always the old name of the tablespace.
    in the column 'nom_tablespace' in view 'dba_ind_partitions' value is always the old name of the tablespace.

    in the column 'nom_tablespace' in view 'dba_ind_subpartitions' value is correct, making reference to the new tablespace.

    What should I do to have these set correctly values (see dba_part_indexes and dba_ind_partitions)?

    I tried
    ALTER index rebuild partition mypartition tablespace newtablespace myindex;
    but I got the error:

    Error: ORA-14287
    Text: cannot REBUILD a partition of a Composite range partitioned index-
    Cause: The user attempted to rebuild a partition of a partitioned set of Composite
    index which is illegal
    Action: REBUILD the index partition, a subpartition at a time

    Thank you to



    Type of account

    St & eacute; phane

    Published by: user9928511 on March 13, 2009 11:29

    user9928511 wrote:
    Oracle Version: 10.2.0.3.0

    Hello

    I have an index-> partitioned by range and sous-partitionnée of the list subpartitioned. I have to move the index to a different tablespace. I moved all the subparts successfully, but views of the index always show me references to former storage space.

    I moved all of the following subparts: ALTER INDEX MYINDEX REBUILD SUBPARTITION MYSUBPARTITION TABLESPACE NEWTABLESPACE;
    Now when I look at 'dba_segments' view corresponding index segments, they are correctly moved to the new tablespace.

    But,

    in the column 'def_tablespace_name' in view 'dba_part_indexes' value is always the old name of the tablespace.
    in the column 'nom_tablespace' in view 'dba_ind_partitions' value is always the old name of the tablespace.

    Sub-parts are "segments" in your partitioned table. The scores are just a logical grouping of physical subpartitions. then of course, you can not rebuild and it will show the old man a tablespace name.

    def_tablespace_name can be changed with alter index:
    ALTER INDEX index-name DEFAULT ATTRIBUTES ALTER TABLESPACE nom_tablespace;

  • Compare multiple columns and return a different value

    I have more access to excel and I'm running my previous workflow in numbers of duplication of issues.

    I have a worksheet when a sheet with all my power tools.  On the "Power Tools" sheet I have columns for the brand, Type, model, purchase date, etc...  An example of this would be: pass a "DEWALT", "Jackhammer" Col B, Col C "DCD995M2" and so on.

    I have a second sheet in the same document which is my front end if you want.  I wanted to have selections for this dynamic drop-down list but it seems it is not possible without scripts, but is not the immediate question yet I'm the mention the case where someone knows a good fix.  The second sheet "Sorting Test", I created manually drop-down boxes, one in column A of the brand and the other in column B for Type.  I'll choose the brand and type and I want numbers autofill the rest of this line based on these two selections.

    Example:

    In the 'Sort Test' sheet I select DEWALT in column A and I select the drill in column B and I want DCD995M2 is displayed in column C and the purchase date in column D and so on.

    Excel in it would be a game table or something similar.  So far every site and search google only gave a lot of people who try to do VLOOKUP or correspond to errors, but I've really met anyone corresponding to two distinct cells from two separate columns and return data from this same line a match was found on.

    I must also mention I'm really trying to avoid adding a hidden line that combines some of these but I know it's the most noticeable work around.

    Basically, I want to match two selections separated against two separate columns, and when it finds the match, I want it returns a different value of this corresponding line how I got everything just copy this formula on adjacent cells and simply adjust to the column in the same row matched.

    I know that I shouldn't do this on separate sheets, but it's just a choice that I made a point of design.

    Any help would be appreciated, because I'm trying to really get the most out of the numbers, especially with how it syncs between desktop and mobile and I have more access to Excel.

    You can it as what you do and why?  This will help us understand what drives the design.  Leave out how to solve the problem,

    also post screenshots can be very useful

  • How can I import tables to a different schema in the relational model existing... to add these tables in the existing model? PLSS help

    How can I import tables from a different schema in the relational model... to add these tables in the existing relational/logic model? PLSS help

    Notes; I already have a schema ready relational/logic model... and I need to add more tables to this relational/logic model

    can I import the same way like I did before?

    But even if I do the same how can I add it in the template? as the logic model has been designed...

    Help, please...

    Thank you

    To view the diagram of logic model in Bachman notation, you right-click on a blank area of the diagram and select the rating > Bachman Notation.

    David

Maybe you are looking for