SQL Server Database Creation Script

If your account on the Meridian Enterprise Server server does not have sufficient privileges to create a new database on the database server as described in Create a Meridian Explorer Repository, you can create the repository database with the following script.

Important!

Do not use this script to create a Meridian Enterprise vault database. This script is for creating Meridian Explorer repositories only. The database structures for vaults and for Meridian Explorer repositories are different. Instead, create the database as described in Create the Vault Database Manually.

This script does not create a FILESTREAM file group. If you intend to use that feature for the repository, the file group must be configured manually.

To create a Meridian Enterprise Server configuration database manually, simply create a new database with the default parameters.

Create a Meridian Explorer Repository Database on the Database Server

To create a Meridian Explorer repository database on the database server:

  1. In SQL Server Management Studio, run the following T-SQL script to create an empty database with the required file groups.

  2. Change every occurrence of the text <DatabaseName> in the following script to the desired database name.

  3. Edit the path specified for each of the filename parameters to refer to the correct locations.

USE [master]
GO
CREATE DATABASE [<DatabaseName>] ON PRIMARY
( NAME = N'<DatabaseName>', filename = N'C:\TEMP\<DatabaseName>.mdf' , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ), FILEGROUP [CONTENT]
( NAME = N'<DatabaseName>_content', filename = N'C:\TEMP\<DatabaseName>_CONTENT.ndf' , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ), FILEGROUP [INDEXES]
( NAME = N'<DatabaseName>_indexes', filename = N'C:\TEMP\<DatabaseName>_INDEXES.ndf' , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
LOG ON
( NAME = N'<DatabaseName>_log', filename = N'C:\TEMP\<DatabaseName>_Log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
EXEC dbo.sp_dbcmptlevel @dbname=N'<DatabaseName>', @new_cmptlevel=100
GO
EXEC [<DatabaseName>].[dbo].[sp_fulltext_database] @action = 'enable'
GO
ALTER DATABASE [<DatabaseName>] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [<DatabaseName>] SET ANSI_NULLS OFF
GO
ALTER DATABASE [<DatabaseName>] SET ANSI_PADDING ON
GO
ALTER DATABASE [<DatabaseName>] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [<DatabaseName>] SET ARITHABORT OFF
GO
ALTER DATABASE [<DatabaseName>] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [<DatabaseName>] SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE [<DatabaseName>] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [<DatabaseName>] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [<DatabaseName>] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [<DatabaseName>] SET CURSOR_DEFAULT GLOBAL
GO
ALTER DATABASE [<DatabaseName>] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [<DatabaseName>] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [<DatabaseName>] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [<DatabaseName>] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [<DatabaseName>] SET ENABLE_BROKER
GO
ALTER DATABASE [<DatabaseName>] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [<DatabaseName>] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [<DatabaseName>] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [<DatabaseName>] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [<DatabaseName>] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [<DatabaseName>] SET READ_WRITE
GO
ALTER DATABASE [<DatabaseName>] SET RECOVERY FULL
GO
ALTER DATABASE [<DatabaseName>] SET MULTI_USER
GO
ALTER DATABASE [<DatabaseName>] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [<DatabaseName>] SET DB_CHAINING OFF
GO
ALTER DATABASE [<DatabaseName>] SET RECOVERY FULL

2022 R2