|
|
USE [master]
|
|
|
GO
|
|
|
/****** Object: Database [dlml_scada] Script Date: 2024-11-25 14:26:06 ******/
|
|
|
CREATE DATABASE [dlml_scada]
|
|
|
CONTAINMENT = NONE
|
|
|
ON PRIMARY
|
|
|
( NAME = N'dlml_scada', FILENAME = N'C:\Program Files (x86)\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\dlml_scada.mdf' , SIZE = 5120KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
|
|
|
LOG ON
|
|
|
( NAME = N'dlml_scada_log', FILENAME = N'C:\Program Files (x86)\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\dlml_scada_log.ldf' , SIZE = 2048KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET COMPATIBILITY_LEVEL = 110
|
|
|
GO
|
|
|
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
|
|
|
begin
|
|
|
EXEC [dlml_scada].[dbo].[sp_fulltext_database] @action = 'enable'
|
|
|
end
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET ANSI_NULL_DEFAULT OFF
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET ANSI_NULLS OFF
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET ANSI_PADDING OFF
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET ANSI_WARNINGS OFF
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET ARITHABORT OFF
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET AUTO_CLOSE OFF
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET AUTO_CREATE_STATISTICS ON
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET AUTO_SHRINK OFF
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET AUTO_UPDATE_STATISTICS ON
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET CURSOR_CLOSE_ON_COMMIT OFF
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET CURSOR_DEFAULT GLOBAL
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET CONCAT_NULL_YIELDS_NULL OFF
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET NUMERIC_ROUNDABORT OFF
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET QUOTED_IDENTIFIER OFF
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET RECURSIVE_TRIGGERS OFF
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET DISABLE_BROKER
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET DATE_CORRELATION_OPTIMIZATION OFF
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET TRUSTWORTHY OFF
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET ALLOW_SNAPSHOT_ISOLATION OFF
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET PARAMETERIZATION SIMPLE
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET READ_COMMITTED_SNAPSHOT OFF
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET HONOR_BROKER_PRIORITY OFF
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET RECOVERY FULL
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET MULTI_USER
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET PAGE_VERIFY CHECKSUM
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET DB_CHAINING OFF
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF )
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET TARGET_RECOVERY_TIME = 0 SECONDS
|
|
|
GO
|
|
|
EXEC sys.sp_db_vardecimal_storage_format N'dlml_scada', N'ON'
|
|
|
GO
|
|
|
USE [dlml_scada]
|
|
|
GO
|
|
|
/****** Object: Table [dbo].[sys_role] Script Date: 2024-11-25 14:26:06 ******/
|
|
|
SET ANSI_NULLS ON
|
|
|
GO
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
|
GO
|
|
|
SET ANSI_PADDING ON
|
|
|
GO
|
|
|
CREATE TABLE [dbo].[sys_role](
|
|
|
[id] [int] IDENTITY(1,1) NOT NULL,
|
|
|
[role_name] [varchar](100) NOT NULL,
|
|
|
[role_set] [varchar](255) NULL,
|
|
|
CONSTRAINT [PK__sys_role__2590CD74B3A66B84] PRIMARY KEY CLUSTERED
|
|
|
(
|
|
|
[id] 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
|
|
|
SET ANSI_PADDING OFF
|
|
|
GO
|
|
|
/****** Object: Table [dbo].[sys_user] Script Date: 2024-11-25 14:26:06 ******/
|
|
|
SET ANSI_NULLS ON
|
|
|
GO
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
|
GO
|
|
|
SET ANSI_PADDING ON
|
|
|
GO
|
|
|
CREATE TABLE [dbo].[sys_user](
|
|
|
[id] [int] IDENTITY(1,1) NOT NULL,
|
|
|
[user_name] [varchar](100) NOT NULL,
|
|
|
[user_role] [varchar](100) NULL,
|
|
|
[password] [varchar](100) NULL,
|
|
|
[last_login_time] [datetime] NULL,
|
|
|
[is_deleted] [bit] NULL,
|
|
|
CONSTRAINT [PK__sys_user__3213E83F3D5D6F61] PRIMARY KEY CLUSTERED
|
|
|
(
|
|
|
[id] 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
|
|
|
SET ANSI_PADDING OFF
|
|
|
GO
|
|
|
ALTER TABLE [dbo].[sys_user] ADD DEFAULT ((0)) FOR [is_deleted]
|
|
|
GO
|
|
|
USE [master]
|
|
|
GO
|
|
|
ALTER DATABASE [dlml_scada] SET READ_WRITE
|
|
|
GO
|