Dela via


Transfer Master Stored Procedures Task

The Transfer Master Stored Procedures task transfers one or more user-defined stored procedures between master databases on instances of SQL Server. To transfer a stored procedure from the master database, the owner of the procedure must be dbo.

The Transfer Master Stored Procedures task can be configured to transfer all stored procedures or only specified stored procedures. This task does not copy system stored procedures.

The master stored procedures to be transferred may already exist on the destination. The Transfer Master Stored Procedures task can be configured to handle existing stored procedures in the following ways:

  • Overwrite existing stored procedures.

  • Fail the task when duplicate stored procedures exist.

  • Skip duplicate stored procedures.

At run time, the Transfer Master Stored Procedures task connects to the source and destination servers by using two SMO connection managers. The SMO connection managers are configured separately from the Transfer Master Stored Procedures task, and then referenced in the Transfer Master Stored Procedures task. The SMO connection managers specify the server and the authentication mode to use when accessing the server. For more information, see SMO Connection Manager.

Transferring Stored Procedures Between Instances of SQL Server

The Transfer Master Stored Procedures task supports a source and destination that is SQL Server 2000 or SQL Server. There are no restrictions on which version to use as a source or destination.

Events

The task raises an information event that reports the number of stored procedures transferred and a warning event when a stored procedure is overwritten.

The Transfer Master Stored Procedures task does not report incremental progress of the login transfer; it reports only 0% and 100 % completion.

Execution Value

The execution value, defined in the ExecutionValue property of the task, returns the number of stored procedures transferred. By assigning a user-defined variable to the ExecValueVariable property of the Transfer Master Stored Procedures task, information about the stored procedure transfer can be made available to other objects in the package. For more information, see Integration Services Variables and Using Variables in Packages.

Log Entries

The Transfer Master Stored Procedures task includes the following custom log entries:

  • TransferStoredProceduresTaskStartTransferringObjects  This log entry reports that the transfer has started. The log entry includes the start time.

  • TransferSStoredProceduresTaskFinishedTransferringObjects  This log entry reports that the transfer has finished. The log entry includes the end time.

In addition, a log entry for the OnInformation event reports the number of stored procedures that were transferred, and a log entry for the OnWarning event is written for each stored procedure on the destination that is overwritten.

Security and Permissions

The user must have permission to view the list of stored procedure in the master database on the source, and must be a member of the sysadmin server role or have permission to created stored procedures in the master database on the destination server.

Configuring the Transfer Master Stored Procedures Task

You can set properties through SSIS Designer or programmatically.

For more information about the properties that you can set in SSIS Designer, click one of the following topics:

For more information about how to set these properties in SSIS Designer, click the following topic:

Configuring the Transfer Master Stored Procedures Task Programmatically

For more information about programmatically setting these properties, click the following topic:

Integration Services icon (small) Stay Up to Date with Integration Services

For the latest downloads, articles, samples, and videos from Microsoft, as well as selected solutions from the community, visit the Integration Services page on MSDN or TechNet:

For automatic notification of these updates, subscribe to the RSS feeds available on the page.