Sqlsever base Use script to create database and log files to the specified path

Source: Internet
Author: User

1

2 Code

1 CREATE DATABASE HelloWorld2 3--set properties for MDF files4 On primary5 (6Name ='Ahelloworldlogic',  --the logical name of the MDF file (not the file name)7filename ='C:\Users\Administrator\Desktop\aHelloWorld.mdf', --the storage path of the MDF file and its file name8SIZE=5MB,--Initial size is 5 megabytes9Filegrowth=Ten%,--file growth 10% per timeTenMAXSIZE=10MB--Maximum file size is 10 MB One ) A--set related properties for a log file - Log on - ( theName='Ahelloworld_loglogic', --logical name of the log file (not the file name) -Filename='C:\Users\Administrator\Desktop\aHelloWorld_log.ldf',--where the log file exists and its file name -SIZE=1MB,--log file Initial size -Filegrowth=Ten%,--log file is full, add 10% each timeof Capacity +MAXSIZE=10MB--log file Max 10mb -)

3

4

Sqlsever base Use script to create database and log files to the specified path

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.