locked
How to create .mdf file RRS feed

  • Question

  • HI
    i need to create one File group with name secondary,by defaut i have one Primary file group
    so On right click of data base-option->File group i have added Secondary->then in File tab i am trying to add this Secondary File group but it is asking for file.

    i need to give the path of mdf file ,but how to create a mdf file ,unless i will create .mdf file how cud i give the path
    please help me.how could i create a .MDF file in any folder ex i want to create mdf file in C\filefolder

    Please help

    Thursday, September 2, 2010 6:48 AM

Answers

  • create database test
      on primary(name = 'datafile1', filename = 'c:\temp\datafile1'),
    filegroup user_fg
      (name = 'datafile2', filename = 'c:\temp\datafile2')
    log on
      (name = 'logfile1', filename = 'c:\temp\logfile1')
    go

    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Thursday, September 2, 2010 6:53 AM
  • In SSMS Object Explorer, after creating the SECONDARY filegroup on the Filegroups page, return to the General page and add a new file to the SECONDARY file group.

     


    Kalman Toth, SQL Server & Business Intelligence Training; SQL 2008 GRAND SLAM
    Thursday, September 2, 2010 8:27 AM

All replies

  • create database test
      on primary(name = 'datafile1', filename = 'c:\temp\datafile1'),
    filegroup user_fg
      (name = 'datafile2', filename = 'c:\temp\datafile2')
    log on
      (name = 'logfile1', filename = 'c:\temp\logfile1')
    go

    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Thursday, September 2, 2010 6:53 AM
  • In SSMS Object Explorer, after creating the SECONDARY filegroup on the Filegroups page, return to the General page and add a new file to the SECONDARY file group.

     


    Kalman Toth, SQL Server & Business Intelligence Training; SQL 2008 GRAND SLAM
    Thursday, September 2, 2010 8:27 AM