locked
Filegroups RRS feed

  • Question

  • in sql server 2005:
    Read-only, Write-only, Default, Primary are filegroups?
    what is the difference between it ?

    tarcisiocorte
    Thursday, January 28, 2010 1:40 PM

Answers

  • Primary
    The primary filegroup contains the primary data file and any other files not specifically assigned to another filegroup.

    CREATE DATABASE test
    ON PRIMARY
      ( NAME='test_Primary',
        FILENAME=
           'c:\test_data.mdf',
        SIZE=4MB,
        MAXSIZE=10MB,
        FILEGROWTH=1MB),


    Default:
    You can assign any of the primary / secondary filegroup as your default filegroup meaning that objects like table / index when created goes to the default filegroup of a database.


    ALTER DATABASE test
      MODIFY FILEGROUP test_FG1 DEFAULT;
    GO

    ReadOnly:

    Any existing filegroup, except the primary filegroup, can be marked as read-only

    Readwrite:

    NO such options of WRITE ONLY, by default if write is allowed then read will also be . Either read-write or read-only is possible.


    Thanks, Leks
    Thursday, January 28, 2010 5:04 PM
  • File group is only "Primary". Other terms related to other things in SQL Server.

    You can read more about filegroups here: http://msdn.microsoft.com/en-us/library/ms179316.aspx

    Regards
    Thursday, January 28, 2010 4:43 PM

All replies

  • File group is only "Primary". Other terms related to other things in SQL Server.

    You can read more about filegroups here: http://msdn.microsoft.com/en-us/library/ms179316.aspx

    Regards
    Thursday, January 28, 2010 4:43 PM
  • Primary
    The primary filegroup contains the primary data file and any other files not specifically assigned to another filegroup.

    CREATE DATABASE test
    ON PRIMARY
      ( NAME='test_Primary',
        FILENAME=
           'c:\test_data.mdf',
        SIZE=4MB,
        MAXSIZE=10MB,
        FILEGROWTH=1MB),


    Default:
    You can assign any of the primary / secondary filegroup as your default filegroup meaning that objects like table / index when created goes to the default filegroup of a database.


    ALTER DATABASE test
      MODIFY FILEGROUP test_FG1 DEFAULT;
    GO

    ReadOnly:

    Any existing filegroup, except the primary filegroup, can be marked as read-only

    Readwrite:

    NO such options of WRITE ONLY, by default if write is allowed then read will also be . Either read-write or read-only is possible.


    Thanks, Leks
    Thursday, January 28, 2010 5:04 PM