Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 331
  • Last Modified:

How to run Oracle 8.1.6 in archive mode and have the archive files roll or compressed

I'm running Oracle 8.1.6 with archiving on. The problem is, I get tons of files in the arch directory. Is there a way to configure Oracle to roll its archive files or compress them and store them elsewhere? What I really need it kind of mgmt for archiving. does this exist in Oracle?
0
swensel
Asked:
swensel
1 Solution
 
kencunninghamCommented:
We have a similar situation. I have a cron job set up to compress (using gzip) the files every 5 minutes. This could also be set up to delete the older files (following a successful backup of course) or relocate them elsewhere, but I prefer to do this manually. HTH.
0
 
OtetelisanuCommented:
Hello, I have the same problemm with Oracle for exp. Much-calibrated
that helps.

Workaround #2:
--------------
Use UNIX pipes and the split command:

  Export command:

    echo|exp file=>(split -b 1024m - exp-) userid=system/manager tables=A

    Note: You can put any "exp" parameters. This is working only in ksh and
          has been tested on Sun Solaris 5.5.1.

  Import command:

    echo|imp file=<(cat exp-??) userid=system/manager tables=A

Splitting and compressing at the same time:

  Export command:

    echo|exp file=>(compress|split -b 1024m - exp-) userid=system/manager
tables=A

  Import command:

    echo|imp file=<(cat exp-*|zcat) userid=system/manager tables=A


Workaround #3:
--------------
This is almost the same as above, but, in a three-step implementation using
explicit UNIX pipes without the split command, only relying on compress:

  Export command:

    1) Make the pipe
    mknod /tmp/exp_pipe  p

    2) Compress in background
    compress < /tmp/exp_pipe > export.dmp.Z &
    -or-
    cat p | compress > output.Z &
    -or-
    cat p > output.file & )

    3) Export to the pipe
    exp file=/tmp/exp_pipe userid=system/manager tables=A

  Import command:

    1) Make the pipe
    mknod /tmp/imp_pipe  p

    2) uncompress in background
    uncompress < export.dmp.Z > /tmp/imp_pipe &
    -or-
    cat output_file > /tmp/imp_pipe &

    3) Import thru the pipe
    imp file=/tmp/imp_pipe userid=system/manager tables=A


0
 
swenselAuthor Commented:
Thanks for the tips. I'm thinking that there is a way to manage the archive files from within Oracle. I'd like to put this into my application set-up, rather than requiring a seperate cron job to run. Is that possible? Does Oracle have this kind of a facility available?
0
 
SBK1972_ukCommented:
Otetelisanu,

Reading your suggestion has made me realise I dont really understand pipes.  Can you explain mknod, making pipes in /tmp and the benefits of using such things ?? When you would use pipes ?

I remember seeing a unix sa using pipes before, it was to aid performance / speed ?? Isa that correct.

If you could give me a quick explaination, I would great appriecate it.

SBK
0
 
liddlerCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by  Otetelisanu

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

liddler
EE Cleanup Volunteer
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now