Хелпикс

Главная

Контакты

Случайная статья





CREATE DATABASE proba. ON PRIMARY(. FILEGROWTH = 1024KB. CREATE TABLE dbo.Teachers ( idTeacher int IDENTITY, FIOTeacher varchar(50) NOT NULL, idDepartment int NOT NULL,. CONSTRAINT PK_Teachers PRIMARY KEY (idTeacher)



CREATE DATABASE proba

ON PRIMARY(

NAME = N'proba',

FILENAME = N'c:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\proba.mdf',

SIZE = 4160KB,

MAXSIZE = UNLIMITED,

FILEGROWTH = 1024KB

)

LOG ON(

NAME = N'proba_log',

FILENAME = N'c:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\proba_log.ldf',

SIZE = 1040KB,

MAXSIZE = UNLIMITED,

FILEGROWTH = 10%

)

GO 

--

-- Изменить базу данных

--

PRINT (N'Изменить базу данных')

GO

ALTER DATABASE proba

SET

ANSI_NULL_DEFAULT OFF,

ANSI_NULLS OFF,

ANSI_PADDING OFF,

ANSI_WARNINGS OFF,

ARITHABORT OFF,

AUTO_CLOSE ON,

AUTO_CREATE_STATISTICS ON,

AUTO_SHRINK OFF,

AUTO_UPDATE_STATISTICS ON,

AUTO_UPDATE_STATISTICS_ASYNC OFF,

COMPATIBILITY_LEVEL = 110,

CONCAT_NULL_YIELDS_NULL OFF,

CONTAINMENT = NONE,

CURSOR_CLOSE_ON_COMMIT OFF,

CURSOR_DEFAULT GLOBAL,

DATE_CORRELATION_OPTIMIZATION OFF,

DB_CHAINING OFF,

HONOR_BROKER_PRIORITY OFF,

MULTI_USER,

NUMERIC_ROUNDABORT OFF,

PAGE_VERIFY CHECKSUM,

PARAMETERIZATION SIMPLE,

QUOTED_IDENTIFIER OFF,

READ_COMMITTED_SNAPSHOT OFF,

RECOVERY SIMPLE,

RECURSIVE_TRIGGERS OFF,

TRUSTWORTHY OFF

WITH ROLLBACK IMMEDIATE

GO

 

ALTER DATABASE proba

SET ENABLE_BROKER

GO

 

ALTER DATABASE proba

SET ALLOW_SNAPSHOT_ISOLATION OFF

GO

 

ALTER DATABASE proba

SET FILESTREAM (NON_TRANSACTED_ACCESS = OFF)

GO

USE proba

GO

IF DB_NAME() <> N'proba' SET NOEXEC ON

GO 

--

-- Создать таблицу "dbo.Teachers"

--

PRINT (N'Создать таблицу "dbo.Teachers"')

GO

CREATE TABLE dbo.Teachers ( idTeacher int IDENTITY, FIOTeacher varchar(50) NOT NULL, idDepartment int NOT NULL,

CONSTRAINT PK_Teachers PRIMARY KEY (idTeacher)

)

ON [PRIMARY]

GO 

--

-- Создать таблицу "dbo.Subjects"

--

PRINT (N'Создать таблицу "dbo.Subjects"')

GO



  

© helpiks.su При использовании или копировании материалов прямая ссылка на сайт обязательна.