Managing Databases

Databases reside on database devices. A database can reside on one or more database devices, and each database device can hold a portion of one or more databases. Each database has an associated transaction log, a storage area reserved by SQL Server to keep track of transactions made to the database.

The transaction logs for SQL Server are write ahead, which means that the commands sent to SQL Server are recorded in the log before any of the data in the database is changed. The transaction log is actually another system table, syslogs, but you should not directly query or modify it. The transaction log competes with data for space on a database device; to improve performance, put the transaction log on a separate database device from the database.

Important Devices must be created before their databases are created. Once you have created database devices, you can store databases and their transaction logs on them.

Using SQL Enterprise Manager, you can easily manage databases across the servers of your enterprise. Providing an intuitive and simple-to-use graphical interface, SQL Enterprise Manager allows you to add, list, monitor, modify, expand, and drop databases, and perform management actions for the associated transaction logs. SQL Enterprise Manager can show you charts depicting database size and available space.

Databases can also be managed using Transact-SQL statements and system procedures. For information, see the Microsoft SQL Server Transact-SQL Reference.

For more information about managing databases and transaction logs, choose one of the following topics:

Before Creating Databases

Accessing the Database Management Windows

Creating Databases

Expanding or Shrinking Databases

Expanding or Moving Transaction Logs

Setting Database Options

Displaying Information About Databases

Dropping Databases

Using Databases on Removable Media

For information on improving database performance using options such as striping, RAID, or segments, and for information on protecting data using mirroringūincluding use of the disk mirroring available with Windows NT Serverūsee Chapter 7, Managing Drives.

For information on dumping and restoring databases and transaction logs, see Chapter 12, Backing Up and Restoring. For information about managing database objects (tables, views, indexes, stored procedures, triggers, defaults, rules, and user-defined datatypes), and for information on improving and optimizing database performance, see the Microsoft SQL Server Database Developer's Companion.