Compartilhar via


Application.RemoveFromSqlServer(String, String, String, String) Método

Definição

Remove um pacote da instância especificada do SQL Server.

public:
 void RemoveFromSqlServer(System::String ^ packagePath, System::String ^ serverName, System::String ^ serverUserName, System::String ^ serverPassword);
public void RemoveFromSqlServer (string packagePath, string serverName, string serverUserName, string serverPassword);
member this.RemoveFromSqlServer : string * string * string * string -> unit
Public Sub RemoveFromSqlServer (packagePath As String, serverName As String, serverUserName As String, serverPassword As String)

Parâmetros

packagePath
String

O nome do pacote a ser removido.

serverName
String

O nome da instância do SQL Server.

serverUserName
String

O nome de usuário a ser usado ao autenticar no servidor.

serverPassword
String

A senha associada à conta serverUserName.

Exemplos

O exemplo de código a seguir remove um pacote chamado myNewName que foi salvo anteriormente.

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  

Aplica-se a