Making a Windows Client project ready for Web Client use
For the operations below, you need SQL Server Management Studio (SSMS). Download and install the SQL Server Management Studio version that matches your SQL Server version.
Moving a database to a new SQL Server Instance
Ensure new SQL Server is of same or ater version as previous server
SQL Server databases are not backward compatible. A given database will only work on SQL Servers of the same version or later. Make sure the target SQL server version is the same or later than the version server.
After having restored the database on the new server, perform the following actions.
Set Database Owner
In Object Explorer, expand Databases. Right click the database. Find the database whose owner you want to change, then right click it and select Properties.
In the Database Properties window, open the Files or General section depending on your SSMS version. Locate the Owner property. Click the ... (Browse) button next to Owner. Select the login 'AlignedElement'. Click OK in the Database Properties window.
Set Server name
To update the Server name value in the tblProjectSettings database table using the UI in Microsoft SQL Server Management Studio, follow these steps:
Get the server name from the server properties
In SSMS you can copy the SQL Server name using the server Properties window.
In Object Explorer, right click the server at the top of the tree and select Properties. In the Server Properties window, open the General page and locate the Name field, which displays the full SQL Server name including the instance if one exists.
Select the value in the Name field and copy it using Ctrl + C, then paste it wherever the server name is required, such as in a configuration field like Server (name).
Update the Server cell value in tblProjectSettings
In the SSMS Object Explorer, expand tje node Databases. Locate the restored database node in the tree. Expand the Tables folder. Find tblProjectSettings in the list of tables.
Right click on the node tblProjectSettings. Select "Edit Top 200 Rows" in the context menu.
A grid view of the table data will open. In the results grid, locate the Server column.
Click the cell in the Server column. Replace the existing value with the new server name.
Changes are saved automatically when you move to another row or close the editor. No explicit save action is required.
Set Template Path
If the new server means a new or adapted template path, the new template path shall also be set in the tblProjectSettings. Access the tblProjectSettings table for editing as above.
Locate the TemplatePath column and enter the new full template path in the corresponding cell.
Web Client Specific Database Changes
Set WebBaseURL
The Aligned Web Application uses a customer specific base url to prepend any internal hyperlinks used in e.g. emails. This base web url value is also set in the tblProject Settings.
Locate the WebBaseUrl column and enter the new full template path in the corresponding cell.
Set Email/SMTP Values
The Web Application's web.config file contains the email smtp/graph settings used for sending emails from the application. The values in the web.config file is automtically copied to the individual project's database tblProjectSettings table.
However, these values are not automatically copied from the web.config to the tblProjectSettings when a database is restored from another server. They have to be added manually.
Access the tblProjectSettings table for editing as previously described. Set the correct values (see Email Configuration) in the cells corresponding to the following table column names: