SQL Server 2008中怎么创建数据库
2个回答
展开全部
新建查询 把一下代码复制粘贴一下 把qpglxt 改为你要创建的数据库 FILENAME 改成你自己想要的路径
USE [master]
GO
/****** Object: Database [qpglxt] Script Date: 05/19/2015 16:42:33 ******/
CREATE DATABASE [qpglxt] ON PRIMARY
( NAME = N'qpglxt', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\qpglxt.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
LOG ON
( NAME = N'qpglxt_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\qpglxt_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
ALTER DATABASE [qpglxt] SET COMPATIBILITY_LEVEL = 100
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [qpglxt].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [qpglxt] SET PAGE_VERIFY CHECKSUM
go
USE [master]
GO
/****** Object: Database [qpglxt] Script Date: 05/19/2015 16:42:33 ******/
CREATE DATABASE [qpglxt] ON PRIMARY
( NAME = N'qpglxt', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\qpglxt.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
LOG ON
( NAME = N'qpglxt_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\qpglxt_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
ALTER DATABASE [qpglxt] SET COMPATIBILITY_LEVEL = 100
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [qpglxt].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [qpglxt] SET PAGE_VERIFY CHECKSUM
go
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询