-
Click your mouse on the Start button. Windows will display the Start menu.
-
Move your mouse pointer to Programs on the Start menu, select the Microsoft SQL Server 7.0 option, and click your mouse on Enterprise Manager. Windows will start the Enterprise Manager in the SQL Server Enterprise Manager application window.
-
Click your mouse on the plus (+) to the left of SQL Server Group to display the list of MS-SQL Servers available on your network.
-
Click your mouse on the plus (+) to the left of the SQL Server on which you wish to create a database. Enterprise Manager, in turn, will display a Database Properties dialog box similar to that shown in Figure 42.2
-
Click your mouse on the Databases folder to display the list of databases currently on the server, similar to that shown in Figure 42.1.
Figure 42.1: The SQL Server Enterprise Manager application window
-
Select the Action menu New Database option. Enterprise Manager displays a Database Properties dialog box similar to that shown in Figure 42.2.
Figure 42.2: The Enterprise Manager Database Properties dialog box
-
Enter the name of the database in the Name field. For the current project, enter MARKETING. The Enterprise Manager will automatically fill in the pathname and initial database size in the Database Files section of the Database Properties dialog box.
-
Click on the Initial size (MB) field and enter the initial size of the database file. For the current project, enter 10.
-
Set the database File Growth and Maximum File Size options. For the current project, accept the defaults, which allow the database file to grow by 10 percent each time it fills up and place no restriction on its maximum size.
-
Click on the Transaction Log tab.
-
If you want to change the pathname (the file name and physical location) of the transaction log file, click on the Search button in the Location field to work with the Locate Transaction Log File dialog box. For the current project, accept the default pathname for the transaction log.
-
Click on the Initial size (MB) field, and enter the initial size of the transaction log. For the current project, enter 3.
-
Set the database File Growth and Maximum File Size options. For the current project, accept the defaults, which allow the transaction log to grow by 10 percent each time it fills up and place no restriction on its maximum size.
-
Click on the OK button.
After you complete Step 14, the Enterprise Manager will create the database (MARKETING, in the current example) according to the options you selected and return to the SQL Server Enterprise Manager application window.
The important thing to know now is that MS-SQL Server gives you two ways to create a database. You can use the CREATE DATABASE statement or use the Enterprise Manager's Action menu New Database option. Whether you use CREATE DATABASE or the Enterprise Manager, you can set database and transaction log options that specify:
-
The physical locations (pathnames) of the database and transaction log file(s)
-
The initial size of the database and transaction log
-
The increment by which the database and transaction log will grow
-
The maximum size to which the database and transaction log file(s) can grow
If you are using CREATE DATABASE, you specify the database and transaction log properties in separate clauses within the statement. When you use the Enterprise Manager to create a database, you can still specify different properties for the database and transaction log file(s) by using the Database Properties dialog box General tab to specify database options and using the Transaction Log tab to select transaction log options.
No comments:
Post a Comment