------------
create user abc
identified by abc
default tablespace tbs1
temporary tablespace temp
quota unlimited on tbs1/
grant connect, create job, create operator, create snapshot, create procedure, create sequence, create synonym, create table, create trigger, create view, debug connect session to abc/
--------------------------------------------------------
only a DBA can import a file exported by another DBA
--------------------------------------------------------
C:\Documents and Settings\Administrator>imp userid=system file=E:\exp_full_db_Sat_26_04_2008_1100PM.dmp fromuser=sa_test touser=sa_test
H:\>imp userid=system@testapp file=D:\abamco_amc.DMP fromuser=abamco_amc touser=amcerptest
--------------------------
FULL_DB_EXPORT.bat
--------------------------
@echo off
for /f "tokens=1,2,3,4 delims=/ " %%a in ('date /t') do set fdate=%%a_%%c_%%b_%%d
for /f "tokens=1,2,3,4,5,6 delims=: " %%i in ('time /t') do set HHMMSS=_%%i%%j%%k%%l%%m%%n
exp system/******* file=D:\Export\exp_full_db_%fdate%%HHMMSS%.dmp full=y log=D:\Export\exp_full_db_%fdate%%HHMMSS%.log
--------------
HOT_BACKUP.bat
--------------
cd D:\oracle\product\10.2.0\db_1\BIN
sqlplus system/***** @F:\HOT_BACKUP\hotbackup.sql
-------------------
HOt Backup.sql
-------------------
host MD F:\HOT_BACKUP\"%DATE:/=_%"
host MD F:\HOT_BACKUP\"%DATE:/=_%"\ARCHIVELOGS
alter tablespace SYSTEM begin backup;
host copy E:\DATAFILES\SYSTEM01.DBF F:\HOT_BACKUP\"%DATE:/=_%;
host copy E:\DATAFILES\SYSTEM02.DBF F:\HOT_BACKUP\"%DATE:/=_%;
alter tablespace SYSTEM end backup;
alter tablespace UNDOTBS1 begin backup;
host copy E:\DATAFILES\UNDOTBS01.DBF F:\HOT_BACKUP\"%DATE:/=_%;
alter tablespace UNDOTBS1 end backup;
alter tablespace SYSAUX begin backup;
host copy E:\DATAFILES\SYSAUX01.DBF F:\HOT_BACKUP\"%DATE:/=_%;
alter tablespace SYSAUX end backup;
alter tablespace USERS begin backup;
host copy E:\DATAFILES\USERS01.DBF F:\HOT_BACKUP\"%DATE:/=_%;
alter tablespace USERS end backup;
alter tablespace ABCD begin backup;
host copy E:\DATAFILES\ABCD01.DBF F:\HOT_BACKUP\"%DATE:/=_%;
host copy E:\DATAFILES\ABCD02.DBF F:\HOT_BACKUP\"%DATE:/=_%;
alter tablespace ABCD end backup;
alter tablespace AXIS_ALERT begin backup;
host copy E:\DATAFILES\AXIS_ALERT01.DBF F:\HOT_BACKUP\"%DATE:/=_%;
alter tablespace AXIS_ALERT end backup;
alter tablespace ERP begin backup;
host copy E:\DATAFILES\ERP01.DBF F:\HOT_BACKUP\"%DATE:/=_%;
alter tablespace ERP end backup;
host copy D:\oracle\product\10.2.0\db_1\database\INITDB.ora
F:\HOT_BACKUP\"%DATE:/=_%;
host copy D:\oracle\product\10.2.0\db_1\database\PWDDB.ora
F:\HOT_BACKUP\"%DATE:/=_%;
host copy E:\REDOLOGS\REDO01.LOG F:\HOT_BACKUP\"%DATE:/=_%;
host copy E:\REDOLOGS\REDO02.LOG F:\HOT_BACKUP\"%DATE:/=_%;
host copy E:\REDOLOGS\REDO03.LOG F:\HOT_BACKUP\"%DATE:/=_%;
host copy E:\CONTROLFILES\CONTROL01.CTL F:\HOT_BACKUP\"%DATE:/=_%;
host copy E:\CONTROLFILES\CONTROL02.CTL F:\HOT_BACKUP\"%DATE:/=_%;
host copy E:\CONTROLFILES\CONTROL03.CTL F:\HOT_BACKUP\"%DATE:/=_%;
host copy E:\ARCHIVE\*.ARC F:\HOT_BACKUP\"%DATE:/=_%\ARCHIVELOGS
exit;
exit
----------------
verify_db.bat
---------------
cd D:\oracle\product\10.2.0\db_1\BIN
sqlplus "sys/******@DBSTD as sysdba" @D:\verifyDBSTD.sql
---------------
verifyDBSTD.sql
------------
col name format a70
set pages 0
set line 3000
spool verifyDBSTD.txt
select name, applied, to_char(completion_time, 'fmDD-MON-YYYY HH:MI:SS PM') from v$archived_log where completion_time >= '24-MAR-2009' order by name desc;
select process, status from v$managed_standby;
spool off
exit;
---------------------
RMAN_BACKUP.bat
---------------
cd D:\oracle\product\10.2.0\db_1\BIN\
rman target sys/rock@rock cmdfile c:\rman_backup.rcv log c:\rman_log.txt
-------------------
c:\rman_backup.rcv
-------------------
backup as compressed backupset incremental level 0 database plus archivelog;
restore database validate;
exit;
--------------------------
RMAN_BACKUP_Cumulative.bat
--------------------------
backup as compressed backupset incremental level 1 cumulative database plus archivelog;
exit;
---------------------------------
forums.oracle.com
Thread: Incremental Backups are Cumulative Vs Differential??
-------------------------------------------------------
The followings are Weekly Full Backup and Daily Backup scripts:
--------------------
Weekly Full Backup
--------------------
{
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
allocate channel ch1 type disk format
'/u02/db/backup/RMAN/backup_%d_%t_%s_%p_%U.bck';
backup incremental level 0 database plus archivelog delete all input;backup current controlfile;
backup spfile;
release channel ch1;
}
-----------------
Daily Backup:
-----------------
{
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
allocate channel ch1 type disk format '/u02/db/BACKUP/RMAN/backup_%d_%t_%s_%p_%U.bck';
backup incremental level 1 cumulative database plus archivelog delete all input;delete noprompt obsolete;
delete noprompt archivelog all backed up 2 times to disk;
backup current controlfile;
backup spfile;
release channel ch1;
}