Transferring datas from one database to other

  • Hi,

    Can Any body help me by providing ideas in the following:

    I want to transfer the datas in the table from one database to other newly updated database which contains same tables with no datas and some new tables also added in the updated database.

    I need to transfer the data from the old database to new one .

    Expecting your valuable support and kind co-operation

    Thanks

    rajesh

  • raja_saminathan (4/2/2008)


    Hi,

    Can Any body help me by providing ideas in the following:

    I want to transfer the datas in the table from one database to other newly updated database which contains same tables with no datas and some new tables also added in the updated database.

    I need to transfer the data from the old database to new one .

    Expecting your valuable support and kind co-operation

    Thanks

    rajesh

    There are many ways of doing this. You could use DTS (or SSIS), bulk export (bcp), or third party tools that have a nice UI and give you plenty of options. Which one you should choose depends on the amount of data you want to migrate, on how familiar you are with either DTS, SSIS, bcp, ...

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • I believe this is for SQL Server 7.0/2000 as it is under this forum. You can use DTS Import/Export Wizard or build a DTS package to transfer the data. Alternatively, you can use simple INSERT INTO queries while referring to the target table as DatabaseName.OwnerName.Table. IF its on another server you can create a Linked Server to the target server and then use Insert queries while referring to the target table as ServerName.DatabaseName.OwnerName.TableName.

  • Hi Girish,

    Thanks for your Kind Information.

    Well i tried to use the simple Insert into Query ,but i didn't get the things .

    For Eg:

    I have two tables with same name d1 and same no.of columns in two different databases.

    DataBase S1 has values and i want to transfer datas from d1 table in s1 database to d1 table in s2 database.

    I tried like this

    Insert into s2.d1

    values (s1.d1)

    i think ,I didn't get your idea properly,Kindly help me

    Thanks

    Rajesh

  • raja_saminathan (4/3/2008)


    Hi Girish,

    Thanks for your Kind Information.

    Well i tried to use the simple Insert into Query ,but i didn't get the things .

    For Eg:

    I have two tables with same name d1 and same no.of columns in two different databases.

    DataBase S1 has values and i want to transfer datas from d1 table in s1 database to d1 table in s2 database.

    I tried like this

    Insert into s2.d1

    values (s1.d1)

    i think ,I didn't get your idea properly,Kindly help me

    Thanks

    Rajesh

    use

    insert into s2.dbo.d1 select * from s1.dbo.d1

    assuming the databases are on the same instance, the source database is s1, the target is s2, and the tables are owned by dbo .

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • Hi Raja,

    u could use

    insert into s1.d1

    select * from s2.d2

  • use this query to insert tablestrecture and data in another database

    select * into newtablename from old-databasename.dbo.existingtable-name

    example

    old database is====employee and table name is -- employeedetails

    new database is===emp and table name is -- empdetails

    in query analyzer

    use emp

    select * into empdetails from employee.dbo.employeedetails

  • Thanks Krishna,

    Your Idea Worked fine.

    I have transferred the values from one to other database

    Best Regards,

    Rajesh

Viewing 8 posts - 1 through 7 (of 7 total)

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