Oracle Backup Script
I mean as we write a backup script to take backup of whole day working for Hr db like i use the following script to take backup of one user
for /f "tokens=2,3,4 delims=/ " %%a in ('date /t') do set fdate=%%a%%b%%c
for /f "tokens=1,2,3,4,5 delims=: " %%a in ('time /t') do set ftime=%%a%%b%%c%%d%%e
exp userid=HR/HR@dummy file=D:\BACKUP\backup%fdate%%ftime%.dmp log=D:\BACKUP\backup%fdate%%ftime%.log
I made this batch file to take backup of my hr schema but it take backup of whole day my problem is i want to take backup of every hour how to achieve this please help me.
i want to take backup of every hour how to achieve this please help me.
for that you need to use one of the proper backup method : User Managed / RMAN.
http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/part_int.htm#sthref10
Similar Messages
-
Oracle Hot Backup Script Windows Server 2003
Hello,
Does anyone here have a working Oracle 10I database hot backup script for Windows Server 2003? If so can you please post it here.
Thanks.Here is a basic batch script I have used for a hot backup of Oracle databases using RMAN
Will just need to update some locations based on you environment just check all the comments and change what you need to but this can be scheduled to run regularly through the windows scheduler for database backups.
This will take a hot backup and backup the archive logs.
Let me know if you have any quesitons.
REM #####################################################################
REM # Name: rman_hot_backup_dsk.bat
REM #
REM # Description:
REM #
REM # Generic Hot backup script that accepts the SID
REM #
REM # Parameters: Instance Name, backup level
REM #
REM #####################################################################
REM #
REM # Check if SID was Passed
if (%1)==() goto USAGE
if (%2)==() goto USAGE
REM # assign ORACLE_SID to passed SID
set ORACLE_SID=%1
REM # Set the hot backup level 0-full 1-incremental
set LEVEL=%2
REM # export the page list
set [email protected]
REM # assign a date we can use as part of the logfile
set DTE=%date:~-4%%date:~4,2%%date:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%
REM # Take the spaces out of the date string so we can use in our file name
set DTE=%DTE: =%
REM # set the script location
REM # Set location of where you will put script
set SCRIPTLOC=C:\app\oracle\scripts
cd %SCRIPTLOC%
REM # Set the Temporary command file that we will write our rman script to
set CMDFILE=%SCRIPTLOC%\%ORACLE_SID%_rman_hot_backup_dsk.cmd
REM # Remove the temporary file if it exists
del /q %CMDFILE%
REM # Set the logfile directory
REM # Change based on where you want the backup logs to go
set LOGPATH=W:\ORACLE_BACKUP\logs
set LOGFILE=%ORACLE_SID%_rman_hot_backup_dsk_%DTE%.log
set LOG=%LOGPATH%\%LOGFILE%
REM # Set the path of the backup location
REM # Change based on disk pach for you disk based backups
set BACKLOC=\\VirtualBox\ORA_ITS03P\ORACLE_BACKUP\%ORACLE_SID%
REM # Lets set the ORACLE_HOME for the host
REM # Set to your actual ORACLE_HOME location
set ORACLE_HOME=C:\app\oracle\product\10.2.0\db_1
# Set the rest of the Oracle Environment
# based on our ORACLE_HOME
set LIBPATH=%ORACLE_HOME%/lib
set LD_LIBRARY_PATH=%ORACLE_HOME%/lib
set TNS_ADMIN=%ORACLE_HOME%/network/admin
REM #set ORA_NLS10=%ORACLE_HOME%/nls/data
REM Set our PATH with the ORACLE_HOME so that we have a good
REM clean environment to work with
set PATH=%ORACLE_HOME%/bin;%ORACLE_HOME%/OPatch;%PATH%
REM # Write Temporary command file for RMAN backup
echo # configure retention policy >> %CMDFILE%
echo CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS ; >> %CMDFILE%
echo # >> %CMDFILE%
echo # lets start clean for our hot backup by doing full crosschecks >> %CMDFILE%
echo change archivelog all crosscheck ; >> %CMDFILE%
echo crosscheck backup of database; >> %CMDFILE%
echo crosscheck backup of controlfile; >> %CMDFILE%
echo # >> %CMDFILE%
echo # delete all expired and obsolete backups >> %CMDFILE%
echo allocate channel for maintenance type disk ; >> %CMDFILE%
echo delete noprompt expired archivelog all ; >> %CMDFILE%
echo delete noprompt expired backup ; >> %CMDFILE%
echo delete noprompt obsolete ; >> %CMDFILE%
echo # >> %CMDFILE%
echo # Configure control file for auto backup >> %CMDFILE%
echo configure controlfile autobackup on ; >> %CMDFILE%
echo CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%BACKLOC%\%ORACLE_SID%_controlfile_%%F' ; >> %CMDFILE%
echo # >> %CMDFILE%
echo # Configure default device type here we use disk and set parallelism to 2 >> %CMDFILE%
echo configure default device type to disk ; >> %CMDFILE%
echo configure device type disk parallelism 2 ; >> %CMDFILE%
echo # >> %CMDFILE%
echo # Must format the default channel for the device type disk >> %CMDFILE%
echo # other wise tmp area in creating pieces will be done in >> %CMDFILE%
echo # the $ORACLE_HOME/dbs directory >> %CMDFILE%
echo CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT = '%BACKLOC%\%ORACLE_SID%_hot_%%U' ; >> %CMDFILE%
echo # >> %CMDFILE%
echo # Configure our retention policy for this database >> %CMDFILE%
echo configure retention policy to recovery window of 14 days ; >> %CMDFILE%
echo # >> %CMDFILE%
echo # Let configure our channels for our backup >> %CMDFILE%
echo # Channel 1 disk and we indicate where it goes not taking the default >> %CMDFILE%
echo configure channel 1 device type disk MAXPIECESIZE = 4G format '%BACKLOC%\%ORACLE_SID%_hot_%%U' ; >> %CMDFILE%
echo # Channel 2 disk and we indicate where it goes not taking the default >> %CMDFILE%
echo configure channel 2 device type disk MAXPIECESIZE = 4G format '%BACKLOC%\%ORACLE_SID%_hot_%%U' ; >> %CMDFILE%
echo # >> %CMDFILE%
echo # Backup our database with compression on >> %CMDFILE%
echo backup as compressed backupset incremental level %LEVEL% tag hot_%LEVEL%_%DTE% DATABASE ; >> %CMDFILE%
echo # >> %CMDFILE%
echo # Backup our archive log files that have not been backed up >> %CMDFILE%
echo backup as compressed backupset format '%BACKLOC%\%ORACLE_SID%_Archive_%%d_%%s_%%p_%%t' archivelog all not backed up 1 times ; >> %CMDFILE%
echo # >> %CMDFILE%
echo # Backup Control file for standby in case needed >> %CMDFILE%
echo backup current controlfile for standby ; >> %CMDFILE%
echo # >> %CMDFILE%
echo # let put a controlfile to trace >> %CMDFILE%
echo sql 'ALTER DATABASE BACKUP CONTROLFILE TO TRACE' ; >> %CMDFILE%
REM # Run the RMAN backup without using the recovery catalog
%ORACLE_HOME%\bin\rman target=/ nocatalog cmdfile=%CMDFILE% msglog=%LOG%
REM # Remove our temporary command file
del /q %CMDFILE%
REM # Mail Archive backup log
REM # This relies on the free bmail utility
bmail -date -m %LOG% -f [email protected] -s <smtpserver> -t %PAGE_LIST% -a "HOT Backup results"
REM # Goto end of script as we are done
goto END
:USAGE
echo "Must Pass ORACLE_SID and hot backup level as parameters."
goto END
:END -
Hello all
I have problems with oracle backup through db13 to ftp.
Job log
Job started
Step 001 started (program RSDBAJOB, variant &0000000000028, user ID USER)
Execute logical command BRBACKUP On host sap1-ast
Parameters:-u / -jid ALLOG20061117094801 -c force -t online -m all -p initTHD.sap -a -c force -p initTHD.sap -c
ds
BR0051I BRBACKUP 7.00 (16)
BR0282E Directory '/sapbackup' not found
BR0182E Checking parameter/option 'compress_dir' failed
BR0056I End of database backup: bdtyppxk.log 2006-11-17 09.48.04
BR0280I BRBACKUP time stamp: 2006-11-17 09.48.04
BR0054I BRBACKUP terminated with errors
External program terminated with exit code 3
BRBACKUP returned error status E
Job finished
this is my initTHD.sap file
@(#) $Id: //bas/700_REL/src/ccm/rsbr/initNT.sap#5 $ SAP
SAP backup sample profile. #
The parameter syntax is the same as for init.ora parameters. #
Enclose parameter values which consist of more than one symbol in #
double quotes. #
After any symbol, parameter definition can be continued on the next #
line. #
A parameter value list should be enclosed in parentheses, the list #
items should be delimited by commas. #
There can be any number of white spaces (blanks, tabs and new lines) #
between symbols in parameter definition. #
backup mode [all | all_data | full | incr | sap_dir | ora_dir
| all_dir | <tablespace_name> | <file_id> | <file_id1>-<file_id2>
| <generic_path> | (<object_list>)]
default: all
backup_mode = all
restore mode [all | all_data | full | incr | incr_only | incr_full
| incr_all | <tablespace_name> | <file_id> | <file_id1>-<file_id2>
| <generic_path> | (<object_list>) | partial | non_db
redirection with '=' is not supported here - use option '-m' instead
default: all
restore_mode = all
backup type [offline | offline_force | offline_standby | offline_split
| offline_mirror | offline_stop | online | online_cons | online_split
| online_mirror
default: offline
backup_type = online_cons
backup device type
[tape | tape_auto | tape_box | pipe | pipe_auto | pipe_box | disk
| disk_copy | disk_standby | stage | stage_copy | stage_standby
| util_file | util_file_online | rman_util | rman_disk | rman_stage
| rman_prep]
default: tape
backup_dev_type = stage
backup root directory [<path_name> | (<path_name_list>)]
default: %SAPDATA_HOME%\sapbackup
backup_root_dir = /sapbackup
stage root directory [<path_name> | (<path_name_list>)]
default: value of the backup_root_dir parameter
stage_root_dir = /sapbackup
compression flag [no | yes | hardware | only]
default: no
compress = no
compress command
first $-character is replaced by the source file name
second $-character is replaced by the target file name
<target_file_name> = <source_file_name>.Z
for compress command the -c option must be set
recommended setting for brbackup -k only run:
"%SAPEXE%\mkszip -l 0 -c $ > $"
no default
compress_cmd = "C:\usr\sap\THD\SYS\exe\uc\NTI386\mkszip -c $ > $"
uncompress command
first $-character is replaced by the source file name
second $-character is replaced by the target file name
<source_file_name> = <target_file_name>.Z
for uncompress command the -c option must be set
no default
uncompress_cmd = "C:\usr\sap\THD\SYS\exe\uc\NTI386\uncompress -c $ > $"
directory for compression [<path_name> | (<path_name_list>)]
default: value of the backup_root_dir parameter
compress_dir = /sapbackup
brarchive function [save | second_copy | double_save | save_delete
| second_copy_delete | double_save_delete | copy_save
| copy_delete_save | delete_saved | delete_copied]
default: save
archive_function = save
directory for archive log copies to disk
default: first value of the backup_root_dir parameter
archive_copy_dir = /sapbackup
directory for archive log copies to stage
default: first value of the stage_root_dir parameter
archive_stage_dir = /sapbackup
delete archive logs from duplex destination [only | no | yes | check]
default: only
archive_dupl_del = only
new sapdata home directory for disk_copy | disk_standby
no default
new_db_home = X:\oracle\C11
stage sapdata home directory for stage_copy | stage_standby
default: value of the new_db_home parameter
#stage_db_home = /sapbackup
original sapdata home directory for split mirror disk backup
no default
#orig_db_home = C:\oracle\THD
remote host name
no default
remote_host = srv1
remote user name
default: current operating system user
remote_user = "thdadm password"
tape copy command [cpio | cpio_gnu | dd | dd_gnu | rman | rman_gnu
rman_dd | rman_dd_gnu]
default: cpio
tape_copy_cmd = cpio
disk copy command [copy | copy_gnu | dd | dd_gnu | rman | rman_gnu]
default: copy
disk_copy_cmd = copy
stage copy command [rcp | scp | ftp]
default: rcp
stage_copy_cmd = ftp
pipe copy command [rsh | ssh]
default: rsh
pipe_copy_cmd = rsh
flags for cpio output command
default: -ovB
cpio_flags = -ovB
flags for cpio input command
default: -iuvB
cpio_in_flags = -iuvB
flags for cpio command for copy of directories to disk
default: -pdcu
use flags -pdu for gnu tools
cpio_disk_flags = -pdcu
flags for dd output command
default: "obs=16k"
caution: option "obs=" not supported for Windows
recommended setting:
Unix: "obs=nk bs=nk", example: "obs=64k bs=64k"
Windows: "bs=nk", example: "bs=64k"
dd_flags = "bs=64k"
flags for dd input command
default: "ibs=16k"
caution: option "ibs=" not supported for Windows
recommended setting:
Unix: "ibs=nk bs=nk", example: "ibs=64k bs=64k"
Windows: "bs=nk", example: "bs=64k"
dd_in_flags = "bs=64k"
number of members in RMAN save sets [ 1 | 2 | 3 | 4 | tsp | all ]
default: 1
saveset_members = 1
additional parameters for RMAN
rman_channels and rman_filesperset are only used when rman_util,
rman_disk or rman_stage
rman_channels defines the number of parallel sbt channel allocations
rman_filesperset = 0 means:
one file per save set - for non-incremental backups
all files in one save set - for incremental backups
the others have the same meaning as for native RMAN
rman_channels = 1
rman_filesperset = 0
rman_maxpiecesize = 0 # in KB - former name rman_kbytes
rman_rate = 0 # in KB - former name rman_readrate
rman_maxopenfiles = 0
rman_maxsetsize = 0 # in KB - former name rman_setsize
additional parameters for RMAN version 8.1
the parameters have the same meaning as for native RMAN
rman_diskratio = 0 # deprecated in Oracle 10g
rman_pool = 0
rman_copies = 0 | 1 | 2 | 3 | 4 # former name rman_duplex
rman_proxy = no | yes | only
special parameters for an external backup library, example:
rman_parms = "BLKSIZE=65536 ENV=(BACKUP_SERVER=HOSTNAME)"
rman_send = "'<command>'"
rman_send = ("channel sbt_1 '<command1>' parms='<parameters1>'",
"channel sbt_2 '<command2>' parms='<parameters2>'")
remote copy-out command (backup_dev_type = pipe)
$-character is replaced by current device address
no default
copy_out_cmd = "dd ibs=8k obs=64k of=$"
remote copy-in command (backup_dev_type = pipe)
$-character is replaced by current device address
no default
copy_in_cmd = "dd ibs=64k obs=8k if=$"
rewind command
$-character is replaced by current device address
no default
operating system dependent, examples:
HP-UX: "mt -f $ rew"
TRU64: "mt -f $ rewind"
AIX: "tctl -f $ rewind"
Solaris: "mt -f $ rewind"
Windows: "mt -f $ rewind"
Linux: "mt -f $ rewind"
rewind = "mt -f $ rewind"
rewind and set offline command
$-character is replaced by current device address
default: value of the rewind parameter
operating system dependent, examples:
HP-UX: "mt -f $ offl"
TRU64: "mt -f $ offline"
AIX: "tctl -f $ offline"
Solaris: "mt -f $ offline"
Windows: "mt -f $ offline"
Linux: "mt -f $ offline"
rewind_offline = "mt -f $ offline"
tape positioning command
first $-character is replaced by current device address
second $-character is replaced by number of files to be skipped
no default
operating system dependent, examples:
HP-UX: "mt -f $ fsf $"
TRU64: "mt -f $ fsf $"
AIX: "tctl -f $ fsf $"
Solaris: "mt -f $ fsf $"
Windows: "mt -f $ fsf $"
Linux: "mt -f $ fsf $"
tape_pos_cmd = "mt -f $ fsf $"
mount backup volume command in auto loader / juke box
used if backup_dev_type = tape_box | pipe_box
no default
mount_cmd = "<mount_cmd> $ $ $ [$]"
dismount backup volume command in auto loader / juke box
used if backup_dev_type = tape_box | pipe_box
no default
dismount_cmd = "<dismount_cmd> $ $ [$]"
split mirror disks command
used if backup_type = offline_split | online_split | offline_mirror
| online_mirror
no default
split_cmd = "<split_cmd> [$]"
resynchronize mirror disks command
used if backup_type = offline_split | online_split | offline_mirror
| online_mirror
no default
resync_cmd = "<resync_cmd> [$]"
additional options for SPLITINT interface program
no default
split_options = "<split_options>"
resynchronize after backup flag [no | yes]
default: no
split_resync = no
volume size in KB = K, MB = M or GB = G (backup device dependent)
default: 1200M
recommended values for tape devices without hardware compression:
60 m 4 mm DAT DDS-1 tape: 1200M
90 m 4 mm DAT DDS-1 tape: 1800M
120 m 4 mm DAT DDS-2 tape: 3800M
125 m 4 mm DAT DDS-3 tape: 11000M
112 m 8 mm Video tape: 2000M
112 m 8 mm high density: 4500M
DLT 2000 10/20 GB: 10000M
DLT 2000XT 15/30 GB: 15000M
DLT 4000 20/40 GB: 20000M
DLT 7000 35/70 GB: 35000M
recommended values for tape devices with hardware compression:
60 m 4 mm DAT DDS-1 tape: 1000M
90 m 4 mm DAT DDS-1 tape: 1600M
120 m 4 mm DAT DDS-2 tape: 3600M
125 m 4 mm DAT DDS-3 tape: 10000M
112 m 8 mm Video tape: 1800M
112 m 8 mm high density: 4300M
DLT 2000 10/20 GB: 9000M
DLT 2000XT 15/30 GB: 14000M
DLT 4000 20/40 GB: 18000M
DLT 7000 35/70 GB: 30000M
tape_size = 100G
volume size in KB = K, MB = M or GB = G used by brarchive
default: value of the tape_size parameter
tape_size_arch = 100G
level of parallel execution
default: 0 - set to number of backup devices
exec_parallel = 0
address of backup device without rewind
[<dev_address> | (<dev_address_list>)]
no default
operating system dependent, examples:
HP-UX: /dev/rmt/0mn
TRU64: /dev/nrmt0h
AIX: /dev/rmt0.1
Solaris: /dev/rmt/0mn
Windows: /dev/nmt0 | /dev/nst0
Linux: /dev/nst0
tape_address = /dev/nmt0
address of backup device without rewind used by brarchive
default: value of the tape_address parameter
operating system dependent
tape_address_arch = /dev/nmt0
address of backup device with rewind
[<dev_address> | (<dev_address_list>)]
no default
operating system dependent, examples:
HP-UX: /dev/rmt/0m
TRU64: /dev/rmt0h
AIX: /dev/rmt0
Solaris: /dev/rmt/0m
Windows: /dev/mt0 | /dev/st0
Linux: /dev/st0
tape_address_rew = /dev/mt0
address of backup device with rewind used by brarchive
default: value of the tape_address_rew parameter
operating system dependent
tape_address_rew_arch = /dev/mt0
address of backup device with control for mount/dismount command
[<dev_address> | (<dev_address_list>)]
default: value of the tape_address_rew parameter
operating system dependent
tape_address_ctl = /dev/...
address of backup device with control for mount/dismount command
used by brarchive
default: value of the tape_address_rew_arch parameter
operating system dependent
tape_address_ctl_arch = /dev/...
volumes for brarchive
[<volume_name> | (<volume_name_list>) | SCRATCH]
no default
volume_archive = (THDA01, THDA02, THDA03, THDA04, THDA05,
THDA06, THDA07)
volumes for brbackup
[<volume_name> | (<volume_name_list>) | SCRATCH]
no default
volume_backup = (THDB01, THDB02, THDB03, THDB04, THDB05,
THDB06, THDB07)
expiration period for backup volumes in days
default: 30
expir_period = 30
recommended usages of backup volumes
default: 100
tape_use_count = 100
backup utility parameter file
default: no parameter file
util_par_file = initTHD.utl
mount/dismount command parameter file
default: no parameter file
mount_par_file = initTHD.mnt
Oracle instance string to the primary database
[primary_db = <conn_name> | LOCAL]
no default
primary_db = <conn_name>
description of parallel instances for Oracle RAC
parallel_instances = <instance_desc> | (<instance_desc_list>)
<instance_desc_list> -> <instance_desc>[,<instance_desc>...]
<instance_desc> -> <Oracle_sid>:<Oracle_home>@<conn_name>
<Oracle_sid> -> Oracle system id for parallel instance
<Oracle_home> -> Oracle home for parallel instance
<conn_name> -> Oracle instance string to parallel instance
Please include the local instance in the parameter definition!
default: no parallel instances
example for initRAC001.sap:
parallel_instances = (RAC001:/oracle/RAC/920_64@RAC001,
RAC002:/oracle/RAC/920_64@RAC002, RAC003:/oracle/RAC/920_64@RAC003)
database owner of objects to be checked
<owner> | (<owner_list>)
default: all SAP owners
check_owner = sapr3
database objects to be excluded from checks
all_part | non_sap | [<owner>.]<table> | [<owner>.]<index>
| [<owner>.]<prefix>* | <tablespace> | (<object_list>)
default: no exclusion, example:
check_exclude = (SDBAH, SAPR3.SDBAD)
database owner of SDBAH, SDBAD and XDB tables for cleanup
<owner> | (<owner_list>)
default: all SAP owners
cleanup_owner = sapr3
retention period in days for brarchive log files
default: 30
cleanup_brarchive_log = 30
retention period in days for brbackup log files
default: 30
cleanup_brbackup_log = 30
retention period in days for brconnect log files
default: 30
cleanup_brconnect_log = 30
retention period in days for brrestore log files
default: 30
cleanup_brrestore_log = 30
retention period in days for brrecover log files
default: 30
cleanup_brrecover_log = 30
retention period in days for brspace log files
default: 30
cleanup_brspace_log = 30
retention period in days for archive log files saved on disk
default: 30
cleanup_disk_archive = 30
retention period in days for database files backed up on disk
default: 30
cleanup_disk_backup = 30
retention period in days for brspace export dumps and scripts
default: 30
cleanup_exp_dump = 30
retention period in days for Oracle trace and audit files
default: 30
cleanup_ora_trace = 30
retention period in days for records in SDBAH and SDBAD tables
default: 100
cleanup_db_log = 100
retention period in days for records in XDB tables
default: 100
cleanup_xdb_log = 100
retention period in days for database check messages
default: 100
cleanup_check_msg = 100
database owner of objects to adapt next extents
<owner> | (<owner_list>)
default: all SAP owners
next_owner = sapr3
database objects to adapt next extents
all | all_ind | special | [<owner>.]<table> | [<owner>.]<index>
| [<owner>.]<prefix>* | <tablespace> | (<object_list>)
default: all abjects of selected owners, example:
next_table = (SDBAH, SAPR3.SDBAD)
database objects to be excluded from adapting next extents
all_part | [<owner>.]<table> | [<owner>.]<index> | [<owner>.]<prefix>*
| <tablespace> | (<object_list>)
default: no exclusion, example:
next_exclude = (SDBAH, SAPR3.SDBAD)
database objects to get special next extent size
all_sel:<size>[/<limit>] | [<owner>.]<table>:<size>[/<limit>]
| [<owner>.]<index>:<size>[/<limit>]
| [<owner>.]<prefix>*:<size>[/<limit>] | (<object_size_list>)
default: according to table category, example:
next_special = (SDBAH:100K, SAPR3.SDBAD:1M/200)
maximum next extent size
default: 2 GB - 5 * <database_block_size>
next_max_size = 1G
maximum number of next extents
default: 0 - unlimited
next_limit_count = 300
database owner of objects to update statistics
<owner> | (<owner_list>)
default: all SAP owners
stats_owner = sapr3
database objects to update statistics
all | all_ind | all_part | missing | info_cubes | dbstatc_tab
| dbstatc_mon | dbstatc_mona | [<owner>.]<table> | [<owner>.]<index>
| [<owner>.]<prefix>* | <tablespace> | (<object_list>) | harmful
| locked | system_stats | oradict_stats
default: all abjects of selected owners, example:
stats_table = (SDBAH, SAPR3.SDBAD)
database objects to be excluded from updating statistics
all_part | info_cubes | [<owner>.]<table> | [<owner>.]<index>
| [<owner>.]<prefix>* | <tablespace> | (<object_list>)
default: no exclusion, example:
stats_exclude = (SDBAH, SAPR3.SDBAD)
method for updating statistics for tables not in DBSTATC
E | EH | EI | EX | C | CH | CI | CX | A | AH | AI | AX | E= | C= | =H
| =I | =X | +H | +I
default: according to internal rules
stats_method = E
sample size for updating statistics for tables not in DBSTATC
P<percentage_of_rows> | R<thousands_of_rows>
default: according to internal rules
stats_sample_size = P10
number of buckets for updating statistics with histograms
default: 75
stats_bucket_count = 75
threshold for collecting statistics after checking
default: 50%
stats_change_threshold = 50
number of parallel threads for updating statistics
default: 1
stats_parallel_degree = 1
processing time limit in minutes for updating statistics
default: 0 - no limit
stats_limit_time = 0
parameters for calling DBMS_STATS supplied package
all:R|B:<degree> | all_part:R|B:<degree> | info_cubes:R|B:<degree>
| [<owner>.]<table>:R|B:<degree> | [<owner>.]<prefix>*:R|B:<degree>
| (<object_list>) | NO
default: NULL - use ANALYZE statement
stats_dbms_stats = ([ALL:R:1,][<owner>.]<table>:R|B:<degree>,...)
definition of info cube tables
default | rsnspace_tab | [<owner>.]<table> | [<owner>.]<prefix>*
| (<object_list>) | null
default: from RSNSPACE control table
stats_info_cubes = (/BIC/D, /BI0/D, ...)
recovery type [complete | dbpit | tspit | reset | restore | apply
| disaster]
default: complete
recov_type = complete
directory for brrecover file copies
default: $SAPDATA_HOME/sapbackup
recov_copy_dir = C:\oracle\THD\sapbackup
time period for searching for backups
0 - all available backups, >0 - backups from n last days
default: 30
recov_interval = 30
degree of paralelism for applying archive log files
0 - use Oracle default parallelism, 1 - serial, >1 - parallel
default: Oracle default
recov_degree = 0
number of lines for scrolling in list menus
0 - no scrolling, >0 - scroll n lines
default: 20
scroll_lines = 20
time period for displaying profiles and logs
0 - all available logs, >0 - logs from n last days
default: 30
show_period = 30
directory for brspace file copies
default: $SAPDATA_HOME/sapreorg
space_copy_dir = C:\oracle\THD\sapreorg
directory for table export dump files
default: $SAPDATA_HOME/sapreorg
exp_dump_dir = C:\oracle\THD\sapreorg
database tables for reorganization
[<owner>.]<table> | [<owner>.]<prefix>* | [<owner>.]<prefix>%
| (<table_list>)
no default
reorg_table = (SDBAH, SAPR3.SDBAD)
database indexes for rebuild
[<owner>.]<index> | [<owner>.]<prefix>* | [<owner>.]<prefix>%
| (<index_list>)
no default
rebuild_index = (SDBAH0, SAPR3.SDBAD0)
database tables for export
[<owner>.]<table> | [<owner>.]<prefix>* | [<owner>.]<prefix>%
| (<table_list>)
no default
exp_table = (SDBAH, SAPR3.SDBAD)
database tables for import
[<owner>.]<table> | (<table_list>)
no default
imp_table = (SDBAH, SAPR3.SDBAD)
I can log in to ftp from server
C:\Documents and Settings\thdadm>ftp srv1
Connected to srv1.
220 Microsoft FTP Service
User (srv1:(none)): thdadm
331 Password required for thdadm.
Password:
230 User thdadm logged in.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for file list.
sapbackup
226 Transfer complete.
ftp: 11 bytes received in 0,00Seconds 11000,00Kbytes/sec.
ftp> mkdir sap
257 "sap" directory created.
please help
best regards
Olzhas Suleimenovdel
-
Oracle version : 11G release 2
Platform : AIX
After going through various OTN posts, i wrote the below Cold backup script (Untested). If there are any unnecessary stuff or enhancements required, please let me know
$ rman target /
RMAN>
run
allocate channel c1 type disk format '/u05/rmanbkp/%d_COLD_DB_%u';
sql 'alter system archive log current';
shutdown immediate;
startup mount;
backup database including current controlfile tag='mydbname_full_bkp';
backup spfile tag = 'mydbname_SPFILE';
release channel c1;
}Hi T.Boyd
What do you guys think of the backup script? Any room for improvement? I found in a small percentage of the shutdown immediate commands issued, the instance hangs (specially when the machine is very busy).
I have modified my rman coldbackup the procedure to:
shutdown abort;
host 'sleep 3';
startup restrict;
shutdown immediate;
startup mount;Maybe you can add more channels to improve performance. You can use more resources as there are no users on the database anyway....
Regards,
Tycho -
Rman hot backup script gives error in R12.
hi experts
i m facing following prob when run the backup script. 1 day before the same script runs correctily but now it gives me error at the allocatioion of channel rest of command run correctly.
[root@testerp rman_log]# cat UAT_daily_rman_hot_bkp_01-11-14_140301.log
-bash: /root/.bash_profile: Permission denied
Recovery Manager: Release 11.1.0.7.0 - Production on Sat Jan 11 14:03:01 2014
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: UAT (DBID=2855851979)
connected to recovery catalog database
RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "end-of-file": expecting one of: "allocate, alter, advise, backup, beginline, blockrecover, catalog, change, copy, convert, crosscheck, configure, duplicate, debug, delete, execute, endinline, flashback, host, mount, open, plsql, recover, release, replicate, report, restore, resync, repair, }, set, setlimit, sql, switch, startup, shutdown, send, show, transport, validate"
RMAN-01007: at line 12 column 1 file: standard input
RMAN>
RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "for"
RMAN-01008: the bad identifier was: c2
RMAN-01007: at line 1 column 18 file: standard input
RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "for"
RMAN-01008: the bad identifier was: c3
RMAN-01007: at line 1 column 18 file: standard input
RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "for"
RMAN-01008: the bad identifier was: c4
RMAN-01007: at line 1 column 18 file: standard input
RMAN>
Starting backup at 11-JAN-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=362 device type=DISK
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00021 name=/d06/UAT/proddata/a_txn_data06.dbf
input datafile file number=00392 name=/d06/UAT/db/apps_st/data/a_txn_data01.dbf
input datafile file number=00401 name=/d06/UAT/db/apps_st/data/a_txn_data02.dbf
input datafile file number=00402 name=/d06/UAT/db/apps_st/data/a_txn_data03.dbf
input datafile file number=00022 name=/d06/UAT/proddata/a_txn_data07.dbf
input datafile file number=00014 name=/d06/UAT/db/apps_st/data/a_txn_data04.dbf
input datafile file number=00020 name=/d06/UAT/proddata/a_txn_data05.dbf
input datafile file number=00011 name=/d06/UAT/db/apps_st/data/sysaux01.dbf
input datafile file number=00018 name=/d06/UAT/db/apps_st/data/sysaux02.dbf
input datafile file number=00023 name=/d06/UAT/proddata/a_txn_data08.dbf
input datafile file number=00379 name=/d06/UAT/db/apps_st/data/undo01.dbf
input datafile file number=00024 name=/d06/UAT/proddata/sysaux03.dbf
input datafile file number=00025 name=/d06/UAT/proddata/sysaux04.dbf
input datafile file number=00033 name=/d06/UAT/proddata/a_txn_ind11.dbf
input datafile file number=00029 name=/d06/UAT/proddata/a_txn_ind09.dbf
input datafile file number=00030 name=/d06/UAT/proddata/a_txn_ind10.dbf
input datafile file number=00015 name=/d06/UAT/db/apps_st/data/a_txn_ind06.dbf
input datafile file number=00026 name=/d06/UAT/db/apps_st/data/a_txn_ind07.dbf
input datafile file number=00028 name=/d06/UAT/db/apps_st/data/a_txn_ind08.dbf
input datafile file number=00393 name=/d06/UAT/db/apps_st/data/a_txn_ind01.dbf
input datafile file number=00403 name=/d06/UAT/db/apps_st/data/a_txn_ind02.dbf
input datafile file number=00404 name=/d06/UAT/db/apps_st/data/a_txn_ind03.dbf
input datafile file number=00405 name=/d06/UAT/db/apps_st/data/a_txn_ind04.dbf
input datafile file number=00406 name=/d06/UAT/db/apps_st/data/a_txn_ind05.dbf
input datafile file number=00400 name=/d06/UAT/db/apps_st/data/a_media01.dbf
input datafile file number=00353 name=/d06/UAT/db/apps_st/data/system08.dbf
input datafile file number=00013 name=/d06/UAT/db/apps_st/data/system12.dbf
input datafile file number=00352 name=/d06/UAT/db/apps_st/data/system09.dbf
input datafile file number=00394 name=/d06/UAT/db/apps_st/data/a_ref01.dbf
input datafile file number=00407 name=/d06/UAT/db/apps_st/data/a_ref02.dbf
input datafile file number=00396 name=/d06/UAT/db/apps_st/data/a_summ01.dbf
input datafile file number=00395 name=/d06/UAT/db/apps_st/data/a_int01.dbf
input datafile file number=00008 name=/d06/UAT/db/apps_st/data/a_queue02.dbf
input datafile file number=00027 name=/d06/UAT/db/apps_st/data/a_queue03.dbf
input datafile file number=00031 name=/d06/UAT/db/apps_st/data/a_queue04.dbf
input datafile file number=00399 name=/d06/UAT/db/apps_st/data/a_queue01.dbf
input datafile file number=00001 name=/d06/UAT/db/apps_st/data/system01.dbf
input datafile file number=00002 name=/d06/UAT/db/apps_st/data/system02.dbf
input datafile file number=00003 name=/d06/UAT/db/apps_st/data/system03.dbf
input datafile file number=00004 name=/d06/UAT/db/apps_st/data/system04.dbf
input datafile file number=00005 name=/d06/UAT/db/apps_st/data/system05.dbf
input datafile file number=00398 name=/d06/UAT/db/apps_st/data/a_archive01.dbf
input datafile file number=00295 name=/d06/UAT/db/apps_st/data/system06.dbf
input datafile file number=00351 name=/d06/UAT/db/apps_st/data/system07.dbf
input datafile file number=00354 name=/d06/UAT/db/apps_st/data/system11.dbf
input datafile file number=00288 name=/d06/UAT/db/apps_st/data/system10.dbf
input datafile file number=00012 name=/d06/UAT/db/apps_st/data/apps_ts_tools01.dbf
input datafile file number=00016 name=/d06/UAT/db/apps_st/data/a_ref03.dbf
input datafile file number=00019 name=/d06/UAT/db/apps_st/data/MLSEIGL01.dbf
input datafile file number=00032 name=/d06/UAT/db/apps_st/data/RMAN01.dbf
input datafile file number=00397 name=/d06/UAT/db/apps_st/data/a_nolog01.dbf
input datafile file number=00314 name=/d06/UAT/db/apps_st/data/portal01.dbf
input datafile file number=00017 name=/d06/UAT/db/apps_st/data/a_int02.dbf
input datafile file number=00006 name=/d06/UAT/db/apps_st/data/ctxd01.dbf
input datafile file number=00010 name=/d06/UAT/db/apps_st/data/olap.dbf
input datafile file number=00009 name=/d06/UAT/db/apps_st/data/odm.dbf
input datafile file number=00007 name=/d06/UAT/db/apps_st/data/owad01.dbf
channel ORA_DISK_1: starting piece 1 at 11-JAN-14
[root@testerp rman_log]#
backup script is below:
in this script it returns error only at the channel allocaition rest of all backup command i run manually or with scirpt it runs correctly.4
i m not able to know why it returns error only at challnel allocation 1 day before it runs correctly.
[orauat@testerp rman_script]$ cat rman_backup.sh
#!/bin/sh
#ORACLE_SID=UAT
#BACKUP_START_TIME='date +"%y""%m""%d"_"%H""%M""%S"'
#ORACLE_HOME=/d06/UAT/db/tech_st/11.1.0
#PATH=$PATH:${ORACLE_HOME}:${ORACLE_HOME}/bin
#export ORACLE_SID
#export ORACLE_HOME
#export PATH
/d06/UAT/db/tech_st/11.1.0/bin/rman catalog rman/rman007 target sys/sysuat <<EOF
run
allocate channel c1 device type disk format '/d06/UAT/rman_hot_backup/Daily_backup%d_Arch_%c_%U';
sql 'alter system switch logfile';
sql 'alter system switch logfile';
sql 'alter system archive log current';
delete expired archivelog all;
crosscheck archivelog all;
backup archivelog all;
delete noprompt archivelog all completed before 'sysdate-4' backed up 1 times to disk;
allocate channel c2 device type disk format '/d06/UAT/rman_hot_backup/Daily_backup%d_DB_%c_%U';
allocate channel c3 device type disk format '/d06/UAT/rman_hot_backup/Daily_backup%d_DB_%c_%U';
allocate channel c4 device type disk format '/d06/UAT/rman_hot_backup/Daily_backup%d_DB_%c_%U';
backup incremental level 1 database;
delete expired backup device type disk;
delete obsolete device type disk;
release channel c1;
release channel c2;
release channel c3;
release channel c4;
exit
EOF
regards
pritesh ranjanyes the script is edited
i have add some command line and edit it for take the full backup level=0 on the same directory with different formant name but location is same.
can i take full backup level 0 and incremental backup level 1 in the same directory with the different format name.
for exp:
allocate channel c2 device type disk format '/d06/UAT/rman_hot_backup/Daily_backup%d_DB_%c_%U';
allocate channel c3 device type disk format '/d06/UAT/rman_hot_backup/Daily_backup%d_DB_%c_%U';
allocate channel c4 device type disk format '/d06/UAT/rman_hot_backup/Daily_backup%d_DB_%c_%U';
i allocate these three channel for incremental level 1 backup;
the backup is done successfully without any error.
after that i have change
allocate channel c2 device type disk format '/d06/UAT/rman_hot_backup/Weekly_backup%d_DB_%c_%U';
allocate channel c3 device type disk format '/d06/UAT/rman_hot_backup/Weekly_backup%d_DB_%c_%U';
allocate channel c4 device type disk format '/d06/UAT/rman_hot_backup/Weekly_backup%d_DB_%c_%U';
backup database incremental level 0
after doing the above changes it get the error. with the channel location.
i have to schedule daily incremental backup level 1 and weekly full backup level 0.
plz suggest me i have to take incremental 1 and full incremental level 0 backup on seperate directory for different format name.
regards
pritesh ranjan -
OS windows 2000 server
database 9i
I am planning following script for backup of database.
run{
allocate channel ch1 type disk;
backup
format 'E:\oracle\backup\/%d_%s'
database plus archivelog delete input;
release channel ch1;
Want to overwrite the backup on every sunday on disk.
1.What changes should I make in script so that RMAN should not create new file
and overwrite older one.Thanks.
Now I can schedule backup job through above script.
With this script
run{
allocate channel ch1 type disk;
backup
format 'E:\oracle\backup\/%d_%s'
database plus archivelog delete input;
release channel ch1;
and CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
I want to delete obsolete backup
run{
allocate channel ch1 type disk;
backup
format 'E:\oracle\backup\/%d_%s'
database plus archivelog delete input;
delete obsolete;
release channel ch1;
It is not working as delete obsolete command asks for confirmation (YES/NO)?
How to do it ? -
NT 의 OCOPY 를 이용한 HOT BACKUP SCRIPT
제품 : ORACLE SERVER
작성날짜 : 2002-04-25
NT 의 OCOPY 를 이용한 HOT BACKUP SCRIPT
========================================
PURPOSE
다음은 NT에서 OCOPY를 이용하여 HOT BACKUP을 하는 SCRIPT를
제공한다.
Examples
1) <Batch file 1 >
Online_backup_data 라는 batch file 은 다음처럼 이루어질 수 있다.
svrmgr23 @d:\temp\begin_user_backup.sql
ocopy73 d:\orant\database\usr1orcl.ora d:\temp\usr1orcl.bck
svrmgr23 @d:\temp\end_user_backup.sql
svrmgr23 @d:\temp\begin_SYS_backup.sql
ocopy73 d:\orant\database\SYS1orcl.ora d:\temp\SYS1orcl.bck
svrmgr23 @d:\temp\end_SYS_backup.sql
svrmgr23 @d:\temp\begin_temp_backup.sql
ocopy73 d:\orant\database\TMP1orcl.ora d:\temp\TMP1orcl.bck
svrmgr23 @d:\temp\end_temp_backup.sql
로 만들 수 있다.
이 때 begin_user_backup.sql file 내용은
connect system/manager
alter tablespace user_data begin backup;
exit; 이고 ,
또 end_user_backup.sql file 내용은
connect system/manager
alter tablespace user_data end backup;
exit;
로 구성되어야 한다.
2) 또는 BATCH FILE 을 다음처럼 구성할 수 있다.
svrmgr23 @d:\temp\backup.sql
backup.sql script 내용은 다음과 같이 작성한다.
connect system/manager
alter tablespace user_data begin backup;
host ocopy73 e:\orant\database\usr1orcl.ora d:\tmp\usr1orcl.bck
alter tablespace user_data end backup;
alter tablespace SYSTEM begin backup;
host ocopy73 e:\orant\database\SYS1orcl.ora d:\tmp\SYS1orcl.bck
alter tablespace SYSTEM end backup;
alter tablespace ROLLBACK_DATA begin backup;
host ocopy73 e:\orant\database\RBS1orcl.ora d:\tmp\RBS1orcl.bck
alter tablespace ROLLBACK_DATA end backup;
alter tablespace TEMPORARY_DATA begin backup;
host ocopy73 e:\orant\database\TMP1orcl.ora d:\tmp\TMP1orcl.bck
alter tablespace TEMPORARY_DATA end backup;
exit;
Reference Documents
-------------------- -
Oracle backup with CA ARCserv question
Hi
I back up Oracle database by using CA ARCserv with agents for Oracle which seems to
be in collaboration with RMAN.
Just in case, I typed RMAN command 'crosscheck ' and then showed some logs, which
means that there are still some archivelogs even after deleting backup data by using
ARCserv.
I thought that typing 'crosscheck ' would show no log because CA ARCserv is in
collaboration with RMAN and RMAN would delete all archive logs automatically after backup.
Is this normal situation? or something is wrong with RMAN / ARCserv ?
Are there any way to delete all data from oracle database after backup with ARCserv ?Hi,
Welcome. You don't provide enough information and what you do is unclear !
What is your Oracle version ?
Can you post your backup scripts ?
Can your post the exact command and the output you find "strange" ?
Best regards
Phil -
RMAN Backup Script not running in cron tab
Hi,
I am having rman backup script which is being executed successfully through shell.
but when scheduled in cron the script is being called but RMAN commands are not getting executed.
i have scheduled cron using oracle user.
Attached below the rman script for taking LEVEL 1 backup
#! /bin/ksh
DATE=`date +%Y-%m-%d`
export ORACLE_SID=ACIDC
export ORACLE_BASE='/home/app/oracle/product/10.2.0'
PATH=$PATH:${ORACLE_HOME}/bin
export PATH
export ULIMIT=unlimited
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib
export LIBPATH=$LD_LIBRARY_PATH:/usr/lib
export TNS_ADMIN=$ORACLE_HOME/network/admin
cd $ORACLE_HOME/bin
rman TARGET= / << EOF > /oraclebkp/rmanlogs/ACIDC/$DATE.log
backup incremental level 1 database;
report obsolete;
delete noprompt obsolete;
exit;
EOF
exit 0
Attached cron script
SHELL=/bin/sh
PATH=:/usr/ucb:/bin:/usr/bin
10 17 * * 2 /oraclebkp/rmanscripts/rmandclvl1.sh 2>&1 >/oraclebkp/cronlogs/delobs.log
Files delobs.log
and oraclebkp/rmanlogs/ACIDC/$DATE.log are being created but with 0 bytes .
Thanks in Advance
HariPriya,rman TARGET= / << EOF > /oraclebkp/rmanlogs/ACIDC/$DATE.log Change this line to and try..
$ORACLE_HOME/bin/rman TARGET= / << EOF > /oraclebkp/rmanlogs/ACIDC/$DATE.log -
Running same backup script on two different Databases
Hello All,
I am running same backup script on two different Databases.
But output is different.
Please give me your feedback.
1) Database 1:
OS: AIX
DB: 10.1.0.4.0
Script:
export ORACLE_SID=sid1
cd $ORACLE_HOME/bin
./rman nocatalog << EOF
connect target
ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE disk;
configure controlfile autobackup on;
backup as compressed backupset database plus archivelog delete input;
delete noprompt obsolete;
exit
EOF
6 Files created:
-rw-r----- 1 oracle dba 4140032 Jun 19 00:00 uvhlvjs8_1_1
-rw-r----- 1 oracle dba 38029824 Jun 19 00:00 backup_uuhlvjs8_1_1
-rw-r----- 1 oracle dba 781287424 Jun 19 00:20 v1hlvjsk_1_1
-rw-r----- 1 oracle dba 578027520 Jun 19 00:23 backup_v0hlvjsk_1_1
-rw-r----- 1 oracle dba 1222656 Jun 19 00:23 backup_v2hlvl7r_1_1
-rw-r----- 1 oracle dba 4259840 Jun 19 00:23 c-1052429639-20060619-00
-rw-r----- 1 oracle dba 4177920 Jun 19 00:23 SNAPCF_ATHENA.F
2. Databse 2:
OS: Linux (SLES 8)
DB: 10.1.0.5.0
Log Archive Filename Format: %t_%s_%r.dbf
2 files created:
1_17804_535674251.dbf 1_17837_535674251.dbf SID_2chlmrrl_1_1.1
1_17805_535674251.dbf 1_17838_535674251.dbf SID_2dhlms8c_1_1.1
I am also getting dbf file every one hour as below:
1_17868_535674251.dbf
DNwaiting for reply
-
Hi all it's very urgent
We are running 4 oracle 9.2 database in a single machine with sap r/3 4.7 on windows 2003 and even in a single drive now i am responsible for backup
which method is prefered one whether BRBACKUP or Manual OR scripting
what about scheduling cold and hot backup
here we have hardware resource constraintHi
For Oracle Backups the preferred backup method is RMAN. I suggest you read docs for more information. Try focusing on incremental backups as you suggested space constraints.
Rgds
Adnan -
Require backup script which deletes the daily backups after weekly backup
Hi,
I am new to Oracle administration. I require a backup script which will delete the daily backups (incremental) after weekly backup is taken (full database backup).
Currently I use Oracle 10g for one of my production server.
My backup strategy is given below.
I would like to take full database backup weekly(online). To be precise, on Saturday.
I need to have daily incremental backup and they should get deleted on Saturday after the weekly full database backup is taken.
Also I would like to keep 4 weeks full backups. After that one by one we need to delete the backup.
For example, if I have 4 weeks fullbackup of February, after taking full backup for first week of March, the backup of first week of February should get deleted.
Kindly help with your suggestions.
Thanks & Regards,
RafnasHi,
Thank you for pointing to the blog. It was very much useful.
I was testing the backup strategy using your script. It worked fine for first set of daily backups.
After weekly backup is taken, the daily backup script fails for taking the backup from next day onwards.
It gives the following error stack.
Starting backup at 05-MAR-09
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 03/05/2009 01:47:55
ORA-01455: converting column overflows integer datatype
Could you please let me know why integer datatype comes into picture while taking backup?
Please advice.
Thanks & Regards,
Rafnas
Edited by: user10698483 on Mar 5, 2009 3:38 AM -
Hello
I have a backup script which is kicked off by cron every 2 hours. I am facing a problem of script geting overlapped .Like say if the script is running at 5 am and the next one is scheduled at 7 am...if 5 am script is still backing up archive logs past 7 am then 7 am script also starts and it finishes abruptly..i want to avoid this situation.
For this i modified my script so that it can check doing a "ps -ef|grep arch_bkup.sh|wc -l"...bt i dont wanto depend on this number everytime...Does anyone came across this situation and has a better solution..Please reply
Thankssure
just from a simple command line:
Returns my grep:
# ps -ef | grep backup_arch.sh
oracle 22449 2861 0 11:30:59 pts/3 0:00 grep backup_arch.sh
# echo $?
0
Returns nothing (used with -v to eliminate the grep that I run)
# ps -ef | grep backup_arch.sh | grep -v grep
# echo $?
1
Normally your output would produce at least 2 lines when the job was running...
Let me know if you need any more assistance with it.
Edited by: Jamie CC on Dec 10, 2009 8:37 AM
Should also mention that $? is the return code of the last command ran so in your script make sure you check it right after your grep...
Edited by: Jamie CC on Dec 10, 2009 8:38 AM -
In oracle Open Script (OATS), we have created an OracleEBS/Forms project. But when we try to record the script all the elements or fields are being identified as web objects. Due to this we are unable to use the functions like getText. Hence, please help.
Example: The below line when executed gives an error " Failed to connect to the Oracle Forms applet after 90 seconds. Verify that the applet launching page opens, and that the Forms Startup Timeout setting is high enough for this site."
forms.textField("/web:window[@index='0' or @title='Person']/web:document[@index='7' or @name='tabPage']/web:input_text[@id='PER_ID' or @name='PER_ID' or @index='0']").getText();
We have already set the event timeouts in OpenScript Preferences -> Playback -> OracleEBS/Forms Functional as
Forms startup time out = 90Sec
Forms Action timeout = 120Sec
Forms Response Timeout = 120 Sec.
OpenScript
Version: 12.4.0.1 Build 139If it is a name resolution I would try either replacing the server name in the script with the IP address or making an entry in the local host file of the machine trying to play back the script
If you try one or both of those approaches does the script play back? -
I created a backup script for my data & system and i'd like to share it.
I have a 320GB hdd (1) as my main hard drive, and a 160GB hdd (2) as a backup drive (i keep this one in a drawer nearby, disconnected from the computer).
What i wanted was to create a partial copy of 1 on 2, such that 2 would contain the entire system (bootable) + a part of my data.
1. You need to have the same filesystem on both (i have ext4). Maybe it works with a mix of ext3 and 4, but it's better to have just one. The partitioning scheme on hdd 1 doesn't matter, but for hdd 2 you need a single partition to which you backup.
2. The scripts:
backup
#!/bin/sh
# rsync backup script
sudo rsync -av --delete-excluded --exclude-from="excl" / "$1"
sudo touch "$1"/BACKUP
This one is very simple. You rsync in archive mode (which ensures that symbolic links, devices, attributes, permissions, ownerships, etc. are preserved) and exclude the files that match the patterns from excl.
The / is the source from where you backup (in our case the whole root) and "$1" is the destination to where you backup (this is passed as an argument to the script).
excl
# Include
+ /dev/console
+ /dev/initctl
+ /dev/null
+ /dev/zero
+ /media/win
+ /var/run/mpd
+ /home/wooptoo/music/Amestecate
+ /home/wooptoo/music/script
+ /home/wooptoo/music/list.txt
+ /home/wooptoo/music/.hg*
# Exclude
- /home/wooptoo/dl/*
- /home/wooptoo/games/kits/*
- /home/wooptoo/mov/*
- /home/wooptoo/music/*
- /dev/*
- /media/*
- /media/win/*
- /mnt/*
- /proc/*
- /sys/*
- /tmp/*
- /var/run/*
- /var/run/mpd/*
This is a bit more tricky. It's an exclude (and include) file in rsync format.
Exclude: I excluded my games, movies and music from the backup, and also the system directories /dev, /media, /mnt, /proc, /sys, /tmp, /var/run. These are excluded because their content is created at runtime by the system. Note that the direcotries themselves are preserved (you need them!) but they are empty.
Include: even though i excluded /dev, i need to include 4 file from it (which are not dinamically created by udev), these are console, initctl, null, zero.
I also included the directories /media/win and /var/run/mpd. But these are empty, because their content was excluded (in the exclude section).
3. So we got these two files: backup and excl.
Mount the backup hdd, let's say at /media/backup/ and run the script:
./backup /media/backup/
rsync will backup the whole root to that destination. I excluded game kits, music and movies from my backup because they are just too large to fit on hdd 2, and it would also take a lot of time to backup and keep in sync afterwards.
4. After the sync is finished you need to install a boot loader on hdd2, so you can have a working copy of your system.
Open the grub console and type in:
root (hd1,0)
setup (hd1)
The root command tells grub where your system is installed (in this case hdd 2, first partition).
Setup tells grub where to install the boot loader. In my example it is installed in the MBR of hdd 2.
The problem here is that the boot loader installs correctly, but its menu entries are for the partitions of the main system, not the backup system. So if you'll try to boot the backup system, it won't work.
You can fix this by creating a custom menu.lst for the backup hdd. But i prefer not to do this, in order to have an accurate copy of my data. I just prefer to edit the entries from the boot menu on the fly if i need to boot the backup directly. But you can automatically add a custom menu.lst to the backup hdd from the backup script:
#!/bin/sh
# rsync backup script
sudo rsync -av --delete-excluded --exclude-from="excl" / "$1"
sudo cp ~/custom.menu.lst "$1"/boot/grub/menu.lst
sudo touch "$1"/BACKUP
5. Reboot and try out your new system.
I think this approach (system + data backup) is better than just data backup because if something goes wrong with the main hdd, you can always swap in the backup one and continue working. Besides this, you now have another working system, from which you can recover the main one without the need of live CDs.
In my setup both hdds are SATA with AHCI, so they are hot-pluggable. You can plugin the backup drive, run the backup script, and disconnect it. This is very advantageous because you don't have to reboot.
But you can use an USB stick/hdd as backup drive if you only have IDE.
I would like to know what do you think of my backup strategy. Is it good or am i doing it wrong? Are there better methods? What backup strategy do you use? etc.
Last edited by wooptoo (2009-10-24 01:40:46)I use the following to rotate four backups and backup my root and home separately and hard-link common files between all the backups. I run this weekly to have backups of the last four weeks while using barely more space then one full backup would. It is not super customisable as it is my personal script and I've been wanting to add in a check to see whether the backup location is actually mounted, but I've not gotten to it just yet
#!/bin/bash
# Script to rotate three backups of / and /home and make a new incremental
# backup. No arguments required. Make sure the correct disk is mounted at
# $PAR, though!
# Original command ran to create the first backup of /home :
# /usr/bin/sudo /usr/bin/rsync --progress --stats -avz \
# --exclude-from=/home/ramses/home_backup_excludes --delete-exludes \
# /home/ /media/seadisc/home_backup.0
# Variables and paths
PAR="/media/seadisc/backup"
HOME_EXCLUDES="/usr/local/bin/backup_config/home_backup_excludes"
ROOT_EXCLUDES="/usr/local/bin/backup_config/root_backup_excludes"
SUDO="/usr/bin/sudo"
MV="/bin/mv"
RM="/bin/rm"
RSYNC="/usr/bin/rsync"
DATE="/bin/date"
TEE="/usr/bin/tee"
# Home backups
echo "Moving previous /home backups ..."
$SUDO $RM -rf $PAR/home_backup.3
$SUDO $MV $PAR/home_backup.2 $PAR/home_backup.3
$SUDO $MV $PAR/home_backup2_date $PAR/home_backup3_date
$SUDO $MV $PAR/home_backup.1 $PAR/home_backup.2
$SUDO $MV $PAR/home_backup1_date $PAR/home_backup2_date
$SUDO $MV $PAR/home_backup.0 $PAR/home_backup.1
$SUDO $MV $PAR/home_backup0_date $PAR/home_backup1_date
echo "Doing incremental backup of /home ..."
$SUDO $RSYNC --progress --stats -av \
--exclude-from=${HOME_EXCLUDES} \
--delete --delete-excluded \
--link-dest=$PAR/home_backup.1 \
/home/ $PAR/home_backup.0
$SUDO $DATE | $TEE $PAR/home_backup0_date > /dev/null
# Root backups
echo "Moving previous / backups ..."
$SUDO $RM -rf $PAR/root_backup.3
$SUDO $MV $PAR/root_backup.2 $PAR/root_backup.3
$SUDO $MV $PAR/root_backup2_date $PAR/root_backup3_date
$SUDO $MV $PAR/root_backup.1 $PAR/root_backup.2
$SUDO $MV $PAR/root_backup1_date $PAR/root_backup2_date
$SUDO $MV $PAR/root_backup.0 $PAR/root_backup.1
$SUDO $MV $PAR/root_backup0_date $PAR/root_backup1_date
echo "Doing incremental backup of / ..."
$SUDO $RSYNC --progress --stats -av \
--exclude-from=${ROOT_EXCLUDES} \
--delete --delete-excluded \
--link-dest=$PAR/root_backup.1 \
/ $PAR/root_backup.0
$SUDO $DATE | $TEE $PAR/root_backup0_date > /dev/null
Maybe you are looking for
-
I dual booted Windows 8 with Windows 7 and now the RECOVERY partition (F is not loading upon pressing F11. It gives me the boot configuration data error. I have it marked as Healthy (Primary Partition) and I am able to access the files via. My Comput
-
Adobe LiveCycle Designer 9.8
Hello, I would like to install the latest version of Adobe LiveCycle Designer. According to SAP Note 1658830 ( 'Adobe LiveCycle Designer 9.8 - Installation' ) this is the version 9.8. I have searched the file "67837800102000002446 Adobe LiveCycle Des
-
Quality Issues in QuickTime Movies
I have notices since switching over that movies that I created on iMovie, and then exported using QuickTime are playing lousy. I found this out when watching them on Front Row. They are very pixelated. Any thoughts would be greatly appreciated. Russe
-
Pencast Pdf file audio doesn't work
I have to download lectures from my professor for class and she has a Pencast pdf file with audio but it does not work on my computer. I have tried opening it up on Safari and Chrome but neither have worked. I have downloaded the most recent version
-
Download to Excel returning no data in the excel sheet
Hi All, I have used UI elements guide to create Download to Excel link in my application. I wrote following code in wdDoInit() IWDResource resource = WDResourceFactory.createResource(new byte[<number of bytes>], "<name of the file>", WDWe