How to copy data of a table(selected columns) from one DB to other

  • Hi All,

    This is my first post in this forum.

    I need to copy the data of table(only selected columns) from one database server to another database server.

    Ex:-

    Server1:

    Database=DB1

    Table=Emp

    having col1,col2,.......col10

    I need the data to the server2 like this

    Server2:

    Database=DB1

    Table=Emp

    having col1,col3,col4,col5

    Can anyone help me on this.

    Regards,

    Narendranath

  • Narendranath

    You have four options:

    (1) Export to a text file or similar, then import from that file to the destination

    (2) Use OPENROWSET

    (3) Create a linked server

    (4) Use SSIS (SQL Server Integration Services)

    If this is a one-off activity, I think I'd choose 1 or 2. If you will do the same data move regularly, I'd go for 4. And if you have a frequent need to do ad hoc data moves between the two servers, you may wish to investigate 3.

    John

  • Dear Sir,

    The data will be keep on adding in server1, so i need to get the new data into server2 on monthly basis.

    I had never come across this kind of stuff, as this is the first time im handling this issue.

    I would be thankful if u can give a details explanation with a peice of code how to achieve this.

  • Narendranath

    I'm afraid this is the point where you need to go away and do your own investigations. If there's anything in particular you don't understand about any of those technologies, please post back. Alternatively, if you are not very experienced, you may consider hiring somebody to come in for a few days and set up (and document) something for you.

    John

  • Yeah fine,

    Thanks for ur suggestion.

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

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