Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

remove AUDIT table from SYSTEM TABLESPACE

Status
Not open for further replies.

tekpr00

IS-IT--Management
Jan 22, 2008
186
CA
Hello,
I was wondering how could one safely remove a SYS.AUD$ table from SYSTEM tablespaces.
1) is there a move_table command that one can use from one tablespace to the other. OR
2)create table AS select statement will work and then drop SYS.AUD in the SYSTEM tablespace.

My question is which one will require no downtime on the database.
 

Connect as sysdba, then you would need to not only move the table, but also the LOB storage as well.
[3eyes]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 

PS: For option 1, Try something like this:
Code:
ALTER TABLE sys.aud$ MOVE TABLESPACE  sysaux;

ALTER TABLE sys.aud$ MOVE
LOB (sqlbind) STORE AS (TABLESPACE  sysaux)
LOB (sqltext) STORE AS (TABLESPACE  sysaux);

ALTER INDEX sys.i_aud1 REBUILD TABLESPACE sysaux;

For option 2 (unless you want to keep the data in AUD$), you could just drop and re-create the table.
[noevil]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Thanks for your input.
Can this be done while the database is online.
Is this going to put the SYSTEM tablespace(source) off line
 

Yes, it can be done while db is online.
[thumbsup2]

----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
I created the target tablespace as AUDIT_TBS with about 250M in size.

I used the command
ALTER TABLE sys.aud$ MOVE TABLESPACE AUDIT_TBS.

IT came down with an error -
ORA-01652: unable to extend temp segment by 1048 in tablespace AUDIT_TBS.

Remember, the target tablespace is 250M and the size of sys.aud$ is only 60K.

I have reserched the error and every suggestion is to increase AUDIT_TBS. But it already has more than enough.
 

tekpr00 said:
Remember, the target tablespace is 250M and the size of sys.aud$ is only 60K.

How do you know it's 60K? How much is allocated (as opposed to used)? What about the CLOB storage allocated (as opposed to used)?

What about your AUDIT_TBS tablespace, is it locally managed? What space management? Uniform extents? Initial extent? etc...

If there are no rows (you want to keep) in the SYS.AUD$ table, then just drop it and re-create in the new tablespace.
[thumbsdown]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 

PS: Did you create AUDIT_TBS as TEMPORARY TABLESPACE????

tekpro00 said:
ORA-01652: unable to extend temp segment by 1048 in tablespace AUDIT_TBS.

That is a No-no, you need permanent tablespace (DUH!).
[mad]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
It was created as permanent tablespace.(duh!)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top