The Form tab is object type-specific and is only available in SQL, JMX, PeopleSoft and SAP jobs. You can easily enter SQL statements by using forms.
Object: Job
Object class: Executable object
Object type (short name): JOBS
The window is divided into two parts. The right half shows a tree structure that lists all script elements (JMX JCL) that are provided by AE, as well as SQL statements. Double-click one of the sub-categories in order to add the appropriate script element to the list in the left half of this tab.
An entry form opens if an AE Script element is concerned. The view is different if you opted for an SQL statement. A convenient interface helps you to formulate commands. The middle area of the tab shows a text field in which you can enter the statement. The displayed syntax provides input assistance. The text field's font type and size depend on the settings that have been made in the UserInterface. The right column shows the databaseA database is an organized collection of data including relevant data structures. structure with all the tables and their columns. The primary key and the foreign key are flagged with special icons. Table and column names can be moved to the text field by using the drag and drop function.
Note that the database structure can only be displayed if an agent and a Login object with valid login data have been selected in the job.
Each SQL statement must be entered in a separate line. The following illustration shows that SQL_ON_ERROR and SELECT are dealt with in separate lines. Within a statement, you can use several lines.
Entries that are made in the form or text field are automatically written to the Process tab. The order of the SQL statements automatically corresponds to the order that is shown in the list (compare Form and Process tab). The order can be changed at any time simply by moving the arrow keys in the upper left half of the window.
By default, each statement ends with a semicolon. If this character is used within an SQL statement, a different separator is defined and the job automatically inserts the statement SQL_SET_STATEMENT_TERMINATOR in the script.
The database agent uses SQL statements exactly as specified in the job. Statements are not adjusted before they are passed on to the database. Therefore, Automic strongly recommends only using SQL statements the database supports. For example, the MS SQL Server command GO is adjusted by the Query Analyzer before it is passed on to the database. No such adjustment takes place within the database agent.
Note for MS SQL Server Databases (especially in combination with transactions): SET IMPLICIT_TRANSACTIONS is set to the default value ON. Further information is available in the corresponding Microsoft documentation.
Further symbols for editing the list:
Symbol |
Description |
---|---|
|
Inserts a new line at the current position. |
|
Duplicates the highlighted line. |
|
Inserts a new line at the end. |
|
Removes the current line. |
The traffic lights symbol shown at the bottom left edge of the Form tab indicates the database's connection status.
Instead of specifying values in Form fields, you can also insert script variables.
See also: