locked
The database you specified cannot be used.. -> Change DB Server RRS feed

  • Question

  • Hello,

    we wan't to switch our tfs databases (TFS_Configuration, TFS_CollectionName, TFS_Warehouse, ReportServer,

    ReporServerTempDB) from one sql instanz to another.

    1. I do the detach and attach function for project collections

    2. I change at report server admin console the database server entries to the new one.

    Now i wan't at change at tfs admin console -> reporting -> Stop Jobs & Edit Reporting -> Register Warehouse the database instance.

    There i get an error:  The database you specified cannot be used. The database exists, but its schema is not valid for use with Team Foundation Server.

    At this url, you can see the error message an the register wat I tould you:

    http://blogs.msdn.com/b/sunder/archive/2010/04/27/when-trying-to-enable-reporting-after-upgrading-my-server-i-get-a-schema-warning.aspx

    The thing is, i don’t want create a new TFS_Warehouse and analyse databsae, i want use the existing database at new sql instance, what I have restored at new instance.

    I hope somebody can help me,

    Horst


    Thanks Horst MOSS 2007 Farm, MOSS 2010 Farm, TFS 2008, TFS 2010
    Wednesday, August 31, 2011 8:55 AM

Answers

  • Hello,

    that was working for my:

    -------------------------------------------------------

    Detach der Projekt Collections's

    Backup & Restore der DB at new instance

    Attach der Projekt Collection's new instance

    TFSServiceControl quiesce

    Backup database, Tfs_Configuration, TFS_WareHouse

    Restore database's at new sql instance: sql\instance

    TFSConfig PrepSQL /SQLInstance:sql\instance

    Logon at application tier server with setup user: TFSSETUP

    TFSConfig RemapDBs /DatabaseName:sql\instance;TFS_Configuration /SQLInstances:sql\instance /AnalysisInstance:tfs01\tfs /AnalysisDatabaseName:TFS_Analyse

    TFSConfig Accounts /ResetOwner /SQLInstance:sql\instance /DatabaseName:Tfs_Configuration

    TfsConfig registerDB /SQLInstance:sql\instance /DatabaseName:Tfs_Configuration

    TFSConfig RebuildWarehouse /AnalysisServices /ReportingDataSourcePassword:PSW

    Reapply Service Account: TFS Adminconsole -> Application Tier -> Reapply Account

    Change Reporting Service: Datasource Tfs2010ReportDS

    Analyse Service -> Cube TFS-Analyse -> Data Source -> TFS_AnalyseDataSource -> Impersionation Information -> Set PSW ->
    http://social.msdn.microsoft.com/Forums/da-DK/tfsgeneral/thread/e8e13640-a7af-4de1-b876-066890ae3612

    Manually Processing the Team Foundation Server 2010 Data Warehouse and Analysis Services Database
    http://blog.accentient.com/2010/04/08/ManuallyProcessingTheTeamFoundationServer2010DataWarehouseAndAnalysisServicesDatabase.aspx

    http://tfs01:8080/tfs/TeamFoundation/Administration/v3.0/WarehouseControlService.asmx

    Start service: Visual Studio Team Foundation Background Job Agent

    To clear the data cache
    C:\%programfiles%\Microsoft Team Foundation Server 2010\Application Tier\Web Services\_tfs_data

    -----------------------------

    Horst


    Thanks Horst MOSS 2007 Farm, MOSS 2010 Farm, TFS 2010
    • Marked as answer by wuwu Tuesday, September 6, 2011 12:16 PM
    Tuesday, September 6, 2011 12:16 PM

All replies

  • Hi,

    Did you followed any article to move the TFS2010 databases to another SQL instance? for your information i am sharing you the below MSDN link to move TFS2010.

    http://msdn.microsoft.com/en-us/library/ms252516.aspx

    Best regards,

    Chandra

     

     


    Chanduvsc - MSFT
    Wednesday, August 31, 2011 5:14 PM
  • Hello Chandra,

    yes i found this, but i am not 100% sure if i make the right steps:

    1. TFSServiceControl quiesce

    2. Backup database, TFS_Configuration, TFS_WareHouse

    3. Restore database's at new sql instance: mssqlnewinstance\newinstance

    4. TFSConfig PrepSQL /SQLInstance: mssqlnewinstance\newinstance

    5. Logon at application tier server with setup user: TFSSETUP

    6. TfsConfig registerDB /SQLInstance:mssqlnewinstance\newinstance /DatabaseName: TFS_Configuration

    7. Configure Reporting and Analysis Services

    8. TFSServiceControl unquiesce

    Question’s:

    1. Are this steps at the right order

    2. Update All Service Accounts: Did I have to do that?

    TfsConfig Accounts /add /AccountType:ApplicationTier /account:AccountName /SQLInstance:mssqlnewinstance\newinstance /DatabaseName: : TFS_Configuration

    Thanks for your help,

    Horst


    Thanks Horst MOSS 2007 Farm, MOSS 2010 Farm, TFS 2008, TFS 2010
    Wednesday, August 31, 2011 7:01 PM
  • Hello wuwu,

    Thanks for your post.

    1). If you follow the steps described in the article Chandra provide above, you should not get any errors. For one thing I feel very confused, why do you just backup the Tfs_Warehouse and Tfs_Configuration databases? What about other ones? I think you should back the Tfs_CollectionName and Tfs_Analysis databases as well.

    As your TFS server is configured to use SQL Server Reporting Services, and you want to restore those databases to a different server, you must back up the Tfs_Warehouse and Tfs_Analysis databases.

    2). Yes, you need to do so.

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, September 2, 2011 2:27 AM
    Moderator
  • Ok, thank you!

    One question, what is the account name, tfs service user or setup user?

    Horst


    Thanks Horst MOSS 2007 Farm, MOSS 2010 Farm, TFS 2008, TFS 2010
    Friday, September 2, 2011 9:22 AM
  • Yes, the TFSSetup account this should be a service account. don't use any user accounts for it.

    Best regards,

    Chandra


    Chanduvsc - MSFT
    Friday, September 2, 2011 5:16 PM
  • you need to use Tfssetup account

     

    chandra


    Chanduvsc - MSFT
    Friday, September 2, 2011 10:29 PM
  • Hello wuwu,

    According to this article, please see the Update All Service Accounts part. We need to update the service account for Team Foundation Server (TFSService) and the data sources account (TFSReports).

    The following is the quotation of that article:

    You must update the service account for Team Foundation Server (TFSService) and the data sources account (TFSReports). Even if these accounts have not changed, you must update the information in order to make sure that the identity and the format of the accounts are appropriate for the new server.

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, September 5, 2011 1:28 AM
    Moderator
  • Hello,

    that was working for my:

    -------------------------------------------------------

    Detach der Projekt Collections's

    Backup & Restore der DB at new instance

    Attach der Projekt Collection's new instance

    TFSServiceControl quiesce

    Backup database, Tfs_Configuration, TFS_WareHouse

    Restore database's at new sql instance: sql\instance

    TFSConfig PrepSQL /SQLInstance:sql\instance

    Logon at application tier server with setup user: TFSSETUP

    TFSConfig RemapDBs /DatabaseName:sql\instance;TFS_Configuration /SQLInstances:sql\instance /AnalysisInstance:tfs01\tfs /AnalysisDatabaseName:TFS_Analyse

    TFSConfig Accounts /ResetOwner /SQLInstance:sql\instance /DatabaseName:Tfs_Configuration

    TfsConfig registerDB /SQLInstance:sql\instance /DatabaseName:Tfs_Configuration

    TFSConfig RebuildWarehouse /AnalysisServices /ReportingDataSourcePassword:PSW

    Reapply Service Account: TFS Adminconsole -> Application Tier -> Reapply Account

    Change Reporting Service: Datasource Tfs2010ReportDS

    Analyse Service -> Cube TFS-Analyse -> Data Source -> TFS_AnalyseDataSource -> Impersionation Information -> Set PSW ->
    http://social.msdn.microsoft.com/Forums/da-DK/tfsgeneral/thread/e8e13640-a7af-4de1-b876-066890ae3612

    Manually Processing the Team Foundation Server 2010 Data Warehouse and Analysis Services Database
    http://blog.accentient.com/2010/04/08/ManuallyProcessingTheTeamFoundationServer2010DataWarehouseAndAnalysisServicesDatabase.aspx

    http://tfs01:8080/tfs/TeamFoundation/Administration/v3.0/WarehouseControlService.asmx

    Start service: Visual Studio Team Foundation Background Job Agent

    To clear the data cache
    C:\%programfiles%\Microsoft Team Foundation Server 2010\Application Tier\Web Services\_tfs_data

    -----------------------------

    Horst


    Thanks Horst MOSS 2007 Farm, MOSS 2010 Farm, TFS 2010
    • Marked as answer by wuwu Tuesday, September 6, 2011 12:16 PM
    Tuesday, September 6, 2011 12:16 PM