Creating an Azure SQL Database
1. Save the following CreateDB script in the temp folder.
CREATE DATABASE [_DBNAME_]
COLLATE Latin1_General_100_CS_AS_SC
( MAXSIZE = 5 GB, EDITION = 'premium', SERVICE_OBJECTIVE = 'P6' )
GO
ALTER DATABASE [_DBNAME_] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [_DBNAME_] SET ANSI_NULLS OFF
GO
ALTER DATABASE [_DBNAME_] SET ANSI_PADDING OFF
GO
ALTER DATABASE [_DBNAME_] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [_DBNAME_] SET ARITHABORT OFF
GO
ALTER DATABASE [_DBNAME_] SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE [_DBNAME_] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [_DBNAME_] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [_DBNAME_] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [_DBNAME_] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [_DBNAME_] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [_DBNAME_] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [_DBNAME_] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [_DBNAME_] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [_DBNAME_] SET READ_WRITE
GO
ALTER DATABASE [_DBNAME_] SET MULTI_USER
GO
ALTER DATABASE [_DBNAME_] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [_DBNAME_] SET READ_COMMITTED_SNAPSHOT ON
GO
ALTER DATABASE [_DBNAME_]
SET QUERY_STORE (
OPERATION_MODE = READ_WRITE,
CLEANUP_POLICY =
(STALE_QUERY_THRESHOLD_DAYS = 30),
DATA_FLUSH_INTERVAL_SECONDS = 3000,
MAX_STORAGE_SIZE_MB = 500,
INTERVAL_LENGTH_MINUTES = 15,
SIZE_BASED_CLEANUP_MODE = AUTO,
QUERY_CAPTURE_MODE = AUTO,
MAX_PLANS_PER_QUERY = 1000
)
GO
|
PTC provides this script as a reference for your Azure administrators. The Azure administrators must provision the database for Windchill based on service objective and tier of service required.
|
2. Replace _DBNAME_ with your database name.
3. Connect SSMS (sql client) to the Azure SQL Server as server administrator with default or master database.
|
Connection to Azure SQL depends on the network, location, database subscription, and so on, for your machine. For connection related issues connect with your network administrator.
The create database script, must be updated for MAXSIZE, EDITION, and SERVICE_OBJECTIVE based on the operational and database requirement. Refer to the Azure SQL documentation on service objects and different tiers of service.
|
4. Open a Query tab which is connected to default or master database.
5. Run the SQL script from Step 1. Database will be deployed in few minutes