SQL Server Agent Job Set Up

前端 未结 2 1932
自闭症患者
自闭症患者 2021-01-17 04:46

I\'m a newbie to SQL and .Net and this question might be stupid too to ask but I still need help.

I\'ve a Database located on Server1. Now I got another Server, lets

2条回答
  •  醉梦人生
    2021-01-17 05:38

    If you create a linked server on Server2 that points to Server1, yes you can create jobs on Server2 that execute code on Server1 using server1.database.dbo.object syntax.

    You can learn about creating linked servers here:

    http://technet.microsoft.com/en-us/library/ff772782.aspx

    (You'll have to change the version to your version, since you didn't tell us what version you're using. You'll also want to make sure the linked server is collation compatible and supports data access/RPC.)

    Of course you will have to deal with security and also how to deal with connectivity failures, and general dependencies between the two servers.

    You can add error handling with sp_testlinkedserver.

提交回复
热议问题