SQL Server Database

A new Commerce SQL Database is created during the Commerce Service Setup.

If setup is not able to create the Database, during limited access of user running the setup, like when using Azure SQL, the database can be created manually.

During setup, clear the option Create Commerce Service for LS Central Database and finish other options in the setup process. When done, SQL scripts used to create the database can be found in the SQL folder where Commerce is installed.

In SQL

  1. create a database,
  2. then run LSCommerceServiceDbObjects.sql first to create the tables,
  3. finally, run LSCommerceServiceDbInitData.sql to insert default data.

The setup creates an SQL Server login user CommerceUser with password CommerceUser, and grants this user data reader and data writer privileges in the Commerce database.

If you have a problem logging in with CommerceUser, you can configure the SQL Server to use SQL Server Authentication. If the SQL Server and Windows Authentication mode option is not enabled, setup will display a warning, but will allow the setup to continue and you cannot use the CommerceUser.

To enable this option:

  1. Open the SQL Management Studio.
  2. Open the Server Properties.
  3. Restart, see images below:

The SQL Server connection string is stored in: C:\LS Retail\Commerce\CommerceService\AppSettings.config

Note: In production, you can change this connection string to use Windows Authentication or any other SQL Server login/password.

For Commerce Service setup with LS Central SQL access

CommerceUser must also have read access to LS Central Database as Commerce will access LS Central database to pull some data from it.

Note: In a testing and demo environment, you can give the CommerceUser sysadmin access to bypass all restrictions. Do not do this in a production environment.