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=1MB,--log file is full, increase capacity by 1 megabytes at a time atMAXSIZE=10MB--log file Max 10mb -)
Sqlsever base settings database file and log file size growth rate