易截截图软件、单文件、免安装、纯绿色、仅160KB

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互换总结

Oracle互换总结
1. 多行换成一行
    col1  col2            col1  col2
    a       1
    a       2     转换后 ......

hibernate.cfg.xml关联Oracle数据库的配置

<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE hibernate-configuration (View Source for full doctype...)>
- <!-- Generated by MyEclipse Hibernate Tools.
--> - <!-- 以上几行所有的hibernate.cfg.xml都相同
--> [url=file:///C:/Documents%20and%20Settings/ ......

Oracle千万条记录插入与查询小结

最近做了个项目,实现对存在千万条记录的库表进行插入、查询操作。原以为对数据库的插入、查询是件很容易的事,可不知当数据达到百万甚至千万条级别的时候,这一切似乎变得相当困难。几经折腾,总算完成了任务。
1、 避免使用Hibernate框架
Hibernate用起来虽然方便,但对于海量数据的操作显得力不从心。
关于插入: ......

Oracle异常总结

PL/SQL 的异常(预定义异常)
2009-08-13 20:24
异常名称                                         & ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号