1
0
mirror of https://github.com/Microsoft/sql-server-samples.git synced 2025-12-08 14:58:54 +00:00
Files
sql-server-samples/samples/databases/wide-world-importers/documentation/wwi-oltp-htap-installation.md
2016-06-03 08:56:06 -07:00

3.8 KiB

WideWorldImporters Installation and Configuration

Prerequisites

Download

The latest release of the sample:

wide-world-importers-release

Download the sample WideWorldImporters database backup/bacpac that corresponds to your edition of SQL Server or Azure SQL Database.

Source code to recreate the sample database is available from the following location. Note that recreating the sample will result in slight differences in the data, since there is a random factor in the data generation:

wide-world-importers

Install

SQL Server

To restore a backup to a SQL Server instance, you can use Management Studio.

  1. Open SQL Server Management Studio and connect to the target SQL Server instance.
  2. Right-click on the Databases node, and select Restore Database.
  3. Select Device and click on the button ...
  4. In the dialog Select backup devices, click Add, navigate to the database backup in the filesystem of the server, and select the backup. Click OK.
  5. If needed, change the target location for the data and log files, in the Files pane. Note that it is best practice to place data and log files on different drives.
  6. Click OK. This will initiate the database restore. After it completes, you will have the database WideWorldImporters installed on your SQL Server instance.

Azure SQL Database

To import a bacpac into a new SQL Database, you can use Management Studio.

  1. (optional) If you do not yet have a SQL Server in Azure, navigate to the Azure portal and create a new SQL Database. In the process of create a database, you will create a server. Make note of the server.
  1. Open SQL Server Management Studio and connect to your server in Azure.
  2. Right-click on the Databases node, and select Import Data-Tier Application.
  3. In the Import Settings select Import from local disk and select the bacpac of the sample database from your file system.
  4. Under Database Settings change the database name to WideWorldImporters and select the target edition and service objective to use.
  5. Click Next and Finish to kick off deployment. It will take a few minutes to complete. When specifying a service objective lower than S2 it may take longer.

Configuration

Full-Text Indexing

The sample database can make use of Full-Text Indexing. However, that feature is not installed by default with SQL Server - you need to select it during SQL Server setup (it is enabled by default in Azure SQL DB). Therefore, a post-installation step is required.

  1. In SQL Server Management Studio, connect to the WideWorldImporters database and open a new query window.
  2. Run the following T-SQL command to enable the use of Full-Text Indexing in the database:

EXECUTE Application.Configuration_ApplyFullTextIndexing

SQL Server Audit

Enabling auditing in SQL Server requires server configuration. To enable SQL Server audit for the WideWorldImporters sample, run the following statement in the database:

EXECUTE [Application].[Configuration_ApplyAuditing]

In Azure SQL Database, Audit is configured through the Azure portal.