Follow the steps in this guide to deploy an application with a connection to an external SQL Server or Azure Server database from a development environment (Dev environment) to the next environment, in this case, the quality assurance environment (QA environment).
Use this guide after you created the integration with the external database in your Dev environment and if your application needs to connect to different external SQL Server databases in each environment.
Remove database name from the Extension in Dev environment
When connecting to an external database, the configurations set in the Extension override the corresponding configurations set in environment-specific Database Connection.
In the Extension, the Table or View Name field of each Entity defines the table name, and is set by the Connect to External Table or View... wizard as a three-part table name,
To make sure your application connects to the correct database in each environment, the Table or View Name field of each Entity must not include the database name and must be defined as a two-part table name,
Follow these steps to remove the database part from the Extension:
Open the Extension that contains the connection to the external database.
Tip: Open the Extension directly from Service Studio by opening the application and then selecting the Extension.
In Integration Studio, connect to your Dev environment.
In each Entity, make sure the Table or View Name field is set as two-part table name,
[<schema>].[<table>]. If you used the Connect to External Table or View... wizard to create the Entity, remove the database name from the Table or View Name field.
Select 1-Click Publish to re-publish the Extension.
In Service Studio, open each consumer Module that references the Entities, refresh the Dependencies and publish.
Define a Database Connection in QA environment
In the QA environment, define a Database Connection:
Open the Service Center management console of your QA environment.
On the Administration tab, select Database Connections.
Click New Database Connection and fill in the fields to set up the connection to the external database.
Don't forget to set the Database field to the external database for the quality assurance environment.
Click Test to check if the connection is working correctly.
The database user must have permissions to:
- List the necessary tables and views in the external database.
- Perform the operations Create, Read, Update, and Delete on those tables and views.
Click Create to create the Database Connection.
Deploy the application to the QA environment
To deploy the application to the QA environment follow these steps:
Open LifeTime for your Infrastructure.
Tip: Open LifeTime directly from Service Center by clicking Manage all environments.
Select the Applications tab and select the DEPLOY... button between the Development environment and the QA environment.
Select Add Applications and, in the Choose one or more Applications dialog, select your application and select Add to Deployment Plan.
Select the VALIDATE NOW button between the Dev environment and the QA environment.
Select the CONTINUE button between the Dev environment and the QA environment.
Verify the deployment plan, select Deploy Now and then in the Deploy applications as planned dialog select Deploy Now to start the deployment.
After the deployment stops, click the configuration or confirmation link in the warning banner to open Service Center and map the database name of the extension to the database connection.
Associate the logical database name of the extension to the Database Connection that you created previously.
After the Deployment finishes your Extension is ready to be used by other applications in the QA environment.