Database Reference
In-Depth Information
everyone to know where to look for information. The T-SQL code in Listing 1-1 cre-
ates the database you will use throughout the rest of this chapter.
Listing 1-1 . Example of T-SQL Code to Create a SQL Server Database
USE [master];
GO
CREATE DATABASE [dbaCentralLogging]
ON PRIMARY
(
NAME = N'dbaCentralLogging'
, FILENAME = N'C:\Program Files\Microsoft SQL
Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\dbaCentralLogging.mdf'
, SIZE = 1024MB
, MAXSIZE = UNLIMITED
, FILEGROWTH = 1024MB
)
LOG ON
(
NAME = N'dbaCentralLogging_log'
, FILENAME = N'C:\Program Files\Microsoft SQL
Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\dbaCentralLogging_log.ldf'
, SIZE = 256MB
, MAXSIZE = UNLIMITED
, FILEGROWTH = 256MB
);
GO
Please note that your file directory may differ from the one in the preceding ex-
ample.
This code can be executed from SQL Server Management Studio (SSMS), as
demonstrated in Figure 1-2 , or from your favorite query tool.
 
 
 
Search WWH ::




Custom Search