Insert Data from One Server to Another

Insert Data From One Server To Another?

Yes you would use the server-name before the whole rest of object-name like:

myserver.mydatabase.dbo.mytable

However you first have to set up linked servers. Look up linked servers in BOL.

How to Insert Data Field Table SQL Server from another SQL Server in different ip?

If you have a windows computer with Sql Server Management Studio (SSMS) installed, you can use the Import Wizard (right click on the table -> tasks -> import data) to create an SSIS package that will copy the data from one server to another and save the package.

Import and Export Data with the SQL Server Import and Export Wizard

If you want to edit the package, you will need SQL Server Data Tools. You might not need to edit it.

Then you can create a SQL Agent Job to run the SSIS Package from the file system
SQL Server Agent Jobs for Packages

Then you could call sp_start_job from your bash script to run the SQL Agent Job.
sp_start_job (Transact-SQL)

Of course all of this depends on having the correct permissions, and there are many things that can complicate these steps, but this is the general outline.



Related Topics



Leave a reply



Submit