我是编写autosys / jil作业和unix shell脚本的新手。我需要编写一个autosys作业来调用/执行一个unix脚本 - 它在内部执行一个ms-sql脚本文件(包含sql脚本)。有人可以帮我告诉我这是如何使用jil定义或编写的? 此外,我是否需要将ms-script文件转换为存储过程以通过unix shell scipt执行它。
以下是我写这篇文章的尝试。有人可以帮忙纠正这个吗?
Sql-Server脚本文件名:sqlServDB_script.sql Unix shell脚本文件:DBTest.sh
DBTest.sh
sqlplus -s username/password@servername << EOF
@sqlServDB_script.sql
spool off
EOF
insert_job: sqlServDB_script
job_type: c/b
command: /sqlserverDBA/scripts/Autosys/DBTest.sh
machine: mc-uat
owner: admin@uat-mc
permission: gx,wx,mx,me
days_of_week: all
start_times: "04:00,08:00, 12:00, 16:00, 20:00, 24:00"
description: "Jobs to monitor if database is up and accepting connections"
alarm_if_fail: 1
max_exit_success: 1