真心求救.领导一直催 .SQL版本检测问题
请各位大哥大姐帮忙,能不能把这个SQL版本验证跳过去 .
我自己尝试复制数据库,显示版本正常.但是数据库不完整.
SQL脚本恢复 就一直提示这个问题 .点OK后 程序自带恢复数据库字段小工具一直检测
环境MSSQL2008迁移LINUX FOR MSSQL2017
为了减少占用大哥大姐宝贵时间,已精简至可运行..
链接:https://pan.baidu.com/s/1GhByMYIxAa_L2nufHM-Wdg
提取码:x4iv
Semoon 发表于 2019-7-12 11:55
数据库里面哪里有版本号,去把这个修改成和软件版本一致
用SQL脚本导入就出现这个问题.
用导入导出向导直接导入到新库 就不会出现版本问题,但是数据不完整.一直提示某表某字段不能NULL
USE
GO
/****** Object:Database Script Date: 2019-07-11 13:52:40 ******/
CREATE DATABASE ONPRIMARY
( NAME = N'property', FILENAME = N'/var/opt/mssql/data/property.mdf' , SIZE = 10240KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
LOG ON
( NAME = N'property_log', FILENAME = N'/var/opt/mssql/data/property_log.ldf' , SIZE = 3136KB , MAXSIZE = 1048576KB , FILEGROWTH = 10%)
GO
ALTER DATABASE SET COMPATIBILITY_LEVEL = 110
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC .. @ACTION = 'enable'
end
GO
ALTER DATABASE SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE SET ANSI_NULLS OFF
GO
ALTER DATABASE SET ANSI_PADDING OFF
GO
ALTER DATABASE SET ANSI_WARNINGS OFF
GO
ALTER DATABASE SET ARITHABORT OFF
GO
ALTER DATABASE SET AUTO_CLOSE ON
GO
ALTER DATABASE SET AUTO_SHRINK OFF
GO
ALTER DATABASE SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE SET CURSOR_DEFAULTGLOBAL
GO
ALTER DATABASE SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE SETENABLE_BROKER
GO
ALTER DATABASE SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE SET TRUSTWORTHY OFF
GO
ALTER DATABASE SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE SET RECOVERY SIMPLE
GO
ALTER DATABASE SETMULTI_USER
GO
ALTER DATABASE SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE SET DB_CHAINING OFF
GO
USE
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
NOT NULL,
NOT NULL,
(30) NOT NULL,
NOT NULL,
(10) NULL,
(1000) NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
(30) NULL,
(30) NULL,
(40) NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
NOT NULL,
(20) NOT NULL,
NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
(20) NOT NULL,
NOT NULL,
(20) NULL,
(20) NULL,
(20) NULL,
(16) NULL,
(6) NULL,
(25) NULL,
(35) NULL,
(30) NULL,
(60) NULL,
NULL,
NULL,
(20) NULL,
NULL,
NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON TEXTIMAGE_ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NOT NULL,
NOT NULL,
(20) NOT NULL,
(20) NOT NULL,
(20) NOT NULL,
NOT NULL,
NOT NULL,
(30) NOT NULL,
(20) NULL,
(500) NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
(20) NOT NULL,
(20) NOT NULL,
NULL,
(20) NOT NULL,
(20) NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON TEXTIMAGE_ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
(30) NOT NULL,
NOT NULL,
NULL,
NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NOT NULL,
(30) NOT NULL,
(45) NOT NULL,
(45) NOT NULL,
(20) NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
(20) NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NOT NULL,
(100) NOT NULL,
NOT NULL,
(100) NULL,
CONSTRAINT PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
NOT NULL,
(30) NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NOT NULL,
(7) NOT NULL,
(7) NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
(7) NOT NULL,
(7) NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
(50) NOT NULL,
(50) NOT NULL,
(50) NOT NULL,
(50) NOT NULL,
(50) NOT NULL,
(50) NOT NULL,
NOT NULL,
NOT NULL,
(100) NOT NULL,
(20) NOT NULL,
(20) NOT NULL,
NOT NULL,
NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
NOT NULL,
(10) NOT NULL,
(30) NOT NULL,
(10) NOT NULL,
NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
NOT NULL,
NULL,
(8) NULL,
NULL,
NULL,
(20) NULL,
(60) NULL,
NOT NULL,
NOT NULL,
(20) NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
(5000) NULL,
NULL,
(50) NULL,
NULL,
NULL,
(500) NULL,
CONSTRAINT PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NOT NULL,
(18, 4) NOT NULL,
(18, 4) NOT NULL,
(18, 4) NOT NULL,
(50) NOT NULL,
NOT NULL,
CONSTRAINT PRIMARY KEY NONCLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
NOT NULL,
(50) NOT NULL,
(50) NOT NULL,
NOT NULL,
CONSTRAINT PRIMARY KEY NONCLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
(20) NOT NULL,
(12) NOT NULL,
(12) NOT NULL,
(50) NOT NULL,
(20) NOT NULL,
(20) NULL,
(20) NULL,
NOT NULL,
NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
(20) NOT NULL,
NOT NULL,
NOT NULL,
(10) NOT NULL,
(20) NOT NULL,
(20) NULL,
(50) NOT NULL,
(20) NULL,
(20) NULL,
NULL,
NOT NULL,
(7) NOT NULL,
(7) NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
(30) NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
(50) NOT NULL,
(50) NOT NULL,
(50) NOT NULL,
(50) NOT NULL,
NOT NULL,
(50) NOT NULL,
(50) NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NULL,
NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
(20) NOT NULL,
(20) NOT NULL,
NOT NULL,
(4) NOT NULL,
(20) NOT NULL,
(50) NOT NULL,
(20) NOT NULL,
(20) NULL,
NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
NOT NULL,
(50) NOT NULL,
(300) NOT NULL,
(100) NOT NULL,
(100) NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
(300) NULL,
(300) NULL,
(300) NULL,
(300) NULL,
(300) NULL,
(300) NULL,
(300) NULL,
(300) NULL,
NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NULL,
NULL,
CONSTRAINT PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
NOT NULL,
(20) NOT NULL,
(20) NOT NULL,
(20) NULL,
NOT NULL,
NULL,
(20) NOT NULL,
(20) NULL,
NOT NULL,
NOT NULL,
NOT NULL,
(20) NULL,
(45) NULL,
(45) NULL,
(45) NULL,
(45) NULL,
(60) NULL,
(300) NULL,
NOT NULL,
NOT NULL,
NOT NULL,
(50) NOT NULL,
NOT NULL,
NULL,
(50) NULL,
NOT NULL,
NOT NULL,
(18, 4) NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NULL,
(50) NULL,
NOT NULL,
NULL,
(20) NULL,
NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
(50) NOT NULL,
NULL,
(100) NOT NULL,
(100) NULL,
(100) NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
NULL,
(20) NOT NULL,
(20) NOT NULL,
(20) NULL,
NOT NULL,
NULL,
(20) NOT NULL,
(20) NULL,
NOT NULL,
NOT NULL,
NOT NULL,
(20) NULL,
(45) NULL,
(45) NULL,
(45) NULL,
(45) NULL,
(60) NULL,
(300) NULL,
NOT NULL,
NOT NULL,
NOT NULL,
(50) NOT NULL,
NOT NULL,
NULL,
(50) NULL,
NOT NULL,
NOT NULL,
(18, 4) NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NULL,
(50) NULL,
NOT NULL,
NULL,
(20) NULL,
NULL
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NULL,
(20) NULL,
(30) NULL,
NULL,
NULL,
NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
NOT NULL,
NULL,
NULL,
NOT NULL,
NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
NOT NULL,
NOT NULL,
NOT NULL,
(50) NOT NULL,
NOT NULL,
NOT NULL,
NULL,
NULL,
(50) NULL,
(50) NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
(12) NOT NULL,
(50) NOT NULL,
NOT NULL,
(50) NOT NULL,
(50) NOT NULL,
(50) NOT NULL,
(50) NULL,
NOT NULL,
NOT NULL,
NULL,
NULL,
NOT NULL,
NOT NULL,
(50) NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
(50) NULL,
NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
(20) NOT NULL,
NOT NULL,
(7) NOT NULL,
(7) NOT NULL,
(30) NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NOT NULL,
(30) NOT NULL,
NOT NULL,
(7) NOT NULL,
(7) NOT NULL,
(30) NULL,
NOT NULL,
CONSTRAINT PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NOT NULL,
NOT NULL,
(7) NULL,
(7) NULL,
NOT NULL,
(500) NULL,
NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
NOT NULL,
(50) NOT NULL,
(50) NOT NULL,
CONSTRAINT PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
(20) NOT NULL,
(20) NOT NULL,
(20) NOT NULL,
(20) NOT NULL,
NOT NULL,
NOT NULL,
(50) NULL,
NOT NULL,
(10) NOT NULL,
(10) NOT NULL,
(10) NOT NULL,
(10) NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
(100) NOT NULL,
(100) NOT NULL,
(100) NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
(7) NOT NULL,
(7) NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
(20) NOT NULL,
(10) NOT NULL,
(20) NULL,
(20) NULL,
(20) NULL,
(20) NOT NULL,
NOT NULL,
(20) NULL,
NULL,
NOT NULL,
NOT NULL,
NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
(30) NOT NULL,
(30) NOT NULL,
(60) NOT NULL,
NOT NULL,
(300) NULL,
(300) NULL,
(300) NULL,
(300) NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NOT NULL,
(50) NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
(500) NULL,
NOT NULL,
CONSTRAINT PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NOT NULL,
(20) NOT NULL,
NOT NULL,
(50) NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
(20) NOT NULL,
(20) NULL,
(20) NULL,
(10) NOT NULL,
NULL,
NOT NULL,
NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
NOT NULL,
NULL,
(5) NULL,
(30) NULL,
NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
NOT NULL,
(45) NOT NULL,
(20) NOT NULL,
NOT NULL,
(20) NULL,
(45) NOT NULL,
(45) NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
(50) NULL,
(50) NULL,
(50) NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NOT NULL,
(50) NULL,
(50) NULL,
(50) NULL,
(50) NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
NOT NULL,
(45) NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
(16) NULL,
(6) NULL,
(25) NULL,
(20) NULL,
NULL,
NULL,
(30) NULL,
(8) NULL,
(20) NOT NULL,
(50) NULL,
NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON ,
CONSTRAINT UNIQUE NONCLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON TEXTIMAGE_ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
NOT NULL,
(50) NOT NULL,
(50) NULL,
(300) NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
(50) NOT NULL,
(50) NULL,
(50) NULL,
(50) NULL,
(50) NULL,
(50) NULL,
(50) NULL,
(50) NULL,
(50) NULL,
(50) NULL,
(50) NULL,
(50) NULL,
(50) NULL,
(50) NULL,
(50) NULL,
(50) NULL,
(50) NULL,
(50) NULL,
(50) NULL,
(50) NULL,
(50) NULL,
(50) NULL,
NOT NULL,
(50) NULL,
NOT NULL,
NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
(60) NOT NULL,
(60) NOT NULL,
NOT NULL,
CONSTRAINT PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
NOT NULL,
NOT NULL,
(7) NOT NULL,
(7) NOT NULL,
CONSTRAINT PRIMARY KEY NONCLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
(10) NULL,
NULL,
NULL,
NULL,
(30) NULL,
(30) NULL,
NULL,
NULL,
NULL,
(20) NULL,
NOT NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
/****** Object:Table . Script Date: 2019-07-11 13:52:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE .(
IDENTITY(1,1) NOT NULL,
(40) NULL,
NOT NULL,
(30) NULL,
NOT NULL,
(50) NULL,
PRIMARY KEY CLUSTERED
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
) ON
GO
SET ANSI_PADDING ON
GO
/****** Object:Index Script Date: 2019-07-11 13:52:40 ******/
CREATE NONCLUSTERED INDEX ON .
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
GO
SET ANSI_PADDING ON
GO
/****** Object:Index Script Date: 2019-07-11 13:52:40 ******/
CREATE NONCLUSTERED INDEX ON .
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
GO
SET ANSI_PADDING ON
GO
/****** Object:Index Script Date: 2019-07-11 13:52:40 ******/
CREATE NONCLUSTERED INDEX ON .
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
GO
/****** Object:Index Script Date: 2019-07-11 13:52:40 ******/
CREATE NONCLUSTERED INDEX ON .
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
GO
/****** Object:Index Script Date: 2019-07-11 13:52:40 ******/
CREATE NONCLUSTERED INDEX ON .
(
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
GO
SET ANSI_PADDING ON
GO
/****** Object:Index Script Date: 2019-07-11 13:52:40 ******/
CREATE UNIQUE NONCLUSTERED INDEX ON .
(
ASC,
ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((4)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ('00:00:00') FOR
GO
ALTER TABLE . ADDDEFAULT ('23:59:59') FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ('00:00:00') FOR
GO
ALTER TABLE . ADDDEFAULT ('23:59:59') FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((1440)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT (getdate()) FOR
GO
ALTER TABLE . ADDDEFAULT (getdate()) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('1') FOR
GO
ALTER TABLE . ADDDEFAULT ('1') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT (getdate()) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT (getdate()) FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT (getdate()) FOR
GO
ALTER TABLE . ADDDEFAULT ('EMID卡') FOR
GO
ALTER TABLE . ADDDEFAULT ('启用') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('1') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('启用') FOR
GO
ALTER TABLE . ADDDEFAULT ('EMID卡') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('00:00:00') FOR
GO
ALTER TABLE . ADDDEFAULT ('23:59:59') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('1') FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('aaa') FOR
GO
ALTER TABLE . ADDDEFAULT ('1') FOR
GO
ALTER TABLE . ADDDEFAULT ('男') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('无折扣') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((-1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('无折扣') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((-1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT (getdate()) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT (getdate()) FOR
GO
ALTER TABLE . ADDDEFAULT (getdate()) FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('00:00:00') FOR
GO
ALTER TABLE . ADDDEFAULT ('23:59:59') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('00:00:00') FOR
GO
ALTER TABLE . ADDDEFAULT ('23:59:59') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('1') FOR
GO
ALTER TABLE . ADDDEFAULT ('1') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('127.0.0.1') FOR
GO
ALTER TABLE . ADDDEFAULT ('127.0.0.1') FOR
GO
ALTER TABLE . ADDDEFAULT ('127.0.0.1') FOR
GO
ALTER TABLE . ADDDEFAULT ('127.0.0.1') FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((2)) FOR
GO
ALTER TABLE . ADDDEFAULT ('红') FOR
GO
ALTER TABLE . ADDDEFAULT ('红') FOR
GO
ALTER TABLE . ADDDEFAULT ('红') FOR
GO
ALTER TABLE . ADDDEFAULT ('红') FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((10)) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((2)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((20)) FOR
GO
ALTER TABLE . ADDDEFAULT ('00:00:00') FOR
GO
ALTER TABLE . ADDDEFAULT ('23:59:59') FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((10)) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((1)) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ('启用') FOR
GO
ALTER TABLE . ADDDEFAULT ('EMID卡') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('1') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT (getdate()) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT ('') FOR
GO
ALTER TABLE . ADDDEFAULT ('EMID卡') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ('启用') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('1') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('未知') FOR
GO
ALTER TABLE . ADDDEFAULT ('普通成员') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('粤') FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT (getdate()) FOR
GO
ALTER TABLE . ADDDEFAULT (getdate()) FOR
GO
ALTER TABLE . ADDDEFAULT (getdate()) FOR
GO
ALTER TABLE . ADDDEFAULT ('00:00:00') FOR
GO
ALTER TABLE . ADDDEFAULT ('23:59:59') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ((0)) FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('0') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE . ADDDEFAULT ('100') FOR
GO
ALTER TABLE . ADDDEFAULT (NULL) FOR
GO
ALTER TABLE .WITH CHECK ADDCONSTRAINT FOREIGN KEY()
REFERENCES . ()
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE . CHECK CONSTRAINT
GO
ALTER TABLE .WITH CHECK ADDCONSTRAINT FOREIGN KEY()
REFERENCES . ()
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE . CHECK CONSTRAINT
GO
ALTER TABLE .WITH CHECK ADDCONSTRAINT FOREIGN KEY()
REFERENCES . ()
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE . CHECK CONSTRAINT
GO
ALTER TABLE .WITH CHECK ADDCONSTRAINT FOREIGN KEY()
REFERENCES . ()
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE . CHECK CONSTRAINT
GO
ALTER TABLE .WITH CHECK ADDCONSTRAINT FOREIGN KEY()
REFERENCES . ()
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE . CHECK CONSTRAINT
GO
ALTER TABLE .WITH CHECK ADDCONSTRAINT FOREIGN KEY()
REFERENCES . ()
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE . CHECK CONSTRAINT
GO
ALTER TABLE .WITH CHECK ADDCONSTRAINT FOREIGN KEY()
REFERENCES . ()
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE . CHECK CONSTRAINT
GO
ALTER TABLE .WITH CHECK ADDCONSTRAINT FOREIGN KEY()
REFERENCES . ()
ON UPDATE CASCADE
ON DELETE SET DEFAULT
GO
ALTER TABLE . CHECK CONSTRAINT
GO
ALTER TABLE .WITH CHECK ADDCONSTRAINT FOREIGN KEY()
REFERENCES . ()
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE . CHECK CONSTRAINT
GO
ALTER TABLE .WITH CHECK ADDCONSTRAINT FOREIGN KEY()
REFERENCES . ()
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE . CHECK CONSTRAINT
GO
ALTER TABLE .WITH CHECK ADDCONSTRAINT FOREIGN KEY()
REFERENCES . ()
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE . CHECK CONSTRAINT
GO
ALTER TABLE .WITH CHECK ADDCONSTRAINT FOREIGN KEY()
REFERENCES . ()
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE . CHECK CONSTRAINT
GO
ALTER TABLE .WITH CHECK ADDCONSTRAINT FOREIGN KEY()
REFERENCES . ()
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE . CHECK CONSTRAINT
GO
ALTER TABLE .WITH CHECK ADDCONSTRAINT FOREIGN KEY()
REFERENCES . ()
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE . CHECK CONSTRAINT
GO
ALTER TABLE .WITH CHECK ADDCONSTRAINT FOREIGN KEY()
REFERENCES . ()
ON UPDATE CASCADE
ON DELETE SET DEFAULT
GO
ALTER TABLE . CHECK CONSTRAINT
GO
ALTER TABLE .WITH CHECK ADDCONSTRAINT FOREIGN KEY()
REFERENCES . ()
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE . CHECK CONSTRAINT
GO
ALTER TABLE .WITH CHECK ADDCONSTRAINT FOREIGN KEY()
REFERENCES . ()
ON UPDATE CASCADE
ON DELETE SET DEFAULT
GO
ALTER TABLE . CHECK CONSTRAINT
GO
ALTER TABLE .WITH CHECK ADDCONSTRAINT FOREIGN KEY()
REFERENCES . ()
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE . CHECK CONSTRAINT
GO
ALTER TABLE .WITH CHECK ADDCONSTRAINT FOREIGN KEY()
REFERENCES . ()
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE . CHECK CONSTRAINT
GO
/****** Object:StoredProcedure . Script Date: 2019-07-11 13:52:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--创建存储过程
create proc .
@parent_id int,
@sb_id int output,
@status int output -- 0 添加失败1是添加成功
as
set @Status = 0;
begin transaction --开启事务
--1、插入treeview表
select @sb_id = MAX(sb_id)+1 from treeview
insert into treeview(sb_id,parent_id,sb_kind,sb_name )
values(@sb_id,@parent_id,'tcc','未命名停车场'+CONVERT(varchar(30), @sb_id))
--2、插入parkinfo停车场信息表
declare @park_id int = 0
select @park_id = MAX(park_id)+1 from parkinfo
insert into parkinfo(park_id,sb_id,parknum,AddressID,spaceTime)
values(@park_id,@sb_id,888,1,1)
--3、插入收费费率表feerate
INSERT INTO feerate(park_id,lb_id)
SELECT @park_id,lb_id from fee_lb
--判断事务的回滚还是提交
if(@@ERROR <> 0)
begin
rollback transaction
end
else
begin
commit transaction
set @Status = 1;
end
GO
/****** Object:StoredProcedure . Script Date: 2019-07-11 13:52:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--创建存储过程
create proc .
@parent_id int,
@sb_id int output,
@Status int output, -- 0 添加失败1是添加成功
@sb_kind int = -1 --通道设置系统自动设置0入口 1出口
as
set @Status = 0;
begin transaction --开启事务
select @sb_id = MAX(sb_id)+1 from treeview
declare @sb_name varchar(30)
declare @road_kind int
if@sb_kind = -1
begin
if @sb_id % 2 = 0
begin
set @sb_name = '入口'+CONVERT(varchar(30), @sb_id)
set @road_kind = 0
end
else
begin
set @sb_name = '出口'+CONVERT(varchar(30), @sb_id)
set @road_kind = 1
end
end
else
begin
if @sb_kind = 0
begin
set @sb_name = '入口'+CONVERT(varchar(30), @sb_id)
set @road_kind = 0
end
else
begin
set @sb_name = '出口'+CONVERT(varchar(30), @sb_id)
set @road_kind = 1
end
end
--获取通道地址
declare @maxAdd int,@RoadAddr int
select @maxAdd = MAX(road_adr) from roadinfo
if @road_kind = 0--入口
begin
if @maxAdd % 2 =0 --偶数
set @RoadAddr = @maxAdd +2
else
set @RoadAddr = @maxAdd +1
end
else --出口
begin
if @maxAdd % 2 =0 --偶数
set @RoadAddr = @maxAdd +1
else
set @RoadAddr = @maxAdd +2
end
--1、插入treeview
insert into treeview(sb_id,parent_id,sb_kind,sb_name )
values(@sb_id,@parent_id,'kzq',@sb_name)
--2、插入roadinfo通道信息表
insert into roadinfo(sb_id,road_kind,road_adr)
values(@sb_id,@road_kind,@RoadAddr)
--3、插入通道属性表(不用插入代码默认)
--insert into RoadProperty(sb_id) values(@sb_id)
--4、插入权限明细表PermissionList
insert into PermissionList(Pid,Rid,starttime,endtime,atype,note,ischeck)
select distinct group_id,@sb_id,'00:00:00','23:59:59',0,'',1 from PermissionGroup
--判断事务的回滚还是提交
if(@@ERROR <> 0)
begin
rollback transaction
end
else
begin
commit transaction
set @Status = 1;
end
GO
/****** Object:StoredProcedure . Script Date: 2019-07-11 13:52:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--车辆入库存储过程
create proc .
@carPlate varchar(20), --车牌
@CmdType integer, --操作类型 0识别1手动
@carType integer output, -- 1月租卡、2计时卡 3储值车 4免费车
@card_ID varchar(50) output ,--carID
@aNote varchar(500) output,--备注
@resultPlate varchar(20) output --返回车牌
as
declare @matchLen int,@value varchar(10),@Plate varchar(20) --匹配长度
--初始化
set @matchLen = 5;
set @resultPlate=@carPlate
set @carType = 2;
set @card_ID = ''
set @aNote = ''
if @CmdType = 0
begin
--获取是长匹配还是短匹配
select @value = ParamValue from ParameterList where ParamName='LongAnalysis'
if upper(@value) = 'TRUE'
begin
set @matchLen = 6
end
end
else
begin
set @matchLen = len(@carPlate)
end
--检查车牌强势转换(如果强制换位空 直接退出)
select @Plate = DPlate from PlateMap where SPlate = @carPlate
if @Plate=''
begin
set @aNote = @aNote +' '+@carPlate+'车牌设置了强制转换,转换后车牌为:';
return
end
if @Plate is null
set @Plate = @carPlate
else
set @aNote = @aNote +' '+@carPlate+'车牌设置了强制转换,转换后车牌为:'+@Plate
set @resultPlate = @Plate
--判断是否是在场车辆
declare @temPlate varchar(20),@temKind_id int,@temcard_ID varchar(30)
select @temPlate = P.car_cp,@temKind_id= v.kind_id,@temcard_ID=p.card_id from parked p with(nolock) inner join card_kind v on p.card_kind=v.kind_name
where out_time is null andRIGHT(P.car_cp,@matchLen)=RIGHT(@Plate,@matchLen)
if not @temPlate is null
begin
set @Plate=@temPlate;
set @carType=@temKind_id
set @card_ID=@temcard_ID
set @resultPlate = @Plate
end
else
begin
--查询是不是登记车、并获取车辆类型
select @temPlate=car_cp,@temKind_id=kind_id,@temcard_ID=card_id from card_viewwhere RIGHT(car_cp,@matchLen)=RIGHT(@Plate,@matchLen)
if not @temPlateis null
begin
set @Plate=@temPlate;
set @carType=@temKind_id
set @card_ID=@temcard_ID
set @resultPlate = @Plate
end
end
GO
/****** Object:StoredProcedure . Script Date: 2019-07-11 13:52:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--创建存储过程
create proc .
as
begin transaction --开启事务
insert into permissionlist (PId,RId,startTime,endTime,aType,note,isCheck)
select group_id,sb_id,starttime,endtime,0,'',check1 from PermissionGroup order by group_id,sb_id
delete from PermissionGroup where PermissionGroup_id not in( select min(PermissionGroup_id) as minfrom PermissionGroup group by group_id)
--判断事务的回滚还是提交
if(@@ERROR <> 0)
begin
rollback transaction
end
else
begin
commit transaction
end
GO
/****** Object:StoredProcedure . Script Date: 2019-07-11 13:52:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Create procedure .(@cardid int,@Cardtype int)
as
declare @error int =0 --事务中操作的错误记录
begin transaction--开启事务
if @Cardtype = 1--月租车
begin
delete from monthcard where card_id = @cardid;
delete from card_xufei where card_id= @cardid;
end
else if @Cardtype = 2--临时车
delete from timecard where card_id = @cardid
else if @cardtype =3--储值车
begin
delete from savecard where card_id =@cardid;
delete from card_xufei where card_id= @cardid;
end
else if @cardtype =4--免费车
delete from mfeecard where card_id = @cardid;
delete from card_view where card_id = @cardid;
if(@error<>0)
begin
rollback transaction
return -1 --设置操作结果错误标识
end
else
begin
commit transaction
return 1 --操作成功的标识
end
GO
/****** Object:StoredProcedure . Script Date: 2019-07-11 13:52:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--创建存储过程
create proc .
@sb_id int,
@Status int output -- 0 添加失败1是添加成功
as
set @Status = 0;
begin transaction --开启事务
--1、删除收费费率表feerate
delete from feerate where park_id in (select park_id from parkinfo wheresb_id = @sb_id)
--2、删除parkinfo停车场信息表
delete from parkinfo where sb_id=@sb_id
--3、删除treeview表
delete from treeview where sb_id=@sb_id
--4、虚拟出库在场车辆
update parked set out_sbname = in_sbname,out_time=GETDATE(),outbeizhu='虚拟出库(删除通道)' where park_id = @sb_id
--判断事务的回滚还是提交
if(@@ERROR <> 0)
begin
rollback transaction
end
else
begin
commit transaction
set @Status = 1;
end
GO
/****** Object:StoredProcedure . Script Date: 2019-07-11 13:52:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--创建存储过程
create proc .
@sb_id int,
@Status int output -- 0 添加失败1是添加成功
as
set @Status = 0;
begin transaction --开启事务
declare @sb_name varchar(30)
select @sb_name = sb_name from treeview where sb_id=@sb_id
--1、删除permission表
delete from permission where sb_id=@sb_id
--2、删除权限分组表PermissionGroup
delete from PermissionGroup where sb_id=@sb_id
--3、删除通道属性表
delete from RoadProperty where sb_id=@sb_id
--4、删除roadinfo通道信息表
delete from roadinfo where sb_id=@sb_id
--5、删除treeview
delete from treeview where sb_id=@sb_id
--6 删除权限明细表
delete from permissionList where Rid = @sb_id
--7、虚拟出库
update parked set out_sbname=in_sbname,out_time=GETDATE(),outbeizhu='虚拟出库(删除通道)' where in_sbname =@sb_name
--判断事务的回滚还是提交
if(@@ERROR <> 0)
begin
rollback transaction
end
else
begin
commit transaction
set @Status = 1;
end
GO
/****** Object:StoredProcedure . Script Date: 2019-07-11 13:52:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--创建存储过程
create proc .
as
begin tran
--时段月租转为临停车
update fee_lb set FType = 3 where ofmonth = 1 or (FType = 2 and lb_mc <>'储值车' )
--分段计算
update fee_lb set feeType =3 where lb_id in (select distinct lb_id from feerate whereStartDateTime<>'00:00:00.0000000' or EndDateTime<>'23:59:59' )
--修改单位
update fee_lb set isYuan=0,isHour=0
--清除表结构
delete from fee_master
delete from feeList
delete from feeBetween
--升级自定义主表
insert into fee_master(lb_id,park_id,freeTime,freeTimeBetween,preTime,preMoney,limitTime,limitMoney)
select lb_id,park_id,ExtraTime,FreeTime,nPerMinutes,nPerMinuteFee,PerMinutes,PerMinuteFee from feerate
where StartDateTime='00:00:00.0000000' and EndDateTime='23:59:59'
--插入明细表
declare @i int,@s nvarchar(4000),@aIndex varchar(10)
set @i=1
set @s = ''
while @i<=12
begin
set @aIndex = CAST(@i as varchar(10))
set @s = @s + ' insert into feeList(fee_id,RuleTime,RuleMoney,findex) '+
' select fm.fee_id,RuleTime'+@aIndex+'n,RuleFee'+@aIndex+'n ,'+@aIndex+' from feerate fr inner join fee_master fm on fr.lb_id=fm.lb_id and fr.park_id = fm.park_id';
set @i = @i + 1
end
exec sp_executesql @s
--升级分段计费
insert into fee_master(lb_id,park_id,freeTime,freeTimeBetween,preTime,preMoney,limitTime,limitMoney,timeNum,standard,Subfee)
select lb_id,park_id,ExtraTime,FreeTime,nPerMinutes,nPerMinuteFee,1440,PerDayFeeLimit,2,StandardCalc,subsectionCalc from feerate
where StartDateTime<>'00:00:00.0000000' or EndDateTime<>'23:59:59'
--插入明细表
declare @time1 int,@time2 int,@time3 int,@time4 int
declare @fee1 int,@fee2 int,@fee3 int,@fee4 int
declare @wtime1 int,@wtime2 int,@wtime3 int,@wtime4 int
declare @wfee1 int,@wfee2 int,@wfee3 int,@wfee4 int
declare @fee_id int,@startTime varchar(30),@endtime varchar(30)
declare @perTime int,@perMoney int,@limitMoney int
declare @perTimew int,@perMoneyw int,@limitMoneyw int
declare mycursor Cursor for
select fm.fee_id,ruleTime1n,ruleFee1n,ruleTime2n,ruleFee2n,ruleTime3n,ruleFee3n,ruleTime4n,ruleFee4n,
ruleTime1w,ruleFee1w,ruleTime2w,ruleFee2w,ruleTime3w,ruleFee3w,ruleTime4w,ruleFee4w,StartDateTime,EndDateTime,
nPerMinutes,nPerMinuteFee,wPerMinutes,wPerMinuteFee,nPerMinuteFeeLimit,wPerMinuteFeeLimit
from feerate fr inner join fee_master fm on fr.lb_id=fm.lb_id and fr.park_id = fm.park_id
where StartDateTime<>'00:00:00.0000000' or EndDateTime<>'23:59:59'
--开启游标
open mycursor
--获取数据
FETCH NEXT FROM mycursor into @fee_id,@time1,@fee1,@time2,@fee2,@time3,@fee3,@time4,@fee4,
@wtime1,@wfee1,@wtime2,@wfee2,@wtime3,@wfee3,@wtime4,@wfee4,@startTime,@endtime,
@perTime,@perMoney,@perTimew,@perMoneyw,@limitMoney,@limitMoneyw
--判断游标的状态
-- 0 fetch语句成功
---1 fetch语句失败或此行不在结果集中
---2 被提取的行不存在
--如果上一次操作成功则继续循环
WHILE (@@fetch_status = 0)
BEGIN
--首先插入首段
if @fee4 > 0
begin
set @fee4 = @fee4 + @fee3 + @fee2 + @fee1
set @time4 = @time4 + @time3 + @time2 + @time1
end
if @fee3 > 0
begin
set @fee3 =@fee3 + @fee2 + @fee1
set @time3 = @time3 + @time2 + @time1
end
if @fee2 > 0
begin
set @fee2 = @fee2 + @fee1
set @time2 = @time2 + @time1
end
insert into feeBetween(fee_id,startTime,endTime,RuleTime1,RuleMoney1,RuleTime2,RuleMoney2,
RuleTime3,RuleMoney3,RuleTime4,RuleMoney4,perTime,perMoney,limitMoney,aindex,aType)
values(@fee_id,@startTime,@endtime,@time1,@fee1,@time2,@fee2,@time3,@fee3,@time4,@fee4,
@perTime,@perMoney,@limitMoney,1,0)
--插入段外
if @wfee4 > 0
begin
set @wfee4 = @wfee4 + @wfee3 + @wfee2 + @wfee1
set @wtime4 = @wtime4 + @wtime3 + @wtime2 + @wtime1
end
if @wfee3 > 0
begin
set @wfee3 =@wfee3 + @wfee2 + @wfee1
set @wtime3 = @wtime3 + @wtime2 + @wtime1
end
if @wfee2 > 0
begin
set @wfee2 = @wfee2 + @wfee1
set @wtime2 = @wtime2 + @wtime1
end
insert into feeBetween(fee_id,startTime,endTime,RuleTime1,RuleMoney1,RuleTime2,RuleMoney2,
RuleTime3,RuleMoney3,RuleTime4,RuleMoney4,perTime,perMoney,limitMoney,aindex,aType)
values(@fee_id,'00:00:00','00:00:00',@wtime1,@wfee1,@wtime2,@wfee2,@wtime3,@wfee3,@wtime4,@wfee4,
@perTimew,@perMoneyw,@limitMoneyw,2,1)
--用游标去取下一条记录(继续取下一行数据)
FETCH NEXT FROM mycursor INTO @fee_id,@time1,@fee1,@time2,@fee2,@time3,@fee3,@time4,@fee4,
@wtime1,@wfee1,@wtime2,@wfee2,@wtime3,@wfee3,@wtime4,@wfee4,@startTime,@endtime,
@perTime,@perMoney,@perTimew,@perMoneyw,@limitMoney,@limitMoneyw
END
--关闭游标
close mycursor
--释放内存
DEALLOCATE mycursor
--升级存储过程
declare myCursor2 cursor for
select distinct lb_id from savecard
open myCursor2
declare @lbid int,@feeM int,@lb_id int,@park_id int,@fee_idTem int,@lb_idtemp int
fetch from myCursor2 into @lbid
while @@fetch_status = 0
begin
select * into #tempMaster fromfee_masterwhere lb_id=@lbid
--插入fee_lb表
select @lb_idtemp = MAX(lb_id) from fee_lb
set @lb_idtemp = @lb_idtemp +1
insert into fee_lb(lb_id,lb_mc,ofmonth,FType,isYuan,isHour,feeType)
select @lb_idtemp,'储值'+lb_mc,ofmonth,2,isYuan,isHour,feeType from fee_lb where lb_id = @lbid
--更新储值车收费类型
update savecard set lb_id = @lb_idtemp where lb_id = @lbid
--插入主表
WHILE EXISTS(SELECT fee_id FROM #tempMaster)
BEGIN
SELECTtop 1 @fee_id = fee_idFROM #tempMaster
DELETE FROM #tempMaster WHERE fee_id=@fee_id
select @park_id =park_id from fee_master where fee_id= @fee_id
--插入fee_master表
insert into fee_master(lb_id,park_id,freeTime,freeTimeBetween,preTime,preMoney,limitTime,limitMoney,timeNum,standard,Subfee)
select @lb_idtemp,park_id,freeTime,freeTimeBetween,preTime,preMoney,limitTime,limitMoney,timeNum,standard,Subfee from fee_master where fee_id = @fee_id
--插入明细表feeList
select @fee_idTem = MAX(fee_id) from fee_master
insert into feeList(fee_id,RuleTime,RuleMoney,findex)
select @fee_idTem,RuleTime,RuleMoney,findex from feeList where fee_id = @fee_id
--插入明细表
insert into feeBetween(fee_id,startTime,endTime,RuleTime1,
RuleMoney1,RuleTime2,RuleMoney2,RuleTime3,RuleMoney3,RuleTime4,RuleMoney4,perTime,perMoney,limitMoney,aindex,aType)
select @fee_idTem,startTime,endTime,RuleTime1,RuleMoney1,RuleTime2,RuleMoney2,RuleTime3,
RuleMoney3,RuleTime4,RuleMoney4,perTime,perMoney,limitMoney,aindex,aType from feeBetween where fee_id = @fee_id
END
drop table #tempMaster
fetch next from myCursor2 into @lbid
end
--关闭游标
close myCursor2
--释放内存
DEALLOCATE myCursor2
if @@ERROR <> 0
rollback tran
else
commit tran
GO
/****** Object:StoredProcedure . Script Date: 2019-07-11 13:52:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create proc .
as
--首先全部查询车位
select a.park_id,a.sb_id sb_id,t.parent_id parent_id,isnull(a.parknum,0) parknum,isnull(b.month_cw,0) month_cw,isnull(c.save_cw,0) save_cw,
isnull(d.free_cw,0) free_cw,isnull(e.time_cw,0) time_cw
into #tb_cw
from parkinfo a WITH(NOLOCK)
inner join treeview t on t.sb_id = a.sb_id
left join (select count(1) as month_cw,park_id from parked WITH(NOLOCK) where out_time
is nulland card_kind='月租卡'
group by park_id )b on a.park_id = b.park_id
left join (select count(1) as save_cw,park_id from parked WITH(NOLOCK) where out_time
is nulland card_kind='储值卡'
group by park_id )c on a.park_id = c.park_id
left join (select count(1) as free_cw,park_id from parkedWITH(NOLOCK)where out_time
is nulland card_kind='免费卡'
group by park_id )d on a.park_id = d.park_id
left join (select count(1) as time_cw,park_id from parked WITH(NOLOCK) where out_time
is nulland ( card_kind ='计时卡' orcard_kind = '车牌识别计费')group by park_id )e on a.park_id = e.park_id
--声明一个游标mycursor
declare @park_id int,@month_cw int,@save_cw int,@free_cw int,@time_cw int,@parent_id int
DECLARE mycursor CURSOR
FOR
SELECT park_id,parent_id, month_cw, save_cw,free_cw,time_cw from#tb_cw
--打开游标
OPEN mycursor
--从游标里取出数据赋值
FETCH NEXT FROM mycursor INTO @park_id,@parent_id, @month_cw, @save_cw,@free_cw,@time_cw
--判断游标的状态
-- 0 fetch语句成功
---1 fetch语句失败或此行不在结果集中
---2 被提取的行不存在
WHILE ( @@fetch_status = 0 )
BEGIN
--显示出我们每次用游标取出的值
if @parent_id <> 1
begin
update #tb_cw set month_cw = month_cw- @month_cw ,save_cw= save_cw - @save_cw,
free_cw= free_cw - @free_cw , time_cw= time_cw -@time_cw where sb_id = @parent_id
end
--用游标去取下一条记录
FETCH NEXT FROM mycursor INTO @park_id,@parent_id, @month_cw, @save_cw,@free_cw,@time_cw
END;
--关闭游标
CLOSE mycursor;
--撤销游标
DEALLOCATE mycursor;
--月租车不计入车位
/*
if exists (select * from ParameterList where ParamName= 'cw_month' and ParamValue='True' )
update #tb_cw set month_cw = 0
if exists (select * from ParameterList where ParamName= 'cw_save' and ParamValue='True' )
update #tb_cw set save_cw = 0
if exists (select * from ParameterList where ParamName= 'cw_mfee' and ParamValue='True' )
update #tb_cw set free_cw = 0
*/
begin tran
delete from tbParkLot --删除车位表信息
--插入最新的车位表信息(剩余车位所有车都计入车位)
insert into tbParkLot
select park_id,sb_id,parknum,month_cw,time_cw,free_cw,save_cw,parknum-time_cw-free_cw-save_cw-month_cw from #tb_cw
--月租车不计入车牌
if exists (select * from ParameterList where ParamName= 'cw_month' and ParamValue='True' )
update tbParkLot set use_lot = use_lot + month_lot
--储值车不计入车位
if exists (select * from ParameterList where ParamName= 'cw_save' and ParamValue='True' )
update tbParkLot set use_lot = use_lot + save_lot
--免费车不计入车位
if exists (select * from ParameterList where ParamName= 'cw_mfee' and ParamValue='True' )
update tbParkLot set use_lot = use_lot + free_lot
commit tran
drop table #tb_cw
GO
/****** Object:StoredProcedure . Script Date: 2019-07-11 13:52:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--创建存储过程
create proc .
as
declare @cardid varchar(20),
@car_cp varchar(20),
@car_model varchar(20),
@car_haoma varchar(20),
@username varchar(16),
@user_sex varchar(6),
@user_haoma varchar(25),
@user_phone varchar(35),
@user_dw varchar(30),
@house_adress varchar(60),
@SharePortNo varchar(20),
@Cwnum int,
@groupid int,
@parkid int,
@isgroup int,
@groupmoney int
begin transaction --开启事务
DECLARE cardviewCursor CURSOR FOR
select m.card_id,c.car_cp,c.car_model,c.car_haoma,u.user_name,u.user_sex,u.user_haoma,u.user_phone,u.user_dw,h.house_adress,
isnull(p.group_id,0) as groupid,m.ParkID,h.SharePortNo,h.Cw_Num,h.isgroup,h.groupmoney
from monthcard m left join carinfo c on m.card_id = c.card_id
left join userinfo u on m.user_bh = u.user_bh
left join household h on u.house_id = h.house_id
left join (select group_id,group_name from PermissionGroup group by group_id,group_name) p on m.group_name = p.group_name
union all
select s.card_id,c.car_cp,c.car_model,c.car_haoma,u.user_name,u.user_sex,u.user_haoma,u.user_phone,u.user_dw,h.house_adress,
0 as groupid,s.ParkID,null as shareportno,null as Cw_Num,h.isgroup,h.groupmoney
from savecard s left join carinfo c on s.card_id = c.card_id
left join userinfo u on s.user_bh = u.user_bh
left join household h on u.house_id = h.house_id
union all
select m.card_id,c.car_cp,c.car_model,c.car_haoma,u.user_name,u.user_sex,u.user_haoma,u.user_phone,u.user_dw,h.house_adress,
0 as groupid,m.ParkID,null as shareportno,null as Cw_Num,h.isgroup,h.groupmoney
from mfeecard m left join carinfo c on m.card_id = c.card_id
left join userinfo u on m.user_bh = u.user_bh
left join household h on u.house_id = h.house_id
OPEN cardviewCursor --打开游标
FETCH NEXT FROM cardviewCursor INTO @cardid,@car_cp,@car_model,@car_haoma,@username,@user_sex,@user_haoma,@user_phone,@user_dw,
@house_adress,@groupid,@parkid,@SharePortNo,@cwnum,@isgroup,@groupmoney
WHILE @@FETCH_STATUS = 0
BEGIN
update card_view Set car_cp=@car_cp,car_model=@car_model,carno=@car_haoma,username=@username,sex=@user_sex,idcard=@user_haoma,
phone=@user_phone,workplace=@user_dw,homeaddress=@house_adress,cwno=@SharePortNo,Groupid=@groupid,parkid=@parkid
where card_id = @cardid
if isnull(@SharePortNo,'''') <> ''''
begin
IF not EXISTS (select *from carport where CwNo = @SharePortNo)
begin
insert into CarPort(CwNo,CwNum,isgroup,groupmoney) select @SharePortNo,@cwnum,@isgroup,@groupmoney
end
end
FETCH NEXT FROM cardviewCursor INTO @cardid,@car_cp,@car_model,@car_haoma,@username,@user_sex,@user_haoma,@user_phone,@user_dw,
@house_adress,@groupid,@parkid,@SharePortNo,@cwnum,@isgroup,@groupmoney
END
CLOSE cardviewCursor
DEALLOCATE cardviewCursor
if(@@ERROR <> 0)
begin
rollback transaction
end
else
begin
commit transaction
end
GO
/****** Object:StoredProcedure . Script Date: 2019-07-11 13:52:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC .
@path NVARCHAR(100)
AS
IF RIGHT(@path,1)<>'\' SET @path=@path+'\'
DECLARE @t TABLE(id INT IDENTITY,a INT,b INT,c INT)
DECLARE @fpath NVARCHAR(3)
SET @fpath=LEFT(@path,3)
INSERT @t EXEC master..xp_fileexist @fpath
INSERT @t EXEC master..xp_fileexist @path
IF EXISTS(SELECT 1 FROM @t WHERE id=1 AND c=0)
BEGIN
RAISERROR(N'输入的盘符不存在,请重新输入!',16,1)
RETURN
END
ELSE IF EXISTS(SELECT 1 FROM @t WHERE b=0 AND id=2)
BEGIN
DECLARE @mddir NVARCHAR(100)
SET @mddir='md '+@path
EXEC master..xp_cmdshell @mddir
END
DECLARE @s nvarchar(4000)
SELECT @s=ISNULL(@s+';','')
+N'BACKUP database ['+name+'] TO DISK = '''
+@path+name+ convert(varchar(50),getdate(),112)+N'.bak''WITH INIT'
FROM master..sysdatabases
WHERE name NOT IN('master','tempdb','model','msdb','pubs')--这里筛选不参加备份的数据库
AND NAME ='property'--此处可以指定任意某个数据库,也可以屏蔽该行则全部备份
EXEC(@S)
GO
USE
GO
ALTER DATABASE SETREAD_WRITE
GO
wu0o0pj 发表于 2019-7-12 13:42
没怎么看明白
意思是新的升级后的 MSSQL2017 是 用的 Linux 版的,所以是装在 Linux 系统中的 (应该 ...
新服务器是LINUX 跑着MSSQLSERVER 2017
旧服务器是WINDOWS服务器跑着MSSQLSERVER2008
这个是我精简过的,没有改动过的 .配置文件在进软件设置里面,我忘记提供密码了 dba_pass
进去可以设置IP SQL链接信息.
设置完IP,采用导出数据 远程链接LINUX SQL2017 可以链接.但数据不完整,提示很多字段不允许NULL
用SQL脚本导入,远程可以链接,但是软件提示数据库版本太低.一直会用软件内置的SQL修复工具来循环修复数据库,并不能修复成功. 我估计强行跳过去也会导致数据库出问题 升级数据库才是最好的解决办法 数据库里面哪里有版本号,去把这个修改成和软件版本一致 ℡小疯、 发表于 2019-7-12 11:50
升级数据库才是最好的解决办法
就是2008升级程2017才出现这个问题 .应该是软件有数据库版本检测的机制 Linux系统用2008版本 卸载掉2017的。。要么找服务器商帮你搞。 hack528 发表于 2019-7-12 12:55
Linux系统用2008版本 卸载掉2017的。。要么找服务器商帮你搞。
LINUX 没有2008呀 .服务商不管....惨 建议倒回去,SQL数据库升级软件要跟着一起维护,不然开发商也不会去卡版本, bycine 发表于 2019-7-12 13:09
LINUX 没有2008呀 .服务商不管....惨
自己装吧。这种停车场系统一般都是SQL 2000 2005 2008就行了 没必要去装2017 数据又不大
页:
[1]
2