SQL Admin Provider::ListAllDatabases

The ListAllDatabases method allows you to list all databases on a specific SQL server.

Arguments

Input argument Required Description

ServerName

Yes

A string representing the name of the server. This can be a NetBIOS name, a FQDN, or an IP address. It is vital that the server upon which MPS is running be able to resolve server names using whichever naming convention you employ.

[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.

Output argument Description

Name

The database name.

Db_size

The total size of the database.

Owner

The database owner.

Dbid

The numeric database.

Created

The date the database was created.

Status

A comma-separated values (CSV) list of database options that are currently set on the database. Boolean-valued options are listed only if they are enabled. Non-Boolean options are listed with their corresponding values in the form of option_name=value.

Compatibility_level

The database compatibility level (60, 65, 70, and 80).

Remarks

Rollback Calls

The ListAllDatabases method has no transaction rollback support.

Sample Code

Example XML Request

The following is an example of an XML request for the ListAllDatabases method:

<?xml version="1.0" encoding="iso-8859-1" ?>  
<request> 
    <data> 
        <serverName>SQL01</serverName> 
        <sqlUserName>sampleUser</sqlUserName> 
        <sqlUserPass>Pass1Word</sqlUserPass> 
    </data> 
    <procedure> 
        <execute namespace="SQL Admin Provider"  
         procedure="ListAllDatabases"> 
        <before source="data" destination="executeData" mode="merge"/> 
        <before source="executeData" destination="data" mode="insert"/> 
        </execute> 
    </procedure> 
</request> 

Example XML Response

The following is an example of the structure of an XML response for the ListAllDatabases method. The actual returned data will be filled in within the <data> nodes:

<?xml version="1.0" encoding="iso-8859-1" ?> 
<response> 
    <data> 
        <databases> 
            <database> 
                <name/> 
                <db_size/> 
                <owner/> 
                <dbid/> 
                <created/> 
                <status/> 
                <compatibility_level/> 
            </database> 
        </databases> 
    </data> 
</response>    

Applies To

for:

  • Hosted Messaging and Collaboration version 4.5

  • 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

SQL Admin Provider::DeleteDatabase
SQL Admin Provider::ModifyDatabaseFile