Running a SQL Script
InstallAnywhere 2020 SP1
InstallAnywhere offers a Run SQL Script action that enables you to run SQL scripts on local database servers. For MySQL, Microsoft SQL Server, IBM DB2, and PostgreSQL databases, this action also lets you run SQL scripts on remote database servers. Before you can add this action to a sequence on the Sequences page, you need to add a database server host in the Hosts view. To learn how, see Adding a SQL Database Host to Your Project.
The Run SQL Script action enables you to optionally create a SQL database on MySQL, Microsoft SQL Server, and PostgreSQL database servers at run time. Note the following details about the run-time behavior that occurs if you specify that you want the action to create the database:
|
•
|
The user account that is used to connect to the server must have database administrator privileges. |
|
•
|
The action creates a basic database with default parameters. |
For example, for a MySQL database, the default character set and collation are used.
|
•
|
The action does not verify whether the database name already exists for a database on the target system. |
To add a Run SQL Script action to your project:
|
1.
|
In the Advanced Designer, on the Sequence page, click Install. The Install view opens. |
|
2.
|
In the Visual Tree list, click the database host that corresponds with the server on which you want to run the SQL script. |
|
3.
|
Click the Add Action button. The Choose an Action dialog box opens. |
|
4.
|
On the Install tab, click the Run SQL Script action. InstallAnywhere adds the action to the Visual Tree. |
|
5.
|
In the Properties Customizer area, configure each of the action’s settings as needed. |
For detailed information about each of the settings that you can configure for the action, see Run SQL Script Action.
See Also
Install View
Open topic with navigation