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