質問

I tried searching online but was unable to find anything pertaining to my requirements. I am new to Teradata.

In our team Teradata jobs are used to call the ksh which in turn calls the procedure to run at a scheduled time.

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.

Your help would be much appreciated.

役に立ちましたか?

解決

At a very basic level UNIX has a scheduler mechanism called cron. Users with sufficient privilege on the UNIX server can use cron to run jobs at a scheduled time by defining a crontab. Your crontab can call UNIX commands or in many cases a shell script (ksh in your example) to perform a complex set of operations. 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.

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. 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.

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. 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帰属
所属していません StackOverflow
scroll top