Steven Rojas
Steven Rojas

Reputation: 59

How to backup linked servers with SQL Server?

I want to backup/restore my data which is distributed in some linked servers, which are connected or linked in a central server. How can I do this?

I'm using SQL Server 2012 in all my nodes.

Upvotes: 3

Views: 16286

Answers (1)

Leon Armstrong
Leon Armstrong

Reputation: 1303

you can use the remote machine to run sp_executesql command within the dynamic SQL.

exec server.master.dbo.sp_executesql 'BACKUP DATABASE DBNAME1 to disk='\\Server\Share\backupfilename.bak''

Upvotes: 6

Related Questions