How to take backup of oracle database

Mahesh Dahale

Mahesh Dahale

@mahesh-E2tZ3t Oct 22, 2024
Hello,
I am having Oralce 9i databases in my system and I want to format a system,so how to take backup of oracle database and what are the steps I have to follow in order to take a correct back up ?

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • sookie

    sookie

    @sookie-T06sFW Sep 19, 2009

    Hi mahesh_dahale

    Please check this link #-Link-Snipped-# if can be of any use. You can skip the archiving part. Also Please share with us the exact steps you did to solve your problem .

    Thanks !
  • Mahesh Dahale

    Mahesh Dahale

    @mahesh-E2tZ3t Sep 19, 2009

    Thanks,
    It is sufficient to take a backup of control file and data files
    For Datafile
    sql> ALTER TABLESPACE (tablespace name) begin backup
    Copy (datafilename) to /backupdir/
    ALTER TABLESPACE (datafilename) END BACKUP;
    Switch to Log file
    sql> ALTER system switch logfile;

    And for control file
    Sql>ALTER DATABASE BACKUP CONTROLFILE
    TO '/home/ora/1159/home/Backupdir/control.dbf'; (pathofbackupdir)

    I hope it’s sufficient 😕
  • komputergeek

    komputergeek

    @komputergeek-Yf5hJ4 Sep 29, 2009

    Other way you can use exp and imp tools provided.
    You can either run exp.exe ( it's in bin folder where your oracle is installed ) or you can just run this command :
    EXP scott/tiger file=backup.dmp tables=( <table names separated by comma>)

    After this copy this backup.dmp generated in bin folder and when you install new oracle,paste it in bin folder of that and to import it again use imp.exe or use this command :
    imp userid=scott file=backup.dmp fromuser=scott touser=scott
    I don't remember exact imp command.In above command you have to provide password also but i don't remember how to do that.If you can't find how to use that just use imp.exe and it will ask you uername and password and all other required fields.