SQL Server 2008 R2 - Error 18456 State 12 - nothing I find helps me

Adrian Kelley asked on February 16, 2021 10:59

First off let me state that I'm not a DBA, I don't have access to a DBA, I'm just a programmer who has to get a CMS working. I'm generally pretty good at getting random servers working, but this is doing my head in.

I have a trail of SQL Server 2008 installed, with a database that I imported from a backup. The CMS starts up, connects to the DB but tells me

[SqlException (0x80131904): Login failed for user 'kentico'.]

Checking the logs shows me

Error: 18456, Severity: 14, State: 12.

I googled it, and every answer has state 11 and 12 in lumped together, and I think I've done what is mentioned in the posts. but really im just stumbling in the dark. I don't even know what other information I can provide that will help people help me!

I have created a user in in the \security\logins folder, and this login is mapped to a user of the same name in the \databases<db_name>\security\ folder. What else do I have to do?!

I should say that changing the connection string to the sa account gets me in to the cms, but then I'm only allowed one connection on the sa account so the CMS randomly spits the dummy when the connection is refused.

Any help would be greatly appreciated, and please remember, this is my first time I've even looked at SQL Server, so the assumed knowledge is just not there :(

Recent Answers


Dmitry Bastron answered on February 16, 2021 11:08

Hi Adrian,

It's worth checking whether the user in \databases\<db_name>\security\ folder has db_owner membership set up. Typically, this is the first thing I do when restoring the CMS database.

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on February 16, 2021 13:20

Thing that always gets me on new SQL installations is check if you have SQL server mode auth enabled (user/name password) and not just Windows Authentication

auth

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.