Database Reference
In-Depth Information
4. Now press Enter to add a new line, and type the create database statement, as
shown here.
Note Please notice the bold text in the FileName argument in the following code; this represents your SQL
Server 2012 instance name. I suggest you browse to your SQL Server folder location through Windows Explorer, as
shown in Figure 3-3, and then copy and paste the path in the FileName argument.
5. CREATE DATABASE SQL2012Db
ON PRIMARY
( NAME = Sql2012Data,
FILENAME = 'C:\Program Files\Microsoft SQL
Server\MSSQL11.SQL2012\MSSQL\DATA\Sql2012Data.mdf',
SIZE = 4MB,
MAXSIZE = 15MB,
FILEGROWTH = 20%
)
LOG ON
(
NAME = Sql2012Log,
FILENAME =' C:\Program Files\Microsoft SQL
Server\MSSQL11.SQL2012\MSSQL\DATA\Sql2012Log.ldf',
SIZE = 1MB,
MAXSIZE = 5MB,
FILEGROWTH = 1MB
)
6. Select the whole statement, and click Execute or press F5.
7. After successful execution of the statement, select the Databases node in
Object Explorer, right-click, and select Refresh to list the recently created
database(s). You should see a list something similar to Figure 3-7.
Search WWH ::




Custom Search