Error: 18456 + SQL Server 2022 New Install

  • We are seeing the below error after the SQL Server 2022 install. Not sure what is the purpose of this account “'DOMAIN\XX-RPT-P-DB$”. Looks like this was created/used automatically as part of the installation and is used by some background process. We haven’t seen this issue in older versions.

     

    I see this domain account, but couldn’t find a corresponding login in SQL Server. Hence added this account and granted server roles ‘sysadmin’ and ‘db_owner’ privileges to individual system databases. But this didn’t fix the issue.

     

    Warning             7/9/2024 10:11:07 AM  Logon   Error: 18456, Severity: 14, State: 5.

    OK         7/9/2024 10:11:07 AM  Logon   Login failed for user 'XXXX\XX-RPT-P-DB$'. Reason: Could not find a login matching the name provided. [CLIENT: <local machine>]

     

    Regards,

    Tony

  • The error message you are encountering, Error 18456 with Severity 14, State 5, indicates that SQL Server could not find a login matching the name provided. This error commonly occurs when there is an attempt to log in using a Windows user account that doesn't have an associated SQL Server login.

    Here are the steps to resolve this issue:

    ### Step 1: Verify the Account

    1. **Confirm the Account Existence:** Ensure that the account DOMAIN\XX-RPT-P-DB$ exists in your Active Directory.

    2. **Understand the Account Purpose:** This account appears to be a machine account (indicated by the $ at the end) and may be used by some automated process or service.

    ### Step 2: Create a SQL Server Login

    1. **Create the Login:** If the account DOMAIN\XX-RPT-P-DB$ is legitimate and necessary, create a corresponding SQL Server login.

    `sql

    CREATE LOGIN [DOMAIN\XX-RPT-P-DB$] FROM WINDOWS;

    `

    2. **Assign Appropriate Permissions:** Grant the necessary permissions to this login. Typically, you might want to start with minimal permissions and increase them as necessary.

    `sql

    ALTER SERVER ROLE sysadmin ADD MEMBER [DOMAIN\XX-RPT-P-DB$];

    `

    ### Step 3: Review and Adjust Permissions

    1. **Fine-tune Permissions:** Depending on the purpose of this account, it might not require sysadmin privileges. You might want to grant more specific permissions based on the actual requirement.

    `sql

    USE [master];

    ALTER ROLE [db_owner] ADD MEMBER [DOMAIN\XX-RPT-P-DB$];

    `

    ### Step 4: Check SQL Server Services and Scheduled Tasks

    1. **SQL Server Services:** Verify if any SQL Server services are configured to run under this account. Ensure they have the necessary permissions.

    2. **Scheduled Tasks:** Check for any SQL Server Agent jobs or scheduled tasks that might be using this account.

    ### Step 5: Validate Configuration

    1. **Check SQL Server Error Logs:** Look for any additional information or recurring issues in the SQL Server error logs.

    2. **Test Connectivity:** Try to connect to SQL Server using the DOMAIN\XX-RPT-P-DB$ account to ensure it works as expected.

    ### Troubleshooting Additional Issues

    - If you still encounter issues, consider reviewing the installation logs and configurations. Sometimes, specific components or services might require additional configuration post-installation.

    - Make sure there are no group policies or security settings in your Active Directory that might be affecting this account.

    If these steps don't resolve the issue, please provide additional details or logs, and I can help you further diagnose and troubleshoot the problem.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply