Create a database

Source: Internet
Author: User

Create a database

CREATE Database testdb1on (name=Testdb1,filename='D:\testdb1.mdf', size=Ten, MaxSize= -, FileGrowth=1) Log on (name=Testdb_log,filename='D:\testdb_log.ldf', size=1, MaxSize=unlimited,filegrowth=Ten%) Go
View Code
CREATE Database testdb1on (name=Testdb1,filename='D:\testdb1.mdf', size=Ten, MaxSize= -, FileGrowth=1) Log on (name=Testdb1_log,filename='D:\testdb1_log.ldf', size=1, MaxSize=unlimited,filegrowth=Ten%), (name=Testdb2_log,filename='D:\testdb2_log.ldf', size=1, MaxSize=unlimited,filegrowth=Ten%) Go
View Code

View database Information

Execute sp_helpdb TESTDB1

or sp_helpdb

sp_helpdb testdb1alter Database testdb1add file (name=Testdb1ndf1,filename='D:\TESTDB1NDF1.NDF', size=5mb,maxsize=10mb,filegrowth=6MB) to filegroup mygroupalter database testdb1add log file (name=Testdb3_log,filename='D:\testdb3.ldf', size=5mb,maxsize=10mb,filegrowth=Ten%ALTER DATABASE testdb1modify file (name=testdb1,size=21mb) Goalter database testdb1modify file (name=testdb_log,size=21MB) ALTER DATABASE TESTDB1ADD filegroup mygroupgosp_helpfilegroupgosp_helpdb testdb1alter Database Testdb1remove File Testdb3_log
View Code

Filegroup Usage http://blog.csdn.net/kevinsqlserver/article/details/8573312

Set the database to read only

Properties → options → state → database read-only true

Create a database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.