Table of Contents

Installing a database

When you install DynamicWeb you install the DynamicWeb 10 application - but the application needs a database to store data in - there are two ways to get that:

Run the Setup guide

When you access the url of a newly installed solution the Setup guide will run. It will guide you through some important steps - like:

  • Generating a Files-folder structure
  • Generating or connecting to a database
  • Creating an administrator user

Read about the setup guide here

Install a database manually

Installing a database manually involves:

  • Obtaining and extracting a database
  • Setting up database permissions for an sql user
  • Connecting the database to the solution

Obtain and extract the db

First you need to obtain a copy of the database - e.g. by downloading a Swift database file or by connecting to an SQL server and extracting a .bacpac of the database you want to use.

Then connect to your SQL database and extract the copy:

  1. Open SQL Server Management Studio
  2. Right-click on the Databases-node and click Import Data-tier Application
  3. Select the .bacpac file and extract it

Set the SQL user database permissions

When the database has been extracted, make sure your SQL-user has the right database permissions:

  1. Go to Security > Logins and open the properties of your SQL-user
  2. Open the User Mapping node
  3. Select the extracted database
  4. Set the following permissions:
    • db_datareader
    • db_datawriter
    • db_ddladmin
  5. Click OK

SQLUserPermissions

Connecting the database to the solution

To manually connect to a database to a solution:

  1. Open the /Files-folder of the solution
  2. Create or edit the GlobalSettings.Database.config-file and fill in the connection details
    • Username
    • Password
    • Database
    • SQLServer
  3. Save the file and restart the solution

If it doesn't exist on your solution, the GlobalSettings.Database.config-file should contain this:

<?xml version="1.0"?>
<!-- Edit the database connection details to match your SQL-user, server, and database name -->
<Globalsettings>
  <System>
    <Database>
      <UserName>myUsername</UserName>
      <Password>myPassword</Password>
      <Database>myDatabaseName</Database>
      <SQLServer>./locaolhost</SQLServer>
      <IntegratedSecurity>False</IntegratedSecurity>
      <ConnectionString>
      </ConnectionString>
    </Database>
  </System>
</Globalsettings>
Tip

After extracting the database, you can also run the Setup guide and choose the Connect to an existing database option, but please note that this will edit GlobalSettings.config - and not create a separate database config file - which might not be optimal if you're regularly deploying deploying to this solution, see more under working in teams.

To top