Attaching a Database

  • Hi,

    As there is a limit of 16 files while attaching a database, can anyone please tell me how can we attach a database which has more than 16 files.

     

    Regards,

    Atiq Rahman

  • Hi Atiq,

    There is only a 16-file limit using sp_attach_db. You can still use the CREATE DATABASE FOR ATTACH syntax.

     

    -ldb

  • If you look at the sp_attach_db procedure it actually uses the CREATE DATABASE FOR ATTACH syntax, you can just extend that as you need. You could even create yourself a new proc sp_attach_mutli_file_db and just extend the number of files possible to pass into the proc.



    Shamless self promotion - read my blog http://sirsql.net

  • Hi Nicholas and bbdpres,

    Thankyou for the info.  Thats interesting. 

    I never taught of looking into the sp procedures. 

     

    Best regards,

    Atiq

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

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