Sunday, November 24, 2013

Sql server create database



create database student
on primary
(
   name='st_data',--àit is use for logical name.
   filename='f:\mydata\st_data.mdf',--à it is used actual store data in the hardisk
   size=10mb,
   maxsize=20mb,
   filegrowth=2mb
),
(
   name='st_data1',
   filename='f:\mydata\st_data1.ndf',
   size=10mb,
   maxsize=12mb,
   filegrowth=3mb
)
log on
(
   name='st_data2',
   filename='f:\mydata\st_data2.ldf',
   size=12mb,
   maxsize=20mb,
   filegrowth=4mb
)


The create database process is allocating 10.00 MB on disk st_data for .mdf file.10 MB on disk st_data1 for .NDF file

And 12 mb on disk st_data2 for .LDF file .

  • We can see this result

  • After running this query . we can see this result

  •  Go to database properties and select files .

  • We can see this result 

    Step-1

    Step-2

     

No comments:

Post a Comment

sql server index

sql index An index is an internal table structure that sql server uses to provide quick access to rows of a table based on the values...