Previous Topic: Define a Database Filegroup in SQL Server 2005Next Topic: Define Options for a SQL Server 2005 Database


Define a Database Log File in SQL Server 2005

Use the SQL Server Database Physical File Editor to define the log files for a database in a SQL Server 2005 physical model.

To define a database log file in SQL Server 2005

  1. Click Target - SQL Server, Databases on the Model menu.

    The SQL Server Database Editor opens.

  2. Select the database in the Navigation Grid for which you want to define log files and click the Files tab.

    Note: Use the Enter filter text box to filter a very large list of databases to quickly locate the one that you want to define.

  3. Click the File Editor SQL physical file editor icon in database editor icon in the Database Logfiles section.

    The SQL Server Database Physical File Editor opens.

  4. Select the physical file in the Navigation Grid that you want to define and work with the following options:

    Note: Click New New icon in property editors to create a new object on the toolbar to create a new physical file. Use the Enter filter text box to filter a very large list of physical files to quickly locate the one that you want to define.

    Name

    Displays the physical file name. You can change the physical file name in this field.

    Type

    Specifies the physical file type. The default selection is Log.

    State

    Specifies the online state of the physical file. Select the state using the drop-down control.

  5. Click the General tab and work with the following options:
    File Name

    Displays the location of the physical file.

    File Size

    Specifies the initial size of the physical file. Enter a numerical value using a whole number (no decimals). You can use the suffixes KB (kilobyte), MB (megabyte), GB (gigabyte), and TB (terabyte).

    Default: MB

    Max Size

    Specifies how large the physical file can grow. Enter a numerical value using a whole number (no decimals). You can use the suffixes KB (kilobyte), MB (megabyte), GB (gigabyte), and TB (terabyte).

    Default: MB

    File Growth By

    Specifies how to grow the physical file. Make a selection from the drop-down list.

    Note: The selection you make in this field determines how you enter a value in the File Growth field.

    File Growth

    Specifies the amount of space to add to the physical file each time it needs to grow.

    Default: MB

    Limits: Use a numerical value with one of the following suffixes: KB (kilobyte), MB (megabyte), GB (gigabyte), or TB (terabyte) if you selected Value for the File Growth By option. Use a numerical value without a suffix if you selected Percent for the File Growth By option. A value of zero indicates that there is no automatic growth.

    Read Only

    Determines the read/write status of the physical file. Make a selection from the drop-down list.

    Media Read Only

    Specifies whether the physical file is on read-only media when you select the check box.

    Sparse

    Specifies whether the physical file is a sparse file when you select the check box.

  6. (Optional) Click the Comment tab and enter any comments that you want to associate with the physical file.
  7. (Optional) Click the UDP tab to work with user-defined properties for the physical file.
  8. (Optional) Click the Notes tab to view history information and view or edit user notes.
  9. Click Close.

    Database log files are defined and the SQL Server Database Physical File Editor closes.