sql_Create_Database_SecureMfaOTP.txt

USE [master]
GO
 
/****** Object: Database [SecureMfaOTP] Script Date: 06/11/2017 12:10:45 AM ******/
CREATE DATABASE [SecureMfaOTP]
 CONTAINMENT = NONE
 ON PRIMARY
( NAME = N'SecureMfaOTP', FILENAME = N'D:\DataBases\SecureMfaOTP.mdf' , SIZE = 1048576KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
 LOG ON
( NAME = N'SecureMfaOTP_log', FILENAME = N'L:\Logs\SecureMfaOTP.ldf' , SIZE = 1048576KB , MAXSIZE = 1073741824KB , FILEGROWTH = 10%)
GO
 
USE [SecureMfaOTP]
GO
 
CREATE TABLE [dbo].[Secrets](
    [upn] [varchar](255) NOT NULL,
    [secret] [char](48) NOT NULL,
    [logon] [tinyint] NULL,
    [lastlogon] [datetime] NULL,
    [logoncount] [int] DEFAULT 0 NOT NULL,
    [failedlogoncount] [int] DEFAULT 0 NOT NULL,
        [failedlastlogon] [datetime] NULL,
    [failedcode] [char](6),
    [logonip] [varchar](39),
    [useragent] [varchar](128),
 CONSTRAINT [PK_Secrets] PRIMARY KEY CLUSTERED
(
    [upn] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
 
GO
 
CREATE TABLE [dbo].[UsedCodes](
    [upn] [varchar](255) NOT NULL,
    [interval] [bigint] NOT NULL
) ON [PRIMARY]
 
GO