ORACLE Êý¾Ý¿â×Ô¶¯±¸·Ý½Å±¾
#! /bin/bash
if [ -f ~/.bashrc ];then
. ~/.bash_profile
fi
export script=/home/oracle/script
export bakdata_destination=/u02/rman_backup/data
export baklog_destination=/u02/rman_backup/log
export datadir=`date +'%Y_%m_%d'`
export days=`date +'%w'`
if ! test -d $script
then
mkdir -p $script
fi
if ! test -d $bakdata_destination
then
mkdir -p $bakdata_destination
fi
if ! test -d $baklog_destination
then
mkdir -p $baklog_destination
fi
if [ $days -eq 1 ];then
#create the directory for datafile
if ! test -e $baklog_destination/failedlog.txt
then
touch $baklog_destination/failedlog.txt
fi
if [ $? = 0 ];then
echo "you is the frist create the failed file"
fi
if ! test -e $baklog_destination/successful.txt
then
touch $baklog_destination/successful.txt
fi
if [ $? = 0 ] ; then
echo "you is the frist creat the successful file"
fi
if ! test -d $bakdata_destination/$datadir
then
mkdir $bakdata_destination/$datadir
fi
if [ $? -eq 1 ]; then
echo "Error :Cann't create the directory,please check the reason! ">>$baklog_destination/failedlog.txt
fi
echo run { >$script/rman_level0.rman
echo "backup incremental level 0 database filesperset = 7 format '"$bakdata_destination/$datadir/bak0_`date '+%Y_%m_%d_%H_%M_%S'`.bak"';" >>$script/rman_level0.rman
echo "sql \"ALTER SYSTEM ARCHIVE LOG CURRENT\"; ">>$script/rman_level0.rman
echo backup archivelog all delete input >>$script/rman_level0.rmanecho "format '"$bakdata_destination/$datadir/arc0_`date '+%Y_%m_%d_%H_%M_%S'`.bak"';" >>$script/rman_level0.rman
echo } &
Ïà¹ØÎĵµ£º
OracleÐÔÄܵ÷ÕûµÄÎóÇø
http://tech.it168.com/db/o/2006-07-03/200607031305157.shtml
ΪÁËÌá¸ßÐÔÄÜ,ÎÒÃÇÕë¶ÔOracleÊý¾Ý¿â±¾ÉíÌṩÁ˵ķ½·¨»ò·½°¸½øÐйý²»Éٵij¢ÊÔ£¬Ö÷Òª°üÀ¨:
¹²Ïí·þÎñÆ÷ģʽ(MTS)
¼¯Èº¼¼Êõ(Clustering)RAC
·ÖÇø
²¢ÐÐ ......
Oracle»¥»»×ܽá
1. ¶àÐл»³ÉÒ»ÐÐ
col1 col2 col1 col2
a 1
a 2 ת»»ºó ......
×î½üµÄÑо¿·¢ÏÖ Oracle Êý¾Ý¿âËùʹÓõÄË÷Òý´ÓÀ´Ã»Óдﵽ¹ý¿ÉÓÃË÷ÒýÊýµÄ1/4£¬
»òÕßÆäÓ÷¨ÓëÆ俪ʼÉè¼ÆµÄÒâͼ²»Ïàͬ¡£Î´ÓõÄË÷ÒýÀ˷ѿռ䣬¶øÇÒ»¹»á½µµÍ DML
µÄËٶȣ¬ÓÈÆäÊÇ UPDATE ºÍ INSERT Óï¾ä;¿ØÊý¾Ý¿âË÷ÒýµÄʹÓã¬ÊÍ·ÅÄÇЩδ±»Ê¹ÓÃ
µÄË÷Òý£¬´Ó¶ø½Úʡά»¤Ë÷ÒýµÄ¿ªÏú£¬ÓÅ»¯sqlÐÔÄÜ
ÔÚ Oracle9i ֮ǰ£¬¼à¿ØË÷ÒýʹÓõÄÎ ......
Ò»¡¢Êý¾Ý¿âµÄÏà¹Ø¸ÅÄî
Êý¾Ý¿â£¨DB£©ÊÇÒ»¸ö°´Êý¾Ý½á¹¹À´´æ´¢ºÍ¹ÜÀíÊý¾ÝµÄ¼ÆËã»úÈí¼þϵͳ¡£
1¡¢Êý¾Ý¿â¹ÜÀíϵͳÓëÊý¾Ý¿âÓ¦ÓÃϵͳ
(1)Êý¾Ý¿â¹ÜÀíϵͳ£¨Database Management System£©
Êý¾Ý¿â¹ÜÀíϵͳ£¨DBMS£©ÊÇרÃÅÓÃÓÚ¹ÜÀíÊý¾Ý¿âµÄ¼ÆËã»úϵͳÈí¼þ¡£Êý¾Ý¿â¹ÜÀíϵͳÄܹ»ÎªÊý¾Ý¿âÌṩÊý¾ÝµÄ¶¨Òå¡¢½¨Á¢¡¢Î¬»¤¡¢²éѯºÍͳ¼ÆµÈ²Ù ......