Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2005
    Posts
    3

    Unanswered: Spread database on more than one file

    Hi everybody,

    I need to copy a database from one server (A) to another server (B). The database in Server A has only one datafile (which is about 42 Gb ...). I'd like to copy the database to Server B but I don't want only a datafile. I'd like to spread
    on at least 2 datafiles. Exemple:

    Server A Server B

    C:\SQL\DATA\DB_DATA.MDF F:\SQL\DATA\DB_DATA_1.MDF
    G:\SQL\DATA\DB_DATA_2.NDF

    Thanks,

    Alex.

  2. #2
    Join Date
    May 2002
    Posts
    299
    you can't just split the db file in midstream. you need to attach the db to server and then perform ndf file addition.
    --
    -oj
    http://www.rac4sql.net

  3. #3
    Join Date
    Oct 2005
    Posts
    3
    OK, but what I need is to copy the DB from Server A to Server B keeping DB in Server A with one file.

    The DB in Server B is new and has 2 files in 2 different disks. I made a backup from DB in Server A and I'm trying to restore it into DB Server B but I can't. The message says I don't have enough space (I think it tries to restore in one one file, the total amount of both files is bigger than DB size).

    I've also tried to Import Data but it complaints about the user (something like: "I can't find user Administrator ...", I'm still investigating what's happening here).

    Thanks,

    Alex.

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Don't objects belong to the different files?

    I would imagine that you'd have to Restore the database as is, then create the new file, then perform a bunch of Alters.....to reference the new file
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Oct 2005
    Posts
    3
    OK; but unfortunately I don't have enough space on Server B to hold a 40 Gb files. That's the reason I would like to split the file into pieces.

    Thanks,

    Alex.

  6. #6
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    OK,

    Dump Server A

    ALTER Serve A into the files

    Dump the split

    The do a sp_Attach on server b

    RESTORE Server A
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

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