1. 程式人生 > >shell編程中如何執行oracle語句

shell編程中如何執行oracle語句

方式 rac sqlplus 數據 bsp echo nbsp 參考 user

shell編程中如果向oracle中插入數據之類的,需要先把執行語句放到文件中,然後再@這個文件執行

有如下倆種方式供參考:


SQL=`sqlplus user/pwd@orains <<EOF
@Sqlfile
exit
EOF
`
或者
echo "exit"|sqlplus user/pwd@orains @sqlfile

shell編程中如何執行oracle語句