Question 177 of 500
Project Life Cycle PhasesmediumMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is that the database user 'app_user' does not have permission to access the 'SalesDB' database. This is because a successful server-level login does not automatically grant access to a specific database; a separate database user must be mapped to the login and assigned the CONNECT permission on that database. On the CompTIA Project+ PK0-005 exam, this scenario tests your understanding of post-deployment authorization failures, often disguised as a connection string or network issue. A common trap is assuming the error is due to an incorrect server name or password, when the real cause is a missing database-level permission. Remember the two-step rule: login to the server, then permission to the database—a user can authenticate but still be denied access to the data.

PK0-005 Project Life Cycle Phases Practice Question

This PK0-005 practice question tests your understanding of project life cycle phases. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Exhibit

Refer to the exhibit.

=== C:\Project\Build\app.config ===
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>
    <add key="DatabaseServer" value="prod-db-01.internal.company.com"/>
    <add key="DatabaseName" value="SalesDB"/>
    <add key="Environment" value="Production"/>
  </appSettings>
  <connectionStrings>
    <add name="SalesDB" connectionString="Server=prod-db-01;Database=SalesDB;User ID=app_user;Password=Passw0rd!" providerName="System.Data.SqlClient"/>
  </connectionStrings>
</configuration>

=== Deployment Instructions ===
1. Copy app.config to C:\App\
2. Update connection string for environment
3. Restart service

=== Error after deployment ===
System.Data.SqlClient.SqlException: Cannot open database "SalesDB" requested by the login. The login failed.
Login failed for user 'app_user'.

Refer to the exhibit. A developer deployed a new version of an application to production. After restarting the service, the application fails to connect to the database. What is the most likely cause?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

Question 1mediummultiple choice
Full question →

Exhibit

Refer to the exhibit.

=== C:\Project\Build\app.config ===
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>
    <add key="DatabaseServer" value="prod-db-01.internal.company.com"/>
    <add key="DatabaseName" value="SalesDB"/>
    <add key="Environment" value="Production"/>
  </appSettings>
  <connectionStrings>
    <add name="SalesDB" connectionString="Server=prod-db-01;Database=SalesDB;User ID=app_user;Password=Passw0rd!" providerName="System.Data.SqlClient"/>
  </connectionStrings>
</configuration>

=== Deployment Instructions ===
1. Copy app.config to C:\App\
2. Update connection string for environment
3. Restart service

=== Error after deployment ===
System.Data.SqlClient.SqlException: Cannot open database "SalesDB" requested by the login. The login failed.
Login failed for user 'app_user'.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The database user 'app_user' does not have permission to access the 'SalesDB' database.

The exhibit shows that the connection string in the application configuration explicitly references the 'SalesDB' database and uses the 'app_user' account. The error message indicates a login failure for user 'app_user', which in SQL Server typically means the login succeeded at the server level but the user lacks a mapped database user or the CONNECT permission on the specified database. Since the database name and server are correctly specified, the most likely cause is that 'app_user' does not have permission to access 'SalesDB'.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The database user 'app_user' does not have permission to access the 'SalesDB' database.

    Why this is correct

    The error 'Cannot open database' for a valid login indicates lack of database-level permissions.

    Clue confirmation

    The clue word "most likely" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The database server name in the configuration is incorrect.

    Why it's wrong here

    The server name appears valid and the error is about database access, not server resolution.

  • The application is not configured to use the correct environment.

    Why it's wrong here

    The environment key is set to Production, which is appropriate.

  • The password in the connection string is incorrect.

    Why it's wrong here

    If the password were wrong, the error would be 'Login failed for user' but could also be 'password mismatch'. However, the error message specifically says 'Cannot open database' which suggests the login succeeded but database access is denied.

Common exam traps

Common exam trap: answer the scenario, not the keyword

CompTIA often tests the distinction between authentication failure (wrong password) and authorization failure (lack of database permission), and candidates mistakenly choose the password option because they assume any login error is due to credentials.

Detailed technical explanation

How to think about this question

In SQL Server, authentication occurs at the server level first (login), then at the database level (user mapping). A login can be created at the server level without a corresponding database user, or the database user may lack the CONNECT permission. The error 'The server principal ... is not able to access the database ... under the current security context' is the exact message when the login exists but the database user does not have the CONNECT permission or the user is orphaned. This is a common misconfiguration when deploying database changes without running the necessary GRANT or CREATE USER scripts.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A practitioner preparing for the PK0-005 exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related PK0-005 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PK0-005 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PK0-005 question test?

Project Life Cycle Phases — This question tests Project Life Cycle Phases — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The database user 'app_user' does not have permission to access the 'SalesDB' database. — The exhibit shows that the connection string in the application configuration explicitly references the 'SalesDB' database and uses the 'app_user' account. The error message indicates a login failure for user 'app_user', which in SQL Server typically means the login succeeded at the server level but the user lacks a mapped database user or the CONNECT permission on the specified database. Since the database name and server are correctly specified, the most likely cause is that 'app_user' does not have permission to access 'SalesDB'.

What should I do if I get this PK0-005 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This PK0-005 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PK0-005 exam.