How to move tables from one database to other

  • Hi,

    We need to revise a huge database and to pull out some tables that will fail SOX and

    put into new DBs. Once these tables are removed, reports will need to be

    revised to reflect the new organization.

    could any one tell me how to do this?

    Thanks

  • Steps:-

    1. Script out tables and constraints,indexes,triggers etc. definition at the source server(using right click generate script wizard).

    2. Execute only the table creation statement(only create table statements not constraints, triggers etc.) at the destination server.

    3. Transfer data between source and destination tables using import/export wizard.

    4. Execute the Alter table add constraints, create trigger, create index statments(that u excluded in step 2) on destination database.

    5. Drop the tables on source after verification.

    You can also try Transfer Objects task in dts package if this is SQL 2000.

    Manu

  • Please use the Import export wiz. or else you can use the DTS/SSIS package to move the table from 1 DB to other DB in the same or else other server.

    You can create a script of the table with insert statment as well and run it to other DB.

    Manoj

    MCP, MCTS (GDBA/EDA)

  • u can use back up restore.. then drop the objects that u dont need..

    or do as the others said and for data transfairing u can use:

    BCP or normal insert or bulk insert.

    ..>>..

    MobashA

  • I am not agree with mobasha, For moving couple of table you do not have restore whole DB.

    If you are using Litespeed. there is a good facility to move or restore the Object from the last backup.

    Otherwise I would recommend you to go with Export/Import or DTS/SSIS

    Manoj

    MCP, MCTS (GDBA/EDA)

Viewing 5 posts - 1 through 4 (of 4 total)

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