I need help to insert data from one IP to another IP of SQL Server.
I've tried using sqlcmd
but it doesn't work as mysql syntax works on bash which can insert data using csv or txt file after manipulation of data with awk.
In this case there are 2 tables and 2 IP:
I hope someone can help me with this case.
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.