• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

VENDOR ERROR CODE 4060 - SQL Server

Explorer ,
Sep 05, 2016 Sep 05, 2016

Copy link to clipboard

Copied

Guys,

We migrate our database from MS SQL 2008 to MS SQL 2012, but, when I tried access our app, the app show me the follows error:

Error Executing Database Query.

Cannot open database "DB" requested by the login. The login failed. ClientConnectionId:562379cb-792a-4d92-88fb-b274aed1a6e9

SQLSTATE       S0001

DATASOURCE       DB

VENDORERRORCODE       4060

We generated a dump from our production environment and we imported into our developing environment, after imported, the CF show for us the error above.

Someone, know how solve this problem?

Tks,

Fabiano Magno Pechibella

TOPICS
Database access

Views

6.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Sep 06, 2016 Sep 06, 2016

Hi BKBK,

The solution was....

Go to SQL Server >> Security >> Logins and right click on NT AUTHORITY\NETWORK SERVICE and select Properties

errnt.jpg

In newly opened screen of Login Properties, go to the “User Mapping” tab. Then, on the “User Mapping” tab, select the desired database – especially the database for which this error message is displayed. On the lower screen, check the role db_owner. Click OK.

errnt1.jpg

Tks,

Best Regards,

Fabiano Magno Pechibella

Votes

Translate

Translate
Advocate ,
Sep 05, 2016 Sep 05, 2016

Copy link to clipboard

Copied

It tells you what the problem is. The login failed. There is a problem with your authentication.

You need to start there and make sure all the authentication is setup the same way as it was before the migration.

How did you migrate the SQL? AS this is a Coldfusion forum you may get a better chance asking this somewhere SQL related.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 05, 2016 Sep 05, 2016

Copy link to clipboard

Copied

Thanks haxtbh,

I found the problem!

When you generate a dump form other environment and import into in your DB some logins and password are changed,

I don't know why, but this was my problem.

Tks,

Fabiano Magno Pechibella

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 05, 2016 Sep 05, 2016

Copy link to clipboard

Copied

Hi Fabiano, good the problem is solved. Please mark the correct answer.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 06, 2016 Sep 06, 2016

Copy link to clipboard

Copied

Hi BKBK,

The solution was....

Go to SQL Server >> Security >> Logins and right click on NT AUTHORITY\NETWORK SERVICE and select Properties

errnt.jpg

In newly opened screen of Login Properties, go to the “User Mapping” tab. Then, on the “User Mapping” tab, select the desired database – especially the database for which this error message is displayed. On the lower screen, check the role db_owner. Click OK.

errnt1.jpg

Tks,

Best Regards,

Fabiano Magno Pechibella

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 06, 2016 Sep 06, 2016

Copy link to clipboard

Copied

Thanks for sharing that.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Sep 07, 2016 Sep 07, 2016

Copy link to clipboard

Copied

LATEST

Is SQL Server running on the same server as ColdFusion?

Might I suggest running the ColdFusion service under a specific Windows local or domain user account, and then add that user to the database logins/users?  That could potentially add a level of security.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation