Microsoft KB Archive/912259

= Error message when you try to build an OLAP cube in Project Server 2003 or in Project Server 2002: &quot;The cube scheduled to be built on Date Time failed.&quot; =

Article ID: 912259

Article Last Modified on 4/13/2006

-

APPLIES TO


 * Microsoft Office Project Server 2003
 * Microsoft Project Server 2002
 * Microsoft Office Project Web Access

-





Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry



SYMPTOMS
When you try to build an OLAP cube in Microsoft Office Project Server 2003 or in Microsoft Project Server 2002, you receive the following error message:

The cube scheduled to be built on   failed.

(-2147217871) Timeout expired



CAUSE
During the cube build process, all the data in the staging tables is removed. It is the cleanup of these tables that may cause a time-out.

Typically, this problem occurs with the MSP_CUBE_ASSN_FACT table because this table holds more data than the other staging tables. Sometimes, this problem may also occur with the MSP_CUBE_RES_AVAIL_FACT table or the MSP_CUBE_TIME_BY_DAY table. During the cleanup of the staging tables, SQL statements are made that may take a long time to complete and may sometimes time-out.

The following SQL statements are made during the cleanup of the staging tables:
 * DELETE from MSP_CUBE_ASSN_FACT
 * DELETE from MSP_CUBE_RES_AVAIL_FACT
 * DELETE from MSP_CUBE_TIME_BY_DAY



WORKAROUND
To work around this issue, use one of the following methods, as appropriate.

Note We recommend that you truncate the following tables before you modify the SQLTIMEOUT registry entry:
 * MSP_CUBE_ASSN_FACT
 * MSP_CUBE_RES_AVAIL_FACT
 * MSP_CUBE_TIME_BY_DAY

For example, truncate the tables before every cube build as a SQL job.

Method 1: Truncate the tables in SQL Query Analyzer
To work around this issue, use SQL Query Analyzer to issue a TRUNCATE TABLE statement to remove the data. To do this, follow these steps:  Start SQL Query Analyzer. In the SQL Server box, click (local), type sa in the Login name box, type a password in the Password box, and then click OK. On the Query menu, click Change Database. In the Select database of  box, click ProjectServer, and then click OK. In the Query box, type the following commands. Press ENTER after each command.

TRUNCATE TABLE MSP_CUBE_ASSN_FACT

TRUNCATE TABLE MSP_CUBE_RES_AVAIL_FACT

TRUNCATE TABLE MSP_CUBE_TIME_BY_DAY

 On the Query menu, click Execute.

The following message appears in the Messages box:

The command (s) completed successfully.

</li> Quit Query Analyzer.</li></ol>

Method 2: Create an automated job in SQL Server Agent
To prevent this problem, include the TRUNCATE TABLE statements in an automated job by using SQL Server Agent. To do this, follow these steps: <ol> On the computer that is running SQL Server, start SQL Enterprise Manager.</li> Expand Microsoft SQL Servers, expand SQL Server Group, expand  (Windows NT).

Note If you have not named the server that is running SQL Server, the default name of the server will be &quot;(local)&quot;.</li> Expand Management, and then expand SQL Server Agent.</li> Right-click Jobs, and then click New Job.</li> Click the General tab, and then type a name for this job. For example, type Table_Cleanup .</li> Click to select the Enabled check box, and then click an owner for this job in the Owner list. Leave the default values in the other boxes. You may type a description for this job in the Description box.</li> Click the Steps tab, and then click New.</li> In the Step Name box, type a name for the step. For example, type Step 1 .</li> In the Type box, click Transact-SQL Script (TSQL), and then click ProjectServer in the Database list.</li> In the Command box, type the following commands. Press ENTER after each command.

TRUNCATE TABLE MSP_CUBE_ASSN_FACT

TRUNCATE TABLE MSP_CUBE_RES_AVAIL_FACT

TRUNCATE TABLE MSP_CUBE_TIME_BY_DAY

</li> Click OK.</li> Click the Schedules tab, and then click New Schedule.</li> In the Name box, type a name for the schedule. For example, type Cleanup_Schedule .</li> Click to select the Enabled check box.</li> <li>Under Schedule, configure an appropriate schedule to run this job. Run the job for about 45 minutes before you build the OLAP cube.</li> <li>Click OK, and then click the Notifications tab.</li> <li>Select an appropriate method to notify the operator when the job is completed.</li> <li>Click OK.</li> <li>Quit SQL Enterprise Manager.</li></ol>

Method 3: Increase the time-out value for the OLAP cube build process
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

By default, the OLAP cube build time-out value is set for 30 minutes (1800 seconds). You can increase the time-out value. When you increase the time-out value, the cube data staging process in SQL server has more time to complete successfully.

Note For single server deployments, you will have to apply the following registry key on the front-end Web server on with Project Server is installed. If you have a multiple server deployment of Project Server, apply the following registry key on your views servers if the Views service is offloaded.

To increase the time-out value, follow these steps: <ol> <li>On the server, click Start, click Run, type regedit, and then click OK.</li> <li>Locate the following registry subkey:

</li> <li>On the Edit menu, point to New, and then click Key.</li> <li>Type CubeProcess as the name of the new key, and then press ENTER.</li> <li>Right-click the CubeProcess registry key, point to New, and then click String value.</li> <li>Type SQLTIMEOUT as the name of the new registry entry, and then press ENTER.</li> <li>Right-click SQLTIMEOUT, and then click Modify.</li> <li>Change the value of the SQLTIMEOUT registry entry. By default, this value is set at 1800 seconds (30 minutes). You can increase the time-out value in 15-minute increments until the cube build process no longer times out. For example, to set the time-out value to 45 minutes, change the value of the SQLTIMEOUT registry entry to 2700. Or, to set the time-out value to 60 minutes, change the SQLTIMEOUT registry entry to 3600.</li> <li>Close Registry Editor.</li></ol>

<div class="moreinformation_section">

MORE INFORMATION
You may notice some improvement in cube build performance if you use a combination of methods 2 and 3. The delete process can be time consuming, especially when there are large amounts of data to remove.

Keywords: kbtshoot kbprb KB912259

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.