Share via


Managed Data Hosting::BackupCustomerDbToDisk

This procedure performs a full backup of a specified database to disk. Simple pass-through method to the SQL Admin Provider with an additional security check.

Arguments

Argument Required Description

<orgLdapPath>

Yes

LDAP path of the owning organization.

<databaseName>

Yes

The name of the database to be modified.

<preferredDomainController>

Yes

<filePath>

Yes

The full file path to the file to write the backup to.

<description>

Yes

The description or details about the backup.

<overwrite>

Yes

Flag indicating if the backup should be appended to the indicated file. Valid values are 0 (append) or 1 (overwrite).

<sqlUserName>

No

User name for connecting to the SQL server via SQL Authentication. If this node is present, the connection will be made via SQL Authentication rather than Windows Authentication. The existence of this node also requires that the <sqlUserPass/> node exist.

<sqlUserPass>

No

The password for connecting to the SQL server via SQL Authentication, using the username indicated by <sqlUserName/>. If the <sqlUserName/> node is not present, this node is ignored.

Remarks

Method

public string   BackupCustomerDbToDisk( 
                                        string orgLdapPath,   
                                        string databaseName,  
                                        string preferredDomainController, 
                                        string filePath,  
                                        string description,  
                                        string overwrite,  
                                        string sqlUserName, 
                                        string sqlUserPass, 
                                        bool sendCredentials) 

Sample Code

Typical C# Usage

        //Get user name and password.                            
        string userName = this.Request.ServerVariables.Get("AUTH_USER"); 
        string pass = this.Request.ServerVariables.Get("AUTH_PASSWORD"); 
        //Set credentials. 
        sqlAdminWS.PreAuthenticate = true; 
        sqlAdminWS.Credentials = new NetworkCredential(userName,pass); 
 
        lblMsg.InnerHtml = mpsResponseHeaderLabel; 
        //Display response. 
        this.mpsResponse.DocumentSource = ""; 
        response = sqlAdminWS.BackupDbToDisk(orgLdapPath, serverName, databaseName, preferredDomainController, filePath, description, overwrite, sqlUserName,sqlUserPass); 
                         
// set the response XML to match the return from MPF 
        responseXml.LoadXml(response); 
        this.mpsResponse.Document = responseXml; 
lblDone.InnerText = successMsg; 

Applies To

Managed Data Hosting Web Service for:

  • Hosted Messaging and Collaboration version 4.0

  • Hosted Messaging and Collaboration version 3.5

  • Hosted Messaging and Collaboration version 3.0

  • Windows-based Hosting version 4.5

  • Windows-based Hosting version 4.0

  • Windows-based Hosting version 3.5

  • Windows-based Hosting for Applications version 1.0

See also

Tasks

Managed Data Hosting::RestoreCustomerDbFromDisk