使用T-SQL语句创建一个数据库DBEX,数据库文件全部放在C盘“db”文件夹下

使用T-SQL语句创建一个数据库DBEX,数据库文件全部放在C盘“db”文件夹下,主数据文件初始大小为5MB,增长方式为2M每次,最大值为20MB;次数据文件初始化大小为3MB,增长方式为20%每次;日志文件初始化大小为5MB,其他属性默认。

第1个回答  推荐于2017-09-22
你先用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本回答被提问者采纳
第2个回答  2014-06-19
创建一个数据库实例然后建一个表空间就可以了

mfc 连接数据源后怎么操作数据库中的数据,先谢谢啦……
1。配置错误!【重启,出完电脑品牌后,按F8,安全模式,最后一次正确配置,回车,回车】!2。系统漏洞!【360安全卫士或金山卫士,或可牛免费杀毒,修复:高危和重要的,其它忽略】!3。软件冲突!【卸载不常用的软件,保持系统稳定,尤其是同类型的软件,不兼容】!4。软件版本过旧!【使用:(驱动人...

相似回答