Cannot open database "TfsWarehouse" requested by the login

25/06/2009

Cannot open database "TfsWarehouse" requested by the login

I Installed TFS 2008 on Server 2008 with SQL 2008, everything during the installation went fine except the reports.

error

When I tried to process the cube using SSMS I got the following error:

Detailed Message: Cube processing runtime error: \r\nMicrosoft.AnalysisServices.OperationException: Internal error: The operation terminated unsuccessfully.Internal error: The operation terminated unsuccessfully.OLE DB error: OLE DB or ODBC error: Cannot open database "TfsWarehouse" requested by the login. The login failed.; 42000.Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of ‘TfsWarehouseDataSource’, Name of ‘TfsWarehouseDataSource’.Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of ‘Run’, Name of ‘Run’ was being processed.Errors in the OLAP storage engine: An error occurred while the ‘Run ID’ attribute of the ‘Run’ dimension from the ‘TfsWarehouse’ database was being processed.

Solution:

1. SQL management Studio > Database Engine > Databases > TFSWarehouse> Security > Users

and make sure dbo user (administrator) has the tfswarehousedatareader schema checked.

image

2. Than execute the following script:

USE [TfsWarehouse]
GO
CREATE USER [NT AUTHORITY\NETWORK SERVICE] FOR LOGIN [NT AUTHORITY\NETWORK SERVICE]
GO
USE [TfsWarehouse]
GO
EXEC sp_addrolemember N’TfsWarehouseDataReader’, N’NT AUTHORITY\NETWORK SERVICE’
GO

3. Restart SQL Service and the problem should be resolved.

Hope I can helped.

Add comment
facebook linkedin twitter email

Leave a Reply

4 comments

  1. tim17/09/2009 ב 00:25

    That’s a winner. Thanks for saving the day!

  2. chan18/09/2009 ב 19:39

    Thank you for your solution to help me.
    Thank you again.

  3. Omid24/09/2009 ב 11:47

    Wowwwwwww……
    Thank you………. for the post

    Can you brief me what was wrong…… since during the installation everything went fine…….

    omid_po@yahoo.com

  4. Bruce07/04/2010 ב 01:10

    Thanks for the help. I had to do the same thing for the LOCAL SERVICE account. Then it ran.

    The strange item was that in the Windows Event log it said my TFSServices account could not log into the database. But when I checked the SQL Services log file it said it had a problem with the NT AUTHORITY\LOCAL SERVICE login.