text: USE [master]
  GO
  
  CREATE DATABASE [updb] CONTAINMENT = NONE ON PRIMARY (
      NAME       = N'updb',
      FILENAME   = N'D:\Temp\updb\db\updb.mdf',
      SIZE       = 8MB,
      FILEGROWTH = 64MB
  ) LOG ON (
      NAME       = N'updb_log',
      FILENAME   = N'D:\Temp\updb\db\updb_log.ldf',
      SIZE       = 8MB,
      FILEGROWTH = 64MB
  )
  GO
  
  ALTER DATABASE [updb] SET COMPATIBILITY_LEVEL = 150
  GO
  
  ALTER DATABASE [updb] SET ANSI_NULL_DEFAULT OFF 
  GO
  
  ALTER DATABASE [updb] SET ANSI_NULLS OFF 
  GO
  
  ALTER DATABASE [updb] SET ANSI_PADDING OFF 
  GO
  
  ALTER DATABASE [updb] SET ANSI_WARNINGS OFF 
  GO
  
  ALTER DATABASE [updb] SET ARITHABORT OFF 
  GO
  
  ALTER DATABASE [updb] SET AUTO_CLOSE OFF 
  GO
  
  ALTER DATABASE [updb] SET AUTO_SHRINK OFF 
  GO
  
  ALTER DATABASE [updb] SET AUTO_CREATE_STATISTICS ON(INCREMENTAL = OFF)
  GO
  
  ALTER DATABASE [updb] SET AUTO_UPDATE_STATISTICS ON 
  GO
  
  ALTER DATABASE [updb] SET CURSOR_CLOSE_ON_COMMIT OFF 
  GO
  
  ALTER DATABASE [updb] SET CURSOR_DEFAULT GLOBAL 
  GO
  
  ALTER DATABASE [updb] SET CONCAT_NULL_YIELDS_NULL OFF 
  GO
  
  ALTER DATABASE [updb] SET NUMERIC_ROUNDABORT OFF 
  GO
  
  ALTER DATABASE [updb] SET QUOTED_IDENTIFIER OFF 
  GO
  
  ALTER DATABASE [updb] SET RECURSIVE_TRIGGERS OFF 
  GO
  
  ALTER DATABASE [updb] SET DISABLE_BROKER 
  GO
  
  ALTER DATABASE [updb] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 
  GO
  
  ALTER DATABASE [updb] SET DATE_CORRELATION_OPTIMIZATION OFF 
  GO
  
  ALTER DATABASE [updb] SET PARAMETERIZATION SIMPLE 
  GO
  
  ALTER DATABASE [updb] SET READ_COMMITTED_SNAPSHOT OFF 
  GO
  
  ALTER DATABASE [updb] SET READ_WRITE 
  GO
  
  ALTER DATABASE [updb] SET RECOVERY FULL 
  GO
  
  ALTER DATABASE [updb] SET MULTI_USER 
  GO
  
  ALTER DATABASE [updb] SET PAGE_VERIFY CHECKSUM  
  GO
  
  ALTER DATABASE [updb] SET TARGET_RECOVERY_TIME = 60 SECONDS 
  GO
  
  ALTER DATABASE [updb] SET DELAYED_DURABILITY = DISABLED 
  GO
  
  USE [updb]
  GO
  
  ALTER DATABASE SCOPED CONFIGURATION SET LEGACY_CARDINALITY_ESTIMATION = Off;
  GO
  
  ALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET LEGACY_CARDINALITY_ESTIMATION = Primary;
  GO
  
  ALTER DATABASE SCOPED CONFIGURATION SET MAXDOP = 0;
  GO
  
  ALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET MAXDOP = PRIMARY;
  GO
  
  ALTER DATABASE SCOPED CONFIGURATION SET PARAMETER_SNIFFING = On;
  GO
  
  ALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET PARAMETER_SNIFFING = Primary;
  GO
  
  ALTER DATABASE SCOPED CONFIGURATION SET QUERY_OPTIMIZER_HOTFIXES = Off;
  GO
  
  ALTER DATABASE SCOPED CONFIGURATION FOR SECONDARY SET QUERY_OPTIMIZER_HOTFIXES = Primary;
  GO
  
  USE [updb]
  GO
  
  IF NOT EXISTS (SELECT name FROM sys.filegroups WHERE is_default = 1 AND name = N'PRIMARY') ALTER DATABASE [updb] MODIFY FILEGROUP [PRIMARY] DEFAULT
  GO
  