Recent

6/recent/ticker-posts

Header Ads Widget

Create Databse in sql Server using Query

Using Sql Query editor

CREATE DATABASE [tutorialsdb]
 CONTAINMENT = NONE
 ON  PRIMARY
( NAME = N'tutorialsdb', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\tutorialsdb.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
 LOG ON
( NAME = N'tutorialsdb_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\tutorialsdb_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO

Here [tutorialsdb] is database name

FILENAME =Filename with file location in drive

SIZE =Size of database duriong Creatin

Maxsize= Maximum size of database reach

FILEGROWTH= when first size is full or size of database is reached to filesize then it grow the size by 

Post a Comment

0 Comments