一个SQL2000数据库实验的具体说明_SQL SERVER数据库_黑客防线网安服务器维护基地--Powered by WWW.RONGSEN.COM.CN

一个SQLServer2000实验的具体说明

作者:黑客防线网安SQL维护基地 来源:黑客防线网安SQL维护基地 浏览次数:0

本篇关键词:说明具体实验一个
黑客防线网安网讯:今天做sql server 2000的一个实验,比较简单的那种,新建数据库,修改日志文件的大小等等吧,恩,应该还是比较简单的了。下面还是记录一下啦~都这么就没有来过了的。    /*  ** CREA...
今天做sql server 2000的一个实验比较简单的那种新建数据库,修改日志文件的大小等等吧,恩,应该还是比较简单的了下面还是记录一下啦~都这么就没有来过了的
  
  /*
  ** CREABASE.SQL
  **
  ** Drop and Rereate the credit database. Record the time required.
  */
  
  PRINT 'Begin CREABASE.SQL'
  GO
  
  USE master
  SET nocount ON
  GO
  
  IF db_id('credit') IS NOT NULL
  DROP DATABASE credit
  GO
  
  CREATE DATABASE [credit]
  ON PRIMARY (NAME = N'credit_Data',
  FILENAME = N'C:Program FilesMicrosoft SQL ServerMSSQLDatacredit_Data.MDF',
  SIZE = 50,
  FILEGROWTH = 10%)
  LOG ON (NAME = N'credit_Log',
  FILENAME = N'C:Program FilesMicrosoft SQL ServerMSSQLDatacredit_Log.LDF',
  SIZE = 1,
  FILEGROWTH = 10%)
  GO
  
  ALTER DATABASE credit
  ADD FILEGROUP CreditTablesFG
  GO
  ALTER DATABASE credit
  ADD FILEGROUP CreditIndexesFG
  GO
  ALTER DATABASE credit
  ADD FILE (
  NAME = CreditTables,
  FILENAME = 'C:Program FilesMicrosoft SQL ServerMSSQLDataCreditTables.ndf',
  SIZE = 8MB,
  MAXSIZE = UNLIMITED,
  FILEGROWTH = 50MB )
  TO FILEGROUP CreditTablesFG
  ALTER DATABASE credit
  ADD FILE (
  NAME = CreditIndexes,
  FILENAME = 'C:Program FilesMicrosoft SQL ServerMSSQLDataCreditIndexes.ndf',
  SIZE = 8MB,
  MAXSIZE = UNLIMITED,
  FILEGROWTH = 50MB )
  TO FILEGROUP CreditIndexesFG
  GO
  
  PRINT ' '
  IF db_id('credit') IS NOT NULL
  PRINT 'CREATED DATABASE "credit"'
  ELSE
  PRINT 'CREATE DATABASE "credit" FAILED'
  PRINT ' '
  GO
  
  /*
  ** This script sets the database recovery model to SIMPLE
  ** for the ClassNorthwind database. Simple Recovery allows
  ** the database to be recovered to the most recent backup.
  **
  ** Look under the status column of your sp_helpdb results to
  ** view the recovery model that has been set for a database.
  */
  
  USE ClassNorthwind
  
  ALTER DATABASE ClassNorthwind SET RECOVERY SIMPLE
  
  EXEC sp_helpdb ClassNorthwind
  GO
  
  /*
  This script modifies the maximum size of the ClassNorthwind transaction log file
  and increases its current size.
  */
  
  USE master
  GO
  
  ALTER DATABASE ClassNorthwind
  MODIFY FILE (NAME='ClassNorthwind_Log',
  MAXSIZE=50MB)
  GO
  
  ALTER DATABASE ClassNorthwind
  MODIFY FILE (NAME='ClassNorthwind_Log',
  SIZE=25MB)
  GO
  ALTER DATABASE ClassNorthwind
  MODIFY FILE (NAME='ClassNorthwind_Log',
  FILEGROWTH=20%)
  GO
  
  EXEC sp_helpdb ClassNorthwind
    黑客防线网安服务器维护方案本篇连接:http://www.rongsen.com.cn/show-10179-1.html
网站维护教程更新时间:2012-03-21 02:30:27  【打印此页】  【关闭
我要申请本站N点 | 黑客防线官网 |  
专业服务器维护及网站维护手工安全搭建环境,网站安全加固服务。黑客防线网安服务器维护基地招商进行中!QQ:29769479

footer  footer  footer  footer