To use other database-activities, you must first open a connection to the database in question so that other activities can use it. This can be done using the Connect to database activity.
|Table of contents|
To connect to a database using the Connect to database activity, you have the option to enter the connection string to the Connection string field or use the database connection dialog accessible by clicking the ... button next to the connection string field. You can also change the Connection name from the default value connection since it is used in other databased-related activities.
Connect to database also acts as a container for other activities that execute queries or are related to a database in other ways. This activity is most often used to connect to a database before or after masking, to either disable or enable certain triggers, constraints, etc. that could stand in the way of the anonymization process.
Note: BizDataX does not support automatic disabling of triggers, constraints or indexes and enabling them back again out-of-the-box, but this activity can be used to perform custom queries that do that.
This example will demonstrate how to connect to a Microsoft SQL Server database, the DemoDatabase. Start by dragging the Connect to database activity from the Toolbox to the workflow. Then either enter the correct connection string, or use the database connection dialog to generate one.
To use the database connection dialog, click on the ... button next to the connection string field. If a data source is not yet chosen, the Change Data Source dialog will be opened. In this case, I chose the Microsoft SQL Server data source and the .NET Framework Data Provider for SQL Server as the data provider. Other types of databases have different data sources and data providers.
Figure 1: Change Data Source dialog
After clicking OK, another dialog opens up, the Connection Properties dialog will be opened. Here, enter your server name and database name, after which you can test the connection by clicking the Test Connection button. After the confirmation saying that the test connection succeeded, click the OK button. This will have generated a connection string to the desired database.
Figure 2: Connection Properties dialog
After entering or generating a connection string, change the name of the connection to something more descriptive (e.g. BdxDemo) in case you have to create multiple database connections. These actions created a new database connection that you can use with other database-related activities to make changes to your database from within a BizDataX package.
Figure 3: Connecting to a database
|Property group||Property name||Description||Example|
|Input properties||ConnectionString||Database connection string.||Write
|ProviderName||Database provider invariant.||
|Misc||DisplayName||Display name of the activity in the workflow.||