With SQL Server 2000, you can create databases using one of these three
The Create Database Wizard
The SQL Server Enterprise Manager console
Transact SQL (T-SQL)
the Create Database Wizard
If you are new to SQL Server, the best way to create a new database is to use
the Create Database Wizard. Once you are comfortable with using SQL Server
Enterprise Manager and/or T-SQL, you can move beyond this wizard to more
advanced ways of creating databases.
To use the Create Database Wizard:
Open the SQL Server Enterprise Manager from the Start
Click on the SQL Server instance where you want to
create your new database and expand it (using the plus sign to the left).
From the Tools menu, choose Wizards.
Expand Database and highlight Create Database Wizard (Figure
A) and click OK.
When the "Welcome to the Create Database
Wizard" screen appears, click Next, type a database name, and browse to
the location where you want to place your database file and transaction logs
Click Next and enter the initial size of your primary
database (.mdf) file (Figure C). You can add secondary files as
well; they will be given an .ndf extension.
Click Next and define how you want your database growth
to occur (Figure D).
Click Next and enter the initial size of your
Click Next and define your transaction log database
Click Next, review your database settings, and click
Manually create a
database in Enterprise Manager
To manually create a database using SQL Server Enterprise Manager:
Open Enterprise Manager and select and expand your SQL
Right-click on Databases and choose New Database.
In the General tab, type a database name (Figure E).
In the Data Files tab, you can configure the auto
growth size, database log location, and the secondary log location (Figure
In the Transaction Log tab, you can configure the auto
growth size, database log location, and secondary location.
Click OK, and your database is created.
Creating a database
In addition to the two methods mentioned above, you can use T-SQL to create a
database. The syntax is as follows:
Let's say, for example, that we wanted to create a database that contains a
primary data file called DDAT and one transaction log called DDAT_LOG. We would
create this database using the T-SQL syntax shown in Figure G.
Now, we will take it one step further and add a primary file, two secondary
files, and two transaction logs (Figure H),
In this article, we have shown you how to configure databases in SQL
Server using Enterprise Manager and T-SQL. This is a good beginning to working
with SQL Server 2000 databases and you can build your skill set from here.