The following properties of SQL files as well as SQL Editor windows (with or without SQL statements) are displayed in the Properties window:
Always reads "SQL" for SQL files.
Group statements for execution with
Here you can choose how statements should be grouped when the script in the SQL Editor window is executed. See also Executing SQL.
Abort execution on error
SQL scripts may contain multiple statements in the same file. If any of the statements fails during execution, you may want to abort executing of the rest. Select this check box to enable this behavior.
Ignore input parameters
Applicable only for DatabaseSpy Enterprise edition. If the SQL file contains statements that contain parameters (SQL Templates), a dialog box appears when you run the script. Select this check box to suppress the dialog box.
For unsaved SQL Editor windows, this drop-down list lets you define a database type. Note that this field will be adapted automatically if you choose a data source.
Here you can choose from the data sources that have been added to the project. As several data sources may be active at one time, it is necessary to be able to assign data sources to SQL files as a group or individually.
Note: Assignments made in the Project tab apply to the SQL files when they are opened or executed.
Displays the root object of the current connection. This is relevant only for those database kinds that support a single database as the root object.
Here you can enter a description of the file.
Displays the respective creation and modification dates and shows when the file has last been accessed.
Shows the file size.
These properties are read-only and can only be changed outside DatabaseSpy.
Displays the full path to the file. To jump directly to this location, right-click the file in the Project window and select Locate File... from the context menu.
Default properties for SQL Editor windows
The following scenarios can occur when you open a new SQL Editor window:
•No project: If no project has been opened in the Project window, any new SQL Editor window that you open will have the properties Database Kind = "Unknown" and Data Source = "Offline".
•Data source connected: If you open an SQL Editor window immediately after you have connected to a data source, the connection properties of this data source will be used for that SQL Editor window. Note that the data source still has to be selected in the Project window.
•Several data sources defined in one project: If you have opened a project with several different data sources, you can set the connection properties by clicking on a particular data source before opening an SQL Editor window. If you select a disconnected data source, the Execution Target Bar provides you with a Connect button to establish a connection to the data source. Clicking on any other item in the Project window will open an SQL Editor in the Offline mode.
Working with SQL files in the Offline mode
One of the options available to you when selecting from the Data Source combo box is "Offline". Designating an SQL file as offline means that it is blocked from being executed. The file cannot be executed when opened in the SQL Editor or when selecting Execute SQL from the context menu in the Project window.
All SQL Editor commands and functions are available when editing this file however, you just have the added security of not being able to execute it without having to change the settings in the Properties window.