Results 1 to 2 of 2

Thread: .ndf

  1. #1
    Join Date
    May 2003
    Posts
    1

    Unanswered: .ndf

    Is there a way to attach an .ndf file from database A to database B and move whatever tables and indexes in the data file to database B?

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    You can do it using SP_ATTACH_DB, for instance :
    [/B]
    EXEC sp_attach_db @dbname = N'MyDB',
    @filename1 = N'F:\mssql7\data\My_Data.mdf',
    @filename2 = N'F:\mssql7\data\My_Data.Ndf',
    @filename3 = N'F:\mssql7\data\My_log.ldf'
    [/B]
    Refer to books online for more information on the SP.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •