Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Work Tasks

Database Connection

  • Last UpdatedJun 20, 2024
  • 6 minute read

You can package and deploy a Database Connection from one environment or repository to another environment or repository using the package feature in AVEVA Work Tasks.

To add Database Connection to Package Template

  1. Log on to the Enterprise Console.

  2. On the menu, point to Settings, and then click Database Connections.

    The Connection List window appears.

  3. Select the database connection that you want to package.

  4. Right-click the database connection and then click Add to Package Template.

    The Add to Package Template dialog box appears.

    For more information about adding artifacts to Package Template, see Adding Artifacts to a Package Template.

    You can set the configuration properties of a Database Connection in the Add to Package Template window. The left side of the configuration window shows the package template and its configurations. You can set the configuration properties of the Database Connection package in the Settings form on the right side of the Add to Package Template window.

Runtime Initialization Settings

You can configure runtime initialization settings for database connections. For more information about configuring runtime initialization settings, see Runtime Initialization Settings.

Configuration Settings for Database Connection

The Database Connection has an unique set of configuration settings required to install, update, and uninstall the package.

You can view and edit the configuration settings from one of the following windows:

  • Source Environment > Package Template window

  • Target Environment > Manage Package window

The Package Template configuration window contains the following tabs:

  • Settings

    • Install

    • Update

    • Uninstall

  • Associated Artifacts

  • Child Artifacts

Settings Tab

You can define the properties in the Settings tab to take appropriate actions to install, update, or uninstall a package.

Install

Use this tab to set the configurations for installing the package.

  • Connection Exists: Select this property to take appropriate action when the database connection in the package is already present in the target environment.

    • Do not install connection: Select this option to use the database connection, present in the target environment.

    • Install to overwrite the existing connection: Select this option to overwrite the database connection in the target environment with the one that is present in the package. During the package installation, backup will be taken before overwriting the existing artifact.

Update

Use the settings in this tab to update an installed package.

  • Delete connection: Use this property to delete the database connection present in the target environment.

    • Yes: Select this option to remove the database connection from the target environment.

      Connection is modified: Select this option to retain, roll back to original state, or delete the database connection in the target environment even after the package is updated. This property is applicable only if Delete connection is set to Yes and the database connection is modified.

      • Retain: Select this option to retain the database connection with the modifications in the target environment even after the uninstalling the package.

      • Rollback to original state: Select this option to rollback the database connection to the original state. All modifications done to the database connection after installation in the target environment will be rolled back. However, the database connection will be retained in the target environment.

      • Delete: Select this option to delete the database connection from the target environment while updating the package.

    • No: Select this option to retain the database connection in the target environment.

      Connection exists: Select this option to take appropriate action when the database connection that is being installed is present in the target environment.

      • Do not install connection: Select this option if you do not want to update the database connection as associated artifacts are not present.

      • Install to overwrite existing connection: Select this option to overwrite the database connection present in the target environment with the one that is currently being packaged.

Uninstall

Use this tab to configure the settings when the package is being uninstalled from the target environment.

  • Delete connection: Select this property to retain or delete the database connection in the target environment after you uninstall the package.

    • Yes: Select this option to delete the database connection from the target environment when the package is uninstalled.

    • No: Select this option to retain the database connection in the target environment even after the package is uninstalled.

  • Connection is modified: Select this property to retain, rollback, or delete the database connection in the target environment after uninstalling the package. This property is displayed only if Delete connection is set to Yes. However, if Delete connection is set to No, this property is not displayed.

    • Retain: Select this option to retain the database connection with the modifications in the target environment even after the package is uninstalled.

    • Rollback to original state: Select this option to rollback the database connection to the original state. All modifications that were done to the connection after it was installed in the target environment will be reverted. However, the connection will be retained in the target environment.

    • Delete: Select this option to delete the database connection from the target environment when uninstalling the package.

Connection Details

Use the Connect to Repository DataSource settings to choose between an existing repository connection string or a different connection string.

Source:

  • Use the Connect to Repository DataSource option in the Source to view the connection string that is used in the source environment.

Target:

  • Use the Connect to Repository DataSource option in the Target to edit the connection string of the target environment.

    • Select Yes to use the connection string of the current repository to connect to the database connection.

    • Select No to define a new connection string.

Field

Description

Database type

Select SQL Server.

Connection type

Select either Connection string or Connection provider.

If Connection type is Connection string

Field

Description

Server name

Enter the name of the data source server.

Authentication type

Provide information on the process used to validate a user. Both Windows and Microsoft SQL Server authentication process is supported.

If Database type is Microsoft SQL Server, then authentication type can be either Microsoft SQL Server or Windows.

User Id

Enter the Microsoft SQL Server user ID for Microsoft SQL Server type of authentication. For Windows Authentication, User Id is disabled.

Password

Enter the Microsoft SQL Server password for Microsoft SQL Server type of authentication. For Windows Authentication, Password is disabled.

Advanced settings

(Optional). You can enter any additional connection information, such as connection timeout. For example, Connection Timeout = 20

Database

Enter the name of the database.

If Connection Type is Connection Provider

Field

Description

Assembly path

Enter the path of the connection dll.

In a client-server environment, the dll must be present on the machine that hosts the Enterprise Console site. All requests of install and uninstall are sent to the host site.

 

Param

Specify the parameters required by the connection dll.

SQL script

Enter the SQL script in the query window.

The SQL script written in the query window can be packaged from one SQL server machine and can be installed in another SQL server machine only. Oracle is not supported.

The Validate SQL script button validates the script for the usage of the restricted SQL commands, but does not validate syntax of the SQL query in the script. Ensure to enter an error free SQL script.

The following SQL commands are restricted:

  • Delete

  • Truncate

  • Drop

  • Update

  • Create User

  • Grant

  • Revoke

  • Execute

Attach SQL script

Use this button to upload a SQL script. You can attach files of .sql type only.

By default, the Attach SQL script button is invisible. Click the Attach SQL script file check box to see it.

The SQL scripts are executed in sequence. First the script in the SQL script query window is executed followed by the attached SQL script. Even if the script execution in the SQL script query window fails, the attached SQL script continues to execute.

You can attach only one script per database connection. Maximum size of the attached file is restricted to 10 mb.

Note: If the SQL script is executed successfully , then the following message appears in the Package History dialog box.

The SQL script is executed successfully.


If the SQL script execution fails, then the following message appears:

The SQL script execution failed.

If you click the message, the Message Details page appears, where you can view the message details.

See Also: SQL Script Generation and Execution

Associated Artifacts of Database Connection

Database Connection does not have any associated artifact.

Child Artifacts of Database Connection

Database Connection does not have any child artifact.

Security Artifacts of Database Connection

You can enable the security settings of the database connection that you want to include in the package.

For more information about including security artifacts, see Include Security Artifacts.

In This Topic
TitleResults for “How to create a CRG?”Also Available in