Tuesday, February 14, 2012

DB Files

I have my Production database running in SQL Server2000. Some of the data is processed in Non-Production environment which has the same name as that of the Production database. The Non-Production environment has some additional tables with large volume of data . I want move these additional tables only to my production environment without overwriting the existing ones in production environment.

Is there any way to move my dbFiles and attach there without overwriting the existing ones in production environment.

No. You cannot use database files from one database in another. SQL Server doesn't provide such feature currently (see transportable table spaces feature in Oracle for example). You can however use several mechanisms to do this:

1. BCP to transfer data and scripts to create the schema

2. Use DTS or SSIS package to move schema/data

3. Replication is also possible depending on your requirements

4. 3rd party tools that can migrate schema/data

If it is a one-time deal then you should look at using DTS/SSIS Export/Import Wizard.

No comments:

Post a Comment