Attaching a database with more than 16 files in SQL Server 7.0

  • I have a database I need to attach that has the following files:

    'c:\mssql7\data\Focus_Primary.mdf',

    'e:\ruelp\D_FocusData\FOCUSCM.ndf',

    'e:\ruelp\D_FocusData\FOCUSCMIX.ndf',

    'e:\ruelp\D_FocusData\FOCUSLP.ndf',

    'e:\ruelp\D_FocusData\FOCUSLPIX.ndf',

    'e:\ruelp\D_FocusData\FOCUSLP2.ndf',

    'e:\ruelp\D_FocusData\FOCUSLP2IX.ndf',

    'e:\ruelp\D_FocusData\FOCUSCC.ndf',

    'e:\ruelp\D_FocusData\FOCUSCCIX.ndf',

    'e:\ruelp\D_FocusData\FOCUSPC.ndf',

    'e:\ruelp\D_FocusData\FOCUSPCIX.ndf',

    'e:\ruelp\D_FocusData\FOCUSPC2.ndf',

    'e:\ruelp\D_FocusData\FOCUSPC2IX.ndf',

    'e:\ruelp\D_FocusData\FOCUSPT.ndf',

    'e:\ruelp\D_FocusData\FOCUSPTIX.ndf',

    'e:\ruelp\D_FocusData\FOCUSPTS.ndf',

    'e:\ruelp\D_FocusData\FOCUSPTSIX.ndf',

    'e:\ruelp\D_FocusData\FocusRptData01.ndf',

    'e:\ruelp\D_FocusData\FOCUSSF.ndf',

    'e:\ruelp\D_FocusData\FOCUSSFIX.ndf',

    'e:\ruelp\D_FocusData\FOCUSTND.ndf',

    'e:\ruelp\D_FocusData\FOCUSTNDIX.ndf',

    'e:\ruelp\D_FocusData\FOCUSWHRS.ndf',

    'e:\ruelp\D_FocusData\FOCUSWHRSIX.ndf',

    'e:\ruelp\D_FocusData\FOCUSWHRS2.ndf',

    'e:\ruelp\D_FocusData\FOCUSWHRS2IX.ndf',

    'e:\ruelp\D_FocusData\FOCUSWRK.ndf',

    'c:\mssql7\data\FOCUSLOG1.ldf',

    'c:\mssql7\data\FOCUSLOG2.ldf',

    'c:\mssql7\data\FOCUSLOG3.ldf',

    'c:\mssql7\data\FOCUSLOG4.ldf'

    How can I use the create database with attach command with all these files. I keep getting syntax errors.

    Thank you.

    Best Regards,

    ~David

  • This is how I got it to work:

    use master

    go

    create database focus

    on

    (filename='c:\mssql7\data\Focus_Primary.mdf'),

    (filename='e:\ruelp\D_FocusData\FOCUSCM.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSCMIX.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSLP.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSLPIX.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSLP2.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSLP2IX.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSCC.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSCCIX.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSPC.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSPCIX.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSPC2.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSPC2IX.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSPT.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSPTIX.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSPTS.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSPTSIX.ndf'),

    (filename='e:\ruelp\D_FocusData\FocusRptData01.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSSF.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSSFIX.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSTND.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSTNDIX.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSWHRS.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSWHRSIX.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSWHRS2.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSWHRS2IX.ndf'),

    (filename='e:\ruelp\D_FocusData\FOCUSWRK.ndf'),

    (filename='c:\mssql7\data\FOCUSLOG1.ldf'),

    (filename='c:\mssql7\data\FOCUSLOG2.ldf'),

    (filename='c:\mssql7\data\FOCUSLOG3.ldf'),

    (filename='c:\mssql7\data\FOCUSLOG4.ldf')

    for attach;

    go

    Best Regards,

    ~David

Viewing 2 posts - 1 through 1 (of 1 total)

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