看看sh哪里出错了,

[复制链接]
查看11 | 回复2 | 2007-10-20 08:38:44 | 显示全部楼层 |阅读模式
#!/bin/sh
#
scritp:coldbak
#
create:thomasliu
#
date:20080304
#
desc

ffline full backup database

#
sqlplus start
$ORACLE_HOME/bin/sqlplus sys/test@w1 as sysdba
#
connect database
#
shutdown database
shutdown immediate;
#
quit sqlplus
exit
#
copy datafile
cp $ORACLE_DATA/*.dbf $ORACLE_BASE/backup
#
copy control file
cp $ORACLE_DATA/*.ctl $ORACLE_BASE/backup
#
copy log file
cp $ORACLE_DATA/*.log $ORACLE_BASE/backup
#
sqlplus start
$ORACLE_HOME/bin/sqlplus sys/test@w1 as sysdba
#
startup database
startup;
回复

使用道具 举报

千问 | 2007-10-20 08:38:44 | 显示全部楼层
1、没有export
2、
$ORACLE_HOME/bin/sqlplus sys/test@w1 as sysdba <<EOF
shutdown immediate;
exit
EOF
回复

使用道具 举报

千问 | 2007-10-20 08:38:44 | 显示全部楼层
调试几把,看哪报错了,再来修改
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行