Advanced Installation TopicsInstall Sana Commerce SDK

Install Sana Commerce SDK

Sana Commerce 9.1
Your connector

Restore Database

Sana Commerce uses the SQL database to store content, product enrichments, multi-site and multi-language information. Besides that, it contains membership tables in which user and password information of the Sana Admin users is stored. 
 
To be able to work with SQL Database Engine, your login should be a member of the sysadmin fixed server role. Members of this role can perform any activity in the Database Engine. By default, all members of the Windows BUILTIN\Administrators group (the local administrators group) are members of the sysadmin fixed server role. 
 
The Sana Commerce SQL database can be found in the release package.
 
To restore the Sana Commerce SQL database

Step 1: Open SQL Management Studio and connect to the SQL Server instance where you want to restore the database.

Step 2: Expand the SQL Server instance in the Object Explorer, right-click on the 'Databases' node and select 'Restore database':

 
Restore Database
 
Step 3: Enter the database name and select the Sana Commerce SQL backup file in the 'Source for restore > From device' section. The 'SanaStore.bak' file is in the Sana Commerce release package.

Step 4: Select the 'Restore' check box:

 
Select the Sana Commerce SQL Database

Step 5: Go to the 'Options' page and set the destination of the new database and the .log file:

 
Specifying Files for the Restored Database 

Step 6: Give the appropriate names to the database and .log files (their extensions should be '.mdf' and '.ldf' respectively):

 
Saving the Database and .log Files  

Step 7: Select the 'Overwrite the existing database' check box in the 'Restore options' section.

Step 8: Click 'OK' to restore the database:

 
Restore the Database 

  
Since the Sana Commerce database has a limited size, we advise to set the Recovery model to 'Full' ('Database Properties > 'Options' page > Recovery model' dropdown) to guarantee the integrity of your data. 

There are two ways to make sure the database is accessible from the Sana Commerce webstore and Sana Admin.

SQL Server Authentication
If you are going to use this type of authentication please check if it is enabled in SQL Server. Right-click on the SQL Server instance and select 'Properties > Security'. Make sure that the 'SQL Server and Windows Authentication mode' is selected in the 'Server authentication' section: 

  
Enabling the SQL Server and Windows Authentication Mode 
 
Step 1: Open the SQL Server instance > Security, right-click on the 'Logins' folder and select 'New login'.

Step 2: Enter a new username and select the 'SQL Server authentication' option.
 
Step 3: Enter a password and confirm it:
 

SQL Server password complexity policies are designed to deter brute force attacks by increasing the number of possible passwords.

  • When the check box 'Enforce password policy' is selected, new passwords must meet the following requirements:
    • The password does not contain all or a part of the user's account name. Part of an account name is defined as three or more consecutive alpha-numeric characters delimited on both ends by 'white space' (space, tab, return) or any of the following characters: , . - _ #
    • The password is at least six characters long
    • The password contains characters from three of the following four categories:
    • English uppercase letters (A - Z)
    • English lowercase letters (a - z)
    • Base 10 digits (0 - 9)
    • Non-alphanumeric symbols (For example: !, $, #, or %)
  • Password expiration policies are used to manage the lifespan of a password. When the check box 'Enforce password policy' is selected, users are reminded to change old passwords and accounts with expired passwords.
  • When the check box 'User must change password at next login' is selected, the SQL Server will prompt the user for a new password the first time the new login is used.
Please note that password policies for SQL logins require Windows Server 2003 or later versions. If Sana Commerce project is installed on a workstation with Windows XP, you need to uncheck the 'Enforce password policy' check box.
 
Step 4: Select the newly created Sana Commerce database as the Default database:
 
 
Selecting the 'SQL Server' Option 

Step 5: Go to the 'User Mapping' page, select the 'Map' check box for the Sana Commerce database and the 'db_owner' role in the membership role list:

 
Specifying the Database and Roles for New Login 

Step 6: Click 'OK' to finish the setup.

Windows Authentication

Step 1: Open the SQL Server instance > Security, right-click on the 'Logins' folder and select 'New login' (if the Windows user already has rights to the SQL Server instance, please select the properties of this user instead of creating a new one).

Step 2: Enter the Windows username in the 'Login name' text box. You can use the search option to lookup users (e.g. in Active Directory).

Step 3: Select the newly created Sana Commerce database as the Default database:

 
Selecting the 'Windows Authentication' Option 

Step 4: Go to the user mappings option, select the 'Map' check box for the Sana Commerce database and the 'db_owner' role in the membership role list:

 
Specifying the Database and Roles for New Login 

Step 5: Click 'OK' to finish the setup.

Establish a Connection to the Database

When the Sana Commerce SQL database is restored you should establish a connection to it.

Step 1: Open the 'Web.config' file in the Sana.Commerce.Startersite project.

Step 2: Configure the SQL Server connection string in the <connectionString> configuration section. You should enter SQL server name and instance, Sana Commerce database name and user credentials.

Advanced Installation TopicsInstall Sana Commerce SDK