Publication.ReplicateUserDefinedScript 메서드

Replicates the execution of a user-defined script to the Subscribers of a specified publication.

네임스페이스:  Microsoft.SqlServer.Replication
어셈블리:  Microsoft.SqlServer.Rmo(Microsoft.SqlServer.Rmo.dll)

구문

‘선언
Public Sub ReplicateUserDefinedScript ( _
    scriptFilePath As String _
)
‘사용 방법
Dim instance As Publication 
Dim scriptFilePath As String

instance.ReplicateUserDefinedScript(scriptFilePath)
public void ReplicateUserDefinedScript(
    string scriptFilePath
)
public:
void ReplicateUserDefinedScript(
    String^ scriptFilePath
)
member ReplicateUserDefinedScript : 
        scriptFilePath:string -> unit
public function ReplicateUserDefinedScript(
    scriptFilePath : String
)

매개 변수

  • scriptFilePath
    유형: System.String
    A String value that specifies the file name and full path to the Transact-SQL script file.

예외

예외 조건
ApplicationException

The server is not running SQL Server 2000 or later.

ArgumentException

The passed String value is nullnull 참조(Visual Basic에서는 Nothing), empty, or too long, or the path is not a valid path.

주의

The ReplicateUserDefinedScript method is only supported for transactional and merge publications.

The script is copied to the Distributor when ReplicateUserDefinedScript is first invoked. The Distribution Agent or the Merge Agent then applies the copy at the Distributor to the Subscriber. Any modifications to the script after ReplicateUserDefinedScript will not be replicated. You will need to call this method again.

Using the ReplicateUserDefinedScript method to post a script file for publications using File Transfer Protocol (FTP) for snapshot delivery is only supported for SQL Server Subscribers.

The ReplicateUserDefinedScript method can only be called by members of the sysadmin fixed server role at the Publisher or by members of the db_owner fixed database role on the publication database.

Calling ReplicateUserDefinedScript is equivalent to executing the sp_addscriptexec(Transact-SQL) stored procedure.

참고 항목

참조

Publication 클래스

Microsoft.SqlServer.Replication 네임스페이스