Add new datafile(ndf),point to different partion in MS SQL Server 2005

  • Dear Expert,

    We have replaced our MS SQL Server 2000 with MS SQL Server 2005 last week.

    Before this if I want to add datafile(ndf) or log file and point it to the different partition, I can do it through SQL Enterprise Manager.

    Can somebody guide me how to add datafile(ndf), point to different partion in MS SQL Server 2005?

    What tool can be use?

    Regards,

    Shamsul

    shamsul@mmc.com.my

  • Start SQL Server Management Studio, register your database server, connect to it, select the database and right-click, select properties, then files. Click add to add a new file and you can select the location there.

  • Try to use TSQL for this instead of the SSMS.

    ALTER DATABASE DBNAME

    ADD FILE

    (

    NAME = NEWFILE,

    FILENAME = 'D:\NEWFILE.ndf',

    SIZE = 50000MB,

    MAXSIZE = 100MB,

    FILEGROWTH = 5MB

    ) TO FILEGROUP SECONDARY;

    GO

    >> I want to add datafile(ndf) or log file

    I don't see any point in using multiple log files. The main reason to use multiple files for data files is to exploit the round robin fill, to make sure data is written to all files and spread the IO. Log files are written sequentially and there is no p oint in having multiple log files except to help (and take over) in casse the first file is filled up completely and to avoid running out of space errors.

    [font="Courier New"]Sankar Reddy | http://SankarReddy.com/[/url][/font]

  • Note that SQL Server will not automatically move data to this file unless it is in the same filegroup.. The default filegroup will still likely be your mdf.

    SQL will not move any existing data to this either. You would need to do that manually.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply