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