迁移比较快,1个小时左右就完成了。
周五开发人员那边没有发现异样,直到到12月12日星期一,开发人员反映有的表的comments存在乱码的现象。
突然发现所有的表的comments都出现乱码现象,离迁移完成已经过去3天,不能做回退,只能手动更改注释,比对数据,这个过程比较痛苦,万幸的是数据库比较小,影响范围比较小。
以后做导出时可以参考一下下面的备份脚本,export_full.sh
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
. ~/.bash_profile
export EXPLOG=/home/oracle/backup/fullexp.log
echo `date` "begin exp" >> $EXPLOG
mknod /db/backup/exp/export_pipe p
nohup /bin/gzip < /db/backup/exp/export_pipe > /db/backup/exp/expfull_`date +%Y%m%d`.dmp.gz &
exp userid=expname/passwd file=/db/backup/exp/export_pipe full=y statistics=none buffer=800000 >> $EXPLOG 2>> $EXPLOG
echo `date` "end exp" >> $EXPLOG
rm -rf /db/backup/exp/export_pipe
scp /db/backup/exp/expfull_`date +%Y%m%d`.dmp.gz backup@xx.xx.xx.xx:/exportbackup
###################.bash_profile文件内容
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
ORACLE_BASE=/db/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/10.2.0.3
ORACLE_SID=testdb
PATH=$ORACLE_HOME/bin:$PATH:$ORACLE_HOME/OPatch:/sbin
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
export NLS_LANG=american_america.zhs16gbk #就是这个参数,在导入导出的时候一定要设置#
export LD_LIBRARY_PATH
export ORACLE_BASE
export ORACLE_HOME
export ORACLE_SID
export PATH
export PATH
unset USERNAME
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/21374452/viewspace-2130668/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/21374452/viewspace-2130668/