checkcustomer(){
isql -Uxxx -Pxxx -Sxxxx <<EOF
select customer,customer_name,short_name,local_lang_type,local_lang_cust_name,sovereign_off,address1,address2,address3,address4,city,state,postal_code,country,nearest_airport,phone,fax,email_address,www_server_addr,corp_code,customer_type,business_category,GST_reg_no,is_busi_partner,iata_code,active_flag,loc_row_crt_date,create_office_code from cust_service..n_cust where customer="$1"
go
EOF
}
一般crontab无法执行,基本跟权限、路径和profile有关。#!/bin/bash
source /home/git/.bash_profile#先加载你可以执行这条命令的.bash_profile,在测试一下。
dbisql -c "uid=DBApwd=sql" -host 192.168.0.34 -port 2638 /home/gjt/query.sql
Profile ydfSQLCA.DBMS = "OLE DB"
SQLCA.LogId = "sa"
SQLCA.AutoCommit = true
SQLCA.DBParm = "PROVIDER='SQLOLEDB',DATASOURCE='192.168.31.163',PROVIDERSTRING='database=BYD2015'"
connect using sqlca
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)