JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
SQL Server interview questions part 20
SQL Server interview questions part 20
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Which of the following column is a part of syspolicy_policies result ?
A. name
B. root_condition_id
C. date_created
D. All of the mentioned
Show Correct Answer
Correct Answer is :
All of the mentioned
2. How many types of execution mode are present in syspolicy_policies ?
A. 2
B. 3
C. 4
D. 5
Show Correct Answer
Correct Answer is :
4
3. ____________ displays the condition expressions that were executed,
A. syspolicy_policy_execution
B. syspolicy_policy_execution_history_details
C. syspolicy_policy_execution_history
D. syspolicy_policy_group_subscriptions
Show Correct Answer
Correct Answer is :
syspolicy_policy_execution_history_details
4. Purpose of syspolicy_system_health_state in policy based management is :
A. Displays one row for each Policy-Based Management policy
B. Organize policies when you have many policies
C. Displays the time when policies were executed, the result of each execution, and details about errors if any occurred
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Displays one row for each Policy-Based Management policy
5. Which of the following command is used to get child items in powershell ?
A. Get-Child
B. Set-Alias
C. Get-Command
D. Get-ChildItem
Show Correct Answer
Correct Answer is :
Get-ChildItem
6. Point out the wrong statement :
A. Get-Command retrieve basic information about a command
B. Trace-Command trace an expression or command
C. Get-Content delete content from a file
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Get-Content delete content from a file
7. ___________ convert object properties into CSV objects.
A. ConvertFrom-CSV
B. Convert-CSV
C. ConvertFromCSV
D. All of the mentioned
Show Correct Answer
Correct Answer is :
ConvertFrom-CSV
8. The output of the following code is: PS C:\bin> notepad hello.ps1
A. Text editor with “Hello world” scripted
B. Text editor with “Hello” scripted
C. Text editor with no script
D. All of the mentioned
Show Correct Answer
Correct Answer is :
Text editor with no script
9. Point out the wrong statement :
A. The first PowerShell cmdlet every administrator should learn is Get-Command
B. Get-Event is used to find events in the PowerShell event queue
C. Limit-EventLog is used to limit the size of the event log
D. None of the mentioned
Show Correct Answer
Correct Answer is :
The first PowerShell cmdlet every administrator should learn is Get-Command
10. Syntax for viewing the methods and properties we can pipe our output to Get-Member by :
A. Get-Process
B. Get-Member
C. Get-Process | Get-Member
D. All of the mentioned
Show Correct Answer
Correct Answer is :
Get-Process | Get-Member
11. Unrestricted execution policy can be set up in SQL Server can be done using :
A. Set-ExecutionPolicy Unrestricted
B. Set-Policy Unrestricted
C. Set-Policy Unrestricted
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Set-ExecutionPolicy Unrestricted
12. Code for creating an HTML report that lists the name of each service along with its status is :
A. Get-Ser | ConvertTo-HTML -Property Name, Status > C:\services.htm
B. Get-Service | Property Name, Status > C:\services.htm
C. Get-Service | ConvertTo-HTML -Property Name, Status > C:\services.htm
D. All of the mentioned
Show Correct Answer
Correct Answer is :
Get-Service | ConvertTo-HTML -Property Name, Status > C:\services.htm
13. Which of the following language is used for procedural flow in SQL Server ?
A. Flow language
B. Control language
C. Control-of-flow language
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Control-of-flow language
14. Point out the correct statement :
A. Control-of-flow language permits statements to be connected, related to each other, and made interdependent using programming-like constructs
B. Control-of-flow statements cannot span multiple batches, user-defined functions, or stored procedures
C. Control-of-flow words are useful when you need to direct Transact-SQL to take some kind of action
D. All of the mentioned
Show Correct Answer
Correct Answer is :
All of the mentioned
15. Which of the following is a control flow keyword ?
A. IF
B. GO
C. GOTO
D. All of the mentioned
Show Correct Answer
Correct Answer is :
GOTO
16. Point out the wrong statement :
A. GOTO can exist within conditional control-of-flow statements, statement blocks, or procedures
B. GOTO permissions need not be granted to any user
C. GOTO statements can be nested
D. None of the mentioned
Show Correct Answer
Correct Answer is :
GOTO permissions need not be granted to any user
17. Which of the following two Transact-SQL statements are commonly used with WHILE ?
A. BREAK and CONTINUE
B. BREAK and IF
C. IF and ELSE
D. All of the mentioned
Show Correct Answer
Correct Answer is :
BREAK and CONTINUE
18. Which of the following scenario makes use of BEGIN..END keyword redundant ?
A. when an IF statement controls the execution of multiple Transact-SQL statement
B. when an IF statement controls the execution of only one Transact-SQL statement
C. when an IF statement controls the execution of one or more Transact-SQL statement
D. None of the mentioned
Show Correct Answer
Correct Answer is :
when an IF statement controls the execution of only one Transact-SQL statement
19. The BEGIN and END statements are used when:
A. A WHILE loop needs to include a block of statements
B. An element of a CASE expression needs to include a block of statements
C. An IF or ELSE clause needs to include a block of statements
D. All of the mentioned
Show Correct Answer
Correct Answer is :
All of the mentioned
20. Which of the following components constitutes use CASE expression ?
A. The primary key name to transform
B. The BEGIN keyword
C. The CASE keyword
D. Where clause defining an alias for the CASE expression
Show Correct Answer
Correct Answer is :
The CASE keyword
Similar Interview Questions
Search for latest jobs
Find Jobs