1. Installation

    Please check that the version is SQL Server 2012 or later.

    Please enable login with sa user.

2. Create Database

    Execute the following statement with sa user in sqlcmd.

    Create database
      USE master;
      GO
      CREATE DATABASE mtdb COLLATE Japanese_Unicode_CI_AS_KS_WS;
      GO

    Database option setting
      ALTER DATABASE mtdb SET ALLOW_SNAPSHOT_ISOLATION ON;
      GO
      ALTER DATABASE mtdb SET READ_COMMITTED_SNAPSHOT ON;
      GO

    *Please create Filegroups depending on your environment and situation.
      Filegroups for tables
      Filegroups for indexes
      Filegroups for binary data

3. Create users

    Execute the following statement with sa user in sqlcmd.

    User created for application
      USE master;
      GO
      CREATE LOGIN mtpusr WITH PASSWORD = 'mtpusr', DEFAULT_DATABASE = mtdb;
      GO
      USE mtdb;
      GO
      CREATE USER mtpusr FOR LOGIN mtpusr;
      GO
    Permission setting for application
      sp_addrolemember 'db_datareader', 'mtpusr';
      GO
      sp_addrolemember 'db_datawriter', 'mtpusr';
      GO

    Create administrator user
	  USE master;
      GO
      CREATE LOGIN mtpadm WITH PASSWORD = 'mtpadm', DEFAULT_DATABASE = mtdb;
      GO
      USE mtdb;
      GO
      CREATE USER mtpadm FOR LOGIN mtpadm;
      GO
    Permission setting for administrator users
      sp_addrolemember 'db_owner', 'mtpadm';
      GO

4. Create tables and sequences

   We have some kinds of DDL according to use.

     Use RDB native partition : sqlserver_partition
     Use Pseudo-Partition : sqlserver_pseudo or sqlserver_pseudo_128
     Not use partition : sqlserver

   Execute CREATE_TABLE.ddl in the folder as an administrator user.

    *If you make the Filegroups for indexes or binary data,
     please modify the DDL to use that filegroups.

5. Limitations
    EQL's LOCALTIME function can not be used in SQL Server.

    Version control function can not be used in SQL Server.

    Because SQL Server does not support row value expressions, you can not use row value expressions in EQL.

