Question

Suppose you have two linked servers called Local and Remote respectively.

Is there a syntax that compresses (and uncompresses) the data required to be sent from the Local to Remote (or vice versa).

For example, if I am updating my Local database with data from my Remote database, I would do the following:

INSERT INTO [Local Server].[Local DB Name].dbo.[Table]
SELECT *
FROM [Remote Server].[Remote DB Name].dbo.[Table]

Is there a syntax I can apply that compresses the data being sent from Remote to Local hence reduce the bandwidth costs and execution time involved?

Was it helpful?

Solution

There is not anything built into SQL Server.

An alternative is to send it to a file, zip the file, transfer it and bring it in on the other side. It is possible to automate this all from one side with things like xp_cmdshell.

OTHER TIPS

You could use the SQL Server bcp utility to copy out your data, compress it yourself and then transmit it to the remote server. Also, uploading into the database is far quicker than using insert statements.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top