Condividi tramite


Application.RemoveFromSqlServer Method

Removes a package from the specified instance of SQL Server.

Spazio dei nomi: Microsoft.SqlServer.Dts.Runtime
Assembly : Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

Sintassi

'Dichiarazione
Public Sub RemoveFromSqlServer ( _
    packagePath As String, _
    serverName As String, _
    serverUserName As String, _
    serverPassword As String _
)
public void RemoveFromSqlServer (
    string packagePath,
    string serverName,
    string serverUserName,
    string serverPassword
)
public:
void RemoveFromSqlServer (
    String^ packagePath, 
    String^ serverName, 
    String^ serverUserName, 
    String^ serverPassword
)
public void RemoveFromSqlServer (
    String packagePath, 
    String serverName, 
    String serverUserName, 
    String serverPassword
)
public function RemoveFromSqlServer (
    packagePath : String, 
    serverName : String, 
    serverUserName : String, 
    serverPassword : String
)

Parametri

  • packagePath
    The name of the package to remove.
  • serverName
    The name of the instance of SQL Server.
  • serverUserName
    The user name to use when authenticating against the server.
  • serverPassword
    The password associated with the ServerUserName account.

Esempio

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

static void Main(string[] args)
{
    Application app = 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", null, null);
}
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

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Piattaforme

Piattaforme di sviluppo

Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.

Piattaforme di destinazione

Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.

Vedere anche

Riferimento

Application Class
Application Members
Microsoft.SqlServer.Dts.Runtime Namespace