Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Application.RemoveFromSqlServer Method

Removes a package from the specified instance of SQL Server.

Namespace:  Microsoft.SqlServer.Dts.Runtime
Assembly:  Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)

'Declaration
Public Sub RemoveFromSqlServer ( _
	packagePath As String, _
	serverName As String, _
	serverUserName As String, _
	serverPassword As String _
)
'Usage
Dim instance As Application
Dim packagePath As String
Dim serverName As String
Dim serverUserName As String
Dim serverPassword As String

instance.RemoveFromSqlServer(packagePath, _
	serverName, serverUserName, serverPassword)

Parameters

packagePath
Type: System.String
The name of the package to remove.
serverName
Type: System.String
The name of the instance of SQL Server.
serverUserName
Type: System.String
The SQL Server login name if you use SQL Server Authentication to log into the server; otherwise, Nothing if you use Windows Authentication.
serverPassword
Type: System.String
The SQL Server login password if you use SQL Server Authentication to log into the server; otherwise, Nothing if you use Windows Authentication.

The following code example removes a package named myNewName that was saved previously.

Shared  Sub Main(ByVal args() As String)
    Dim app As Application =  New Application() 
    ' The package was previously saved using this method call.
    'app.SaveToSqlServerAs(p1, null, "myNewName", "yourserver", null, null);
 
    ' Remove the previously saved package.
    app.RemoveFromSqlServer("myNewName", "yourserver", Nothing, Nothing)
End Sub

Community Additions

ADD
Show:
© 2015 Microsoft