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

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?  Am I on the right track with this?

TIA,

:Pete



Tue, 18 Jan 2005 23:17:05 GMT
 Add Existing Data File To Existing Database?

You can't just add a file from another DB to the current one.  How would all
the system tables get updated so the Db knows about all of this?    Your
best bet is to use DTS to transfer the objects and data to the new DB.

--
Andrew J. Kelly,  SQL Server MVP
TargitInteractive


Quote:
> 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?  Am I on the right track with this?

> TIA,

> :Pete



Tue, 18 Jan 2005 23:45:55 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. Script to copy data from one existing column to a new column in another existing table

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

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

8. Adding existing .mdf file to Sql Server desktop

9. Adding an existing file

10. Add filed to existing Access table

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

12. Q : adding fields to existing paradox files


 
Powered by phpBB® Forum Software