Add Existing Data File To Existing Database? 
Author Message
 Add Existing Data File To Existing Database?

All,

In SQL Server 2000, I've inhereted an interesting situation from my
predecessor.  There's an existing database that contains SALES
information.  I have another, completely independent database for
CUSTOMERS.  I would like to merge them into a single database and then
do some normalization.  Since they're already in separate data files,
and I planned to use multiple data files across a RAID anyway, I
figured I could use ALTER DATABASE to add the existing CUSTOMERS data
file (CUSTOMER_DATA.MDF) to the SALES database.

Alas, I can't seem to find a way to do this.  The ALTER TABLE command
allows me to add a *new* data file, but not attach, append or merge an
existing one.

Does anyone have any suggestions?  Does anyone have any experience doing this?

TIA,

:Pete



Wed, 19 Jan 2005 06:40:38 GMT
 Add Existing Data File To Existing Database?

You can't add the data files from one database to another.
You would need to move the objects, data with DTS or object
scripts and t-sql commands.

-Sue



Quote:
>All,

>In SQL Server 2000, I've inhereted an interesting situation from my
>predecessor.  There's an existing database that contains SALES
>information.  I have another, completely independent database for
>CUSTOMERS.  I would like to merge them into a single database and then
>do some normalization.  Since they're already in separate data files,
>and I planned to use multiple data files across a RAID anyway, I
>figured I could use ALTER DATABASE to add the existing CUSTOMERS data
>file (CUSTOMER_DATA.MDF) to the SALES database.

>Alas, I can't seem to find a way to do this.  The ALTER TABLE command
>allows me to add a *new* data file, but not attach, append or merge an
>existing one.

>Does anyone have any suggestions?  Does anyone have any experience doing this?

>TIA,

>:Pete



Wed, 19 Jan 2005 07:33:36 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Add Existing Data File To Existing Database?

2. How to modified existing field and add new field in existing table for Access database

3. File.Exists returns false even file exists

4. need to copy existing Access data into existing SQL tables, maintaining identity values

5. need to copy existing Access data into existing SQL tables, maintaining identity values

6. How to append fields to existing tables, without damageing the existing data

7. Script to copy data from one existing column to a new column in another existing table

8. Exporting data to excel file /overwrite existing data.

9. Adding an existing file

10. Adding existing .mdf file to Sql Server desktop

11. Q : adding fields to existing paradox files

12. Add filed to existing Access table


 
Powered by phpBB® Forum Software