Share via


Admin.GetDatabaseTimeout method

Reads the SQL timeout setting for the Project Server core databases, in seconds.

Namespace:  WebSvcAdmin
Assembly:  ProjectServerServices (in ProjectServerServices.dll)

Syntax

'Declaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/Admin/GetDatabaseTimeout", RequestNamespace := "https://schemas.microsoft.com/office/project/server/webservices/Admin/",  _
    ResponseNamespace := "https://schemas.microsoft.com/office/project/server/webservices/Admin/",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function GetDatabaseTimeout ( _
    timeoutType As DatabaseTimeoutType _
) As Integer
'Usage
Dim instance As Admin
Dim timeoutType As DatabaseTimeoutType
Dim returnValue As Integer

returnValue = instance.GetDatabaseTimeout(timeoutType)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/Admin/GetDatabaseTimeout", RequestNamespace = "https://schemas.microsoft.com/office/project/server/webservices/Admin/", 
    ResponseNamespace = "https://schemas.microsoft.com/office/project/server/webservices/Admin/", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public int GetDatabaseTimeout(
    DatabaseTimeoutType timeoutType
)

Parameters

  • timeoutType
    Type: WebSvcAdmin.DatabaseTimeoutType

    The only value available in Project Server is the Core constant (value = 0), which specifies the core databases.

Return value

Type: System.Int32
The timeout value of the core databases.

Remarks

Tip

In some Project Server deployments, the default database timeout is not enough. If a Project Server job fails due to a SQL timeout error, an administrator can increase the database timeout setting by using the SetDatabaseTimeout method, and then retry the job.

The default value and the minimum value are 30 seconds. The maximum value is the Int32 maximum, or 2147483647 seconds (over 15 years).

To read the SQL command timeout for the Project queue or the Timesheet queue, you can use the ReadQueueConfiguration method, or use the Queue Settings page in Project Web App (https://ServerName/ProjectServerName/_layouts/pwa/Admin/queuesettings.aspx).

Project Server Permissions

Permission

Description

ManageServerConfiguration

Allows a user to manage the configuration information for Project Server. Global permission.

Examples

To use the following Windows PowerShell script, save the script in a file named, for example, Get-DatabaseTimeout.ps1. Run the SharePoint 2010 Management Shell as an administrator (in the Microsoft SharePoint 2010 Projects folder of the Start menu), navigate to the directory where you saved the Get-DatabaseTimeout.ps1 file, and then type the following command: .\Get-DatabaseTimeout

###############################################################################
## Get-DatabaseTimeout
## Uses the Admin web service of the PSI to call the GetDatabaseTimeout method.
## The script user must have Project Server administrator permissions.
## To run on your Project Server installation, change the $pwaUrl value.
################################################################################

$pwaUrl = "https://ServerName/ProjectServerName"
$svcAdminUrl = $pwaUrl + "/_vti_bin/PSI/Admin.asmx?wsdl"

$c = get-credential

# Create a proxy for the Admin web service.
$svcAdminProxy = New-WebServiceProxy -uri $svcAdminUrl -credential $c

$secTimeout = $svcAdminProxy.GetDatabaseTimeout(0) 

Write-Host "Database timeout for Project Server: $secTimeout seconds"

See also

Reference

Admin class

Admin members

WebSvcAdmin namespace