Sqlsever Base Setting the logical name of the database file and the log file

Source: Internet
Author: User

1 Code

1 Select* fromsysdatabases2 3 drop Database HelloWorld4 5 CREATE DATABASE HelloWorld6 7--set properties for MDF files8 On primary9 (TenName ='Ahelloworldlogic',  --the logical name of the MDF file (not the file name) Onefilename ='C:\Users\Administrator\Desktop\aHelloWorld.mdf', --the storage path of the MDF file and its file name ASIZE=5MB,--Initial size is 5 megabytes -Filegrowth=Ten%,--file growth 10% per time -MAXSIZE=10MB--Maximum file size is 10 MB the ) ---set related properties for a log file - Log on - ( +Name='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 AFilegrowth=Ten%,--log file is full, add 10% each timeof Capacity atMAXSIZE=10MB--log file Max 10mb -)

Sqlsever Base Setting the logical name of the database file and the log file

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.