TFS 2013 RC Scheduled Backups fail with Could not find stored procedure 'prc_SetTransactionMark'

There is a bug in the TFS 2013 RC Scheduled Backups when TFS is configured to use Reporting Services.  The backup jobs will fail when trying to synchronize backups across the TFS databases.  The issue manifests with this error message when the backup jobs run:

[8/26/2013 1:04:31
PM] [Info] Marking TFS databases

[8/26/2013 1:04:31
PM] [Info] Executing on Tfs_Warehouse: EXEC prc_SetTransactionMark TfsMarkTfpt

[8/26/2013 1:04:31
PM] [Error]

Exception Message:
TF30040: The database is not correctly configured. Contact your Team Foundation
Server administrator. (type DatabaseConfigurationException)

.... 

Exception Message:
Could not find stored procedure 'prc_SetTransactionMark'. (type SqlException)

[Info @13:04:44.102] Node returned: Error

[Error @13:04:44.102] [8/26/2013 1:04:11 PM] [Info]
Requested Backup Job: Full

This bug has been fixed in TFS 2013 RTM.  For RC users you can fix it now by running this SQL script against your Tfs_Warehouse database. 

USE [Tfs_Warehouse]

IF
OBJECT_ID('dbo.prc_SetTransactionMark', 'P') IS NOT NULL DROP PROCEDURE
dbo.prc_SetTransactionMark;

GO

IF
OBJECT_ID('dbo.tbl_TransactionMark', 'U') IS NULL

CREATE TABLE
tbl_TransactionMark (

    LogMark TINYINT CONSTRAINT
PK_tbl_TransactionMark PRIMARY KEY CLUSTERED

)

GO

CREATE PROCEDURE
prc_SetTransactionMark

    @name      
NVARCHAR (128)

AS

SET NOCOUNT ON

 

BEGIN TRANSACTION
@name WITH MARK

DELETE FROM
tbl_TransactionMark WHERE LogMark = 1

INSERT INTO
tbl_TransactionMark (LogMark) VALUES (1)

COMMIT TRANSACTION

GO