exam questions

Exam DP-300 All Questions

View all questions & answers for the DP-300 exam

Exam DP-300 topic 1 question 38 discussion

Actual exam question from Microsoft's DP-300
Question #: 38
Topic #: 1
[All DP-300 Questions]

You have an Azure SQL database named DB1.
You have a table name Table1 that has 20 columns of type CHAR(400). Row compression for Table1 is enabled.
During a database audit, you discover that none of the fields contain more than 150 characters.
You need to ensure that you can apply page compression to Table1.
What should you do?

  • A. Configure the columns as sparse.
  • B. Change the column type to NVARCHAR(MAX).
  • C. Change the column type to VARCHAR(MAX).
  • D. Change the column type to VARCHAR(200).
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
2f5c7cd
7 months, 1 week ago
Selected Answer: D
- A table can't be enabled for compression when the maximum row size plus the compression overhead exceeds the maximum row size of 8,060 bytes (20 columns x CHAR(400)) - Data compression is incompatible with sparse columns. Therefore, tables containing sparse columns can't be compressed nor can sparse columns be added to a compressed table. https://learn.microsoft.com/en-us/sql/relational-databases/data-compression/data-compression?view=sql-server-ver16
upvoted 1 times
...
bingomutant
8 months, 1 week ago
D for sure - Changing the column type to VARCHAR(200) adjusts the column to a variable-length data type. Since the data never exceeds 150 characters, you can safely reduce the maximum length to 200.
upvoted 2 times
...
MS_KoolaidMan
2 years ago
Selected Answer: D
D is the only option that would shrink the column and still allow for a little additional characters.
upvoted 2 times
...
bad_atitude
2 years, 7 months ago
looks currect
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...