MCQs Test!! VB Basic Test !! Essentials of VB !! Creating User Services !! function !! Anatomy !! GK March-2019 !! DATA TYPES IN JAVA !! Classes ,Constructor ,Methods,Inheritance !! Ecology-I !! Biology 2019 !! Gk april 2019 !! Biology (living world) !! Plant anatomy !! CELL STRUCTURES AND FUNCTION !! General biology !! Human physiology !! Data structure !! Ecology-II !! GK TEST !! Reproduction in plants !! Human reproduction !! The ABC of C !! Operating system set1 !! Operating system set2 !! Gk and current affairs !! Animal kingdom !! Number system !! Animal kingdom-II !! Gk TEST-III !! Number series !! Microorganisms !! Interview question in c !! Time and Work !! Percentage !! General history !! Average !! Cells !! Locomotion and Movement !! paging !! Bacteriology !! Page replacement policy !! Secondary memory and Disk scheduling !! Introduction of Nervous System and neurons !! Plant harmones !! Transport and Mineral Nutrition in Plants !! Neurotransmitters !! Modern Indian History !! Photosynthesis in Plants !! Modern Indian History-II !! Plant respiration !! Environment & Biodiversity !! Environment & Biodiversity - II !! Algae, Bryophytes, Pteridophytes !! Area !! Cricket !! Days of the Year (India and the World) !! Plant Pathology - I !! Indian Transport System !! Plant Pathology - II !! Aptitude !! Biology !! Botany !! C language !! Computer Science !! Core Java !! Gate !! GK !! Mysql !! Operating system !! Physics !! VB-Visual Basic !! Zoology

DATABASE & SQL/PLSQL

How to create a Data Base in SQL server
Previous Home Next

The creation of a database involves the database and determining the size of the database and the files used to store data in the database.

CREATE DATABASE database_name
ON
[<filespace>...n]
[<filegroup>...n]
LOG ON
(NAME=logical_file_name,
FILENAME='os_file_name',
SIZE=size,MAXSIZE=max_size,
FILEGROWTH=growth_increment)

where, data_base name is the name of new database.

ON specifies the disk files used to store the data portion of the database.

NAME=logical_file_name specifies the logical name for the file.

FILENAME=os_file_name specifies the operating system file name.

SIZE=size specifies the initial size f the file defined in the (<filespace>) list.

MAXSIZE=max_size specifies the maximum size to which the file defined in the <filespace> list can grow

FILEGROWTH=growth_incremet specifies the growth increament of the file defined in the <filespace> list.

FILEGROUP filegroup_name name specifies the name of the filegroup.

LOG ON specifies the disk files used to store the log files.

 

Example:

CREATE DATABASE  aditya
ON
(NAME=aditya_dat,
FILENAME='C:\Program Files\Microsoft SQL Server\MSSQL\DATA\aditya.mdf',
SIZE=12,
MAXSIZE=100,
FILEGROWTH=2)
LOG ON
(NAME='aditya_log',
FILENAME='C:\Program Files\Microsoft SQL Server\MSSQL\DATA\aditya.ldf',
SIZE=4 MB,
MAXSIZE=50 MB,
FILEGROWTH=2 MB)

The CREATE DATABASE process is allocating 12.00 MB on disk 'aditya_dat'.

The CREATE DATABASE process is allocating 4.00 MB on disk 'aditya_log'.

output

Aditya named database created

Previous Home Next