How to delete a large number of small trace files in oracle, oracletrace

Source: Internet
Author: User

How to delete a large number of small trace files in oracle, oracletrace

When files are deleted in batches on the AIX platform, the following error occurs:

Ksh:/usr/bin/rm: 0403-027 The parameter list is too long


Cause:
This is mainly because the AIX Kernel Parameter ncargs is controlled and the command line cache is limited.


Lsattr-El sys0-a ncargs
Ncargs 6 ARG/ENV list size in 4 K byte blocks True


Modify ncargs Value
Chdev-l sys0-a ncargs = 64
Sys0 changed



Solution:

<1> find./-name "*"-type f-exec rm {}\;


Batch Delete $ oracle_base/admin

<2> $ more rm_rc.sh
Files = 'LS-l/oracle/admin/$ ORACLE_SID/bdump | grep trc | awk {'print $9 '}'
For I in $ files
Do
Rm-rf/oracle/admin/$ ORACLE_SID/bdump/$ I
Done


$ More rm_dump_file.sh
Files = 'LS-l/oracle/admin/$ ORACLE_SID/bdump | grep trc | awk {'print $9 '}'
For I in $ files
Do
Rm-rf/oracle/admin/$ ORACLE_SID/bdump/$ I
Done
Files = 'LS-l/oracle/admin/$ ORACLE_SID/udump | grep trc | awk {'print $9 '}'
For I in $ files
Do
Rm-rf/oracle/admin/$ ORACLE_SID/udump/$ I
Done
Files = 'LS-l/oracle/admin/$ ORACLE_SIDump | grep core | awk {'print $9 '}'
For I in $ files
Do
Rm-rf/oracle/admin/$ ORACLE_SIDump/$ I
Done

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.