简体   繁体   English

Teradata乔布斯和KSH

[英]Teradata Jobs and KSH

I tried searching online but was unable to find anything pertaining to my requirements. 我尝试在线搜索,但找不到与我的要求有关的任何内容。 I am new to Teradata. 我是Teradata的新手。

In our team Teradata jobs are used to call the ksh which in turn calls the procedure to run at a scheduled time. 在我们的团队中,Teradata作业用于调用ksh,后者又调用该程序在计划的时间运行。

I want to understand how exactly does this calling works? 我想了解此调用的工作原理是什么? How does a job call a KSH and then how does a KSH call a procedure in turn. 作业如何调用KSH,然后KSH如何依次调用过程。

Your help would be much appreciated. 您的帮助将不胜感激。

At a very basic level UNIX has a scheduler mechanism called cron . 在最基本的级别上,UNIX具有称为cron的调度程序机制。 Users with sufficient privilege on the UNIX server can use cron to run jobs at a scheduled time by defining a crontab . 在UNIX服务器上具有足够特权的用户可以通过定义crontab在预定的时间使用cron运行作业。 Your crontab can call UNIX commands or in many cases a shell script ( ksh in your example) to perform a complex set of operations. 您的crontab可以调用UNIX命令,或者在许多情况下可以调用Shell脚本(在您的示例中为ksh )来执行一组复杂的操作。 In many production environments jobs may be scheduled using an enterprise platform instead of many independent crontab files across many users and many servers in the data center. 在许多生产环境中,可以使用企业平台而不是跨数据中心中许多用户和许多服务器的许多独立crontab文件计划作业。

As this pertains to Teradata, the ksh is likely invoking a Teradata utility such as BTEQ to logon to the database and execute a stored procedure, macro, or set of SQL statements contained within the BTEQ script. 由于这与Teradata有关,因此ksh可能会调用Teradata实用程序(例如BTEQ登录数据库并执行BTEQ脚本中包含的存储过程,宏或SQL语句集。 Once the BTEQ script has completed a return code is sent to the ksh script to account for any error handling should an error occur within the BTEQ script or an unhandled/handled error within the stored procedure. 一旦BTEQ脚本完成,则将返回代码发送到ksh脚本,以解决BTEQ脚本中发生错误或存储过程中未处理/未处理的错误的任何错误处理。

You can use your search engine of choice to read up on how to develop UNIX shell scripts (Korn, Bash, etc.) and how Teradata utilities such as BTEQ work. 您可以使用所选的搜索引擎来阅读如何开发UNIX Shell脚本(Korn,Bash等)以及Teradata实用程序(例如BTEQ)如何工作。 If you have a more discrete question about something in your environment feel free to post a separate question here with the appropriate tags in the question to target the audience who can best help you. 如果您对环境中的问题有一个比较离散的问题,请随时在此处发布一个单独的问题,并在其中加上相应的标签,以最能为您提供帮助的受众为目标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM