SQL Server Questions and Answers – Schema Audit

This set of SQL Server Multiple Choice Questions & Answers (MCQs) focuses on “Schema Audit”.

1. How many ways of auditing the schema is available in SQL Server?
a) 2
b) 3
c) 4
d) 5
View Answer

Answer: a
Explanation: There are mainly two ways to audit:Using backups and Scripts in SQL Server.

2. Point out the correct statement.
a) You can use Source control to audit schema changes
b) The SQL Server Audit feature enables you to audit column level groups of events and individual events
c) Audit level actions encompass data manipulation languages (DML) and data definition language (DDL) operations
d) None of the mentioned
View Answer

Answer: a
Explanation: Whether you do or not, this code in source control will need to be stored separately from your development code in order to isolate keeping track of production changes from your development processor.

3. Which of the following event is not intrinsically audited?
a) ALTER DATABASE AUDIT SPECIFICATION
b) CREATE SERVER AUDIT SPECIFICATION
c) DROP SERVER AUDIT SPECIFICATION
d) All of the mentioned
View Answer

Answer: d
Explanation: All audits are disabled when initially created.
advertisement
advertisement

4. Which of the following is server-level audit action group?
a) BACK_RESTORE_GROUP
b) BACKUP_RESTORE_GROUP
c) DB_LOGOUT_GROUP
d) None of the mentioned
View Answer

Answer: b
Explanation: BACKUP_RESTORE_GROUP event is raised whenever a backup or restore command is issued.

5. Point out the wrong statement.
a) When the query processor parameterize the query, the parameter can appear in the audit event log instead of the column values of the query
b) To access the triggering event we can use the EventData function in our DDL trigger
c) AUDIT_DATABASE_CHANGE_GROUP event is raised whenever CREATE DATABASE AUDIT is issued
d) None of the mentioned
View Answer

Answer: c
Explanation: AUDIT_ CHANGE_GROUP event is raised whenever CREATE SERVER AUDIT is issued.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. AUDIT_CHANGE_GROUP event is raised whenever any audit is _____________
a) Created
b) Modified
c) Delete
d) All of the mentioned
View Answer

Answer: d
Explanation: Any change to an audit is audited in that audit.Equivalent to the Audit Change Audit Event Class.

7. __________ could potentially lead to large audit records.
a) DATABASE_OBJECT_ACCESS_GROUP
b) DATABASE_MIRRORING_LOGIN_GROUP
c) DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP
d) DATABASE_OBJECT_PERMISSION_CHANGE_GROUP
View Answer

Answer: a
Explanation: DATABASE_OBJECT_ACCESS_GROUP event is raised for any access to any database.
advertisement

8. You can use the handy event name of __________ to make sure your trigger covers all DDL events.
a) DDL_DATABASE_EVENTS
b) DDL_DATABASE_LEVEL_EVENTS
c) DDL_DATABASE_LEVEL
d) All of the mentioned
View Answer

Answer: b
Explanation: DDL_DATABASE_LEVEL_EVENTS is used for auditing database objects in SQL Server.

9. DDL Trigger can capture the information about the EVENT that fired it by using __________ function.
a) EVENTDATA()
b) EVENT()
c) EVENTS()
d) None of the mentioned
View Answer

Answer: a
Explanation: The EventData xml value includes the triggering SQL statement, the event time, the type of event and depending on what type of event was called, extra information such as the database name.

advertisement

10. Which of the following database level event si raised whenever a REFERENCES permission is checked.
a) EXECUTE
b) REFERENCES
c) UPDATE
d) SELECT
View Answer

Answer: b
Explanation: Database-level audit actions do not apply to Columns.

Sanfoundry Global Education & Learning Series – SQL Server.

To practice all areas of SQL Server, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.