在使用T—SQL 语句修改数据库属性,必须指明数据文件什么属性

 我来答
草原上之狼
高粉答主

2019-01-05 · 醉心答题,欢迎关注
知道大有可为答主
回答量:2.9万
采纳率:93%
帮助的人:3950万
展开全部
你先用mangerment studio弄,在生成个create脚本就好了呀。。。
USE [master]
GO

/****** Object: Database [DBEX] Script Date: 06/19/2014 11:25:12 ******/
CREATE DATABASE [DBEX] ON PRIMARY
( NAME = N'DBEX', FILENAME = N'C:\db\DBEX.mdf' , SIZE = 5120KB , MAXSIZE = 20480KB , FILEGROWTH = 2048KB )
LOG ON
( NAME = N'DBEX_log', FILENAME = N'C:\db\DBEX_log.ldf' , SIZE = 3072KB , MAXSIZE = 2048GB , FILEGROWTH = 20%)
GO

ALTER DATABASE [DBEX] SET COMPATIBILITY_LEVEL = 100
GO

IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [DBEX].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO

ALTER DATABASE [DBEX] SET ANSI_NULL_DEFAULT OFF
GO

ALTER DATABASE [DBEX] SET ANSI_NULLS OFF
GO

ALTER DATABASE [DBEX] SET ANSI_PADDING OFF
GO

ALTER DATABASE [DBEX] SET ANSI_WARNINGS OFF
GO

ALTER DATABASE [DBEX] SET ARITHABORT OFF
GO

ALTER DATABASE [DBEX] SET AUTO_CLOSE OFF
GO

ALTER DATABASE [DBEX] SET AUTO_CREATE_STATISTICS ON
GO

ALTER DATABASE [DBEX] SET AUTO_SHRINK OFF
GO

ALTER DATABASE [DBEX] SET AUTO_UPDATE_STATISTICS ON
GO

ALTER DATABASE [DBEX] SET CURSOR_CLOSE_ON_COMMIT OFF
GO

ALTER DATABASE [DBEX] SET CURSOR_DEFAULT GLOBAL
GO

ALTER DATABASE [DBEX] SET CONCAT_NULL_YIELDS_NULL OFF
GO

ALTER DATABASE [DBEX] SET NUMERIC_ROUNDABORT OFF
GO

ALTER DATABASE [DBEX] SET QUOTED_IDENTIFIER OFF
GO

ALTER DATABASE [DBEX] SET RECURSIVE_TRIGGERS OFF
GO

ALTER DATABASE [DBEX] SET DISABLE_BROKER
GO

ALTER DATABASE [DBEX] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO

ALTER DATABASE [DBEX] SET DATE_CORRELATION_OPTIMIZATION OFF
GO

ALTER DATABASE [DBEX] SET TRUSTWORTHY OFF
GO

ALTER DATABASE [DBEX] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO

ALTER DATABASE [DBEX] SET PARAMETERIZATION SIMPLE
GO

ALTER DATABASE [DBEX] SET READ_COMMITTED_SNAPSHOT OFF
GO

ALTER DATABASE [DBEX] SET HONOR_BROKER_PRIORITY OFF
GO

ALTER DATABASE [DBEX] SET READ_WRITE
GO

ALTER DATABASE [DBEX] SET RECOVERY FULL
GO

ALTER DATABASE [DBEX] SET MULTI_USER
GO

ALTER DATABASE [DBEX] SET PAGE_VERIFY CHECKSUM
GO

ALTER DATABASE [DBEX] SET DB_CHAINING OFF
GO
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式