TF30040: The database is not correctly configured

2019-01-20 01:59发布

I inherited a TFS 2010 server and I am attempting to use the Administration Console to perform some tasks (add a new project collection, add a console user, etc.) and it gives me this error:

TF30040: The database is not correctly configured. Contact your Team Foundation Server administrator.

I have tried viewing the eventvwr logs but nothing is mentioned about this error. I think TFS setup SQL Server 2008 automatically when it was installed. Any ideas on how to resolve this?

TFS Admin Console

标签: tfs tfs2010
2条回答
Ridiculous、
2楼-- · 2019-01-20 02:38

For me, the solution (TFS 2018 Update 2) was to run the command line as the service account defined in the app tier. Then, I needed the DBA to grant the svc account the sysadmin server role temporarily during the project collection reattach. Once the attach was complete, I reapplied the service account in the app tier and it all worked perfectly.

查看更多
一纸荒年 Trace。
3楼-- · 2019-01-20 02:44

I figured it out. Add yourself as a sysadmin by starting SQL Server in single user mode. Once you have that role the console will load properly for you.

In order to start SQL Server in single-user mode, you can add the parameter “-m” at the command line. You can also use the SQL Server Configuration Manager tool, which provides proper controls for the file access and other privileges. To use the Configuration Manager tool to recover your system, use the following steps:

1. Open the Configuration Manager tool from the "SQL Server 2005| Configuration" menu

2. Stop the SQL Server Instance you need to recover

3. Navigate to the “Advanced” tab, and in the Properties text box add “;–m” to the end of the list in the “Startup parameters” option

4. Click the “OK” button and restart the SQL Server Instance

NOTE: make sure there is no space between “;” and “-m”, the registry parameter parser is sensitive to such typos. You should see an entry in the SQL Server ERRORLOG file that says “SQL Server started in single-user mode.”

5. After the SQL Server Instance starts in single-user mode, the Windows Administrator account is able to connect to SQL Server using the sqlcmd utility using Windows authentication. You can use Transact-SQL commands such as "sp_addsrvrolemember" to add an existing login (or a newly created one) to the sysadmin server role. The following example adds the account "Buck" in the "CONTOSO" domain to the SQL Server "sysadmin" role:

EXEC sp_addsrvrolemember 'CONTOSO\Buck', 'sysadmin';
GO

6. Once the sysadmin access has been recovered, remove the “;-m” from the startup parameters using the Configuration Manager and restart the SQL Server Instance

查看更多
登录 后发表回答