Courseiva
Database Administration and CMDBmediumMultiple ChoiceObjective-mapped

SNOW-CSA GlideRecord and Read Access Practice Question

Exhibit

var gr = new GlideRecord('cmdb_ci');
gr.addQuery('sys_class_name', 'cmdb_ci_server');
gr.query();
while(gr.next()){
  gs.info(gr.name);
}

Refer to the exhibit. An administrator runs this script in a background script. The script runs without errors but does not output any CI names. All servers exist in the CMDB. What could be the issue?

⚠ Common exam trap

Candidates often forget that security roles and ACLs can silently prevent GlideRecord from returning records. A script that runs without errors but yields no results should always prompt a check of access permissions before assuming the query logic is flawed.

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 administrator does not have read access to the cmdb_ci table.

The script runs without errors but returns no records, indicating a permission issue. In ServiceNow, if the administrator lacks read access to the 'cmdb_ci' table (or the specific table being queried), GlideRecord will not return any records even if they exist. The other options are incorrect: A is wrong because 'cmdb_ci_server' is the correct sys_class_name value for server CIs; B is false because the script runs without errors, so initialization is fine; D is false because the condition is not necessary for record output—the query itself would return all records without a condition.

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 sys_class_name should be 'Server' instead of 'cmdb_ci_server'.

    Why it's wrong here

    Incorrect. The sys_class_name for server CIs is 'cmdb_ci_server', not 'Server'. Using 'cmdb_ci_server' is correct and should return matching records if they exist.

  • The GlideRecord is not properly initialized.

    Why it's wrong here

    Incorrect. If the GlideRecord were not properly initialized, the script would throw an error. Since it runs without errors, initialization is fine.

  • The administrator does not have read access to the cmdb_ci table.

    Why this is correct

    Correct. Lack of read access to the cmdb_ci table would cause the script to return no records silently, matching the described behavior.

  • The script does not have a condition to check the number of records.

    Why it's wrong here

    Incorrect. A condition to check the number of records is not required for output; the script would still output CI names without it.

About these practice questions

This SNOW-CSA question is part of Courseiva's 504-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SNOW-CSA practice question is part of Courseiva's free ServiceNow 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 SNOW-CSA exam.