MCQOPTIONS
Saved Bookmarks
This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
The main features of dotConnect for SQL Server includes : |
| A. | Extra data binding capabilities |
| B. | Ability of monitoring query execution |
| C. | Supports the latest versions of SQL Server |
| D. | All of the mentioned |
| Answer» E. | |
| 2. |
Syntax for closing and opening the connection in ADO.net is : |
| A. | sqlConn.Open() and sqlConn.close() |
| B. | sqlConn.open() and sqlConn.Close() |
| C. | sqlConn.Open() and sqlConn.Close() |
| D. | None of the mentioned |
| Answer» D. None of the mentioned | |
| 3. |
________object is used to fill a DataSet/DataTable with query results in ADO.net. |
| A. | DataReader |
| B. | Dataset |
| C. | DataAdapter |
| D. | DataTables |
| Answer» D. DataTables | |
| 4. |
The easiest way to start is to create a linked server ‘localhost’ by using : |
| A. | sp_addlinkedserv ‘localhost’ |
| B. | sp_addlinkedsrvlogin ‘localhost’ |
| C. | sp_addlinkedserverlogin ‘localhost’ |
| D. | sp_addlinkedserver ‘localhost’ |
| Answer» E. | |
| 5. |
Which of the following SQL syntax elements is dictated by the SQL dialect levels ? |
| A. | LIKE support |
| B. | Parameter marker support |
| C. | Nested query support |
| D. | None of the mentioned |
| Answer» E. | |
| 6. |
Which is default field terminator for bulk insert in SQL Server ? |
| A. | Comma |
| B. | Full stop |
| C. | Parenthesis |
| D. | Brackets |
| Answer» B. Full stop | |
| 7. |
_______ parameter specifies the number of rows in a batch in bulk insert script. |
| A. | KEEPNULLS |
| B. | KEEPIDENTITY |
| C. | FIRE_TRIGGERS |
| D. | None of the mentioned |
| Answer» E. | |
| 8. |
_________ does not allow bulk export operation in SQL Server. |
| A. | INSERT … SELECT |
| B. | DELETE |
| C. | UPDATE |
| D. | None of the mentioned |
| Answer» B. DELETE | |
| 9. |
_____________ is time based SQL injection attack. |
| A. | Quick detection |
| B. | Initial Exploitation |
| C. | Blind SQL Injection |
| D. | Inline Comments |
| Answer» D. Inline Comments | |
| 10. |
Which of the following script is an example of Quick detection in SQL injection attack? |
| A. | SELECT loginame FROM master..sysprocesses WHERE spid = @@SPID |
| B. | For integer inputs : convert(int,@@version) |
| C. | IF condition true-part ELSE false-part (S) |
| D. | SELECT header, txt FROM news UNION ALL SELECT name, pass FROM members |
| Answer» C. IF condition true-part ELSE false-part (S) | |
| 11. |
If xp_cmdshell has been disabled with sp_dropextendedproc, we can simply inject the following code: |
| A. | sp_addextendedproc ‘xp_cmdshell’,’xp_log70.dll’ |
| B. | sp_addproc ‘xp_cmdshell’,’xp_log70.dll’ |
| C. | sp_addextendedproc ‘xp_cmdshell’,’log70.dll’ |
| D. | None of the mentioned |
| Answer» B. sp_addproc ‘xp_cmdshell’,’xp_log70.dll’ | |
| 12. |
Which of the following is a disadvantage of dynamic SQL ? |
| A. | Stored procedure can not cache the execution plan for this dynamic query |
| B. | Stored procedure can cache the execution plan for this dynamic query |
| C. | Flexibility in your code that you can not get with standard SQL |
| D. | All of the mentioned |
| Answer» B. Stored procedure can cache the execution plan for this dynamic query | |
| 13. |
Which of the stored procedure used for dynamic SQL is prone to attacks ? |
| A. | xp_executesql |
| B. | executesql |
| C. | sp_execute |
| D. | sp_executesql |
| Answer» E. | |
| 14. |
The basic syntax for using EXECUTE command: |
| A. | SP_EXECUTE(@SQLStatement) |
| B. | EXEC_SQL(@SQLStatement) |
| C. | EXECUTE(@SQLStatement) |
| D. | All of the mentioned |
| Answer» D. All of the mentioned | |
| 15. |
The Dynamic SQL Queries in a variable are __________ until they are executed. |
| A. | Compiled |
| B. | Parsed |
| C. | Checked for errors |
| D. | All of the mentioned |
| Answer» E. | |
| 16. |
___________ triggers do not create the special inserted and deleted tables. |
| A. | DML |
| B. | CLR |
| C. | DDL |
| D. | All of the mentioned |
| Answer» D. All of the mentioned | |
| 17. |
Scope of DDL triggers in SQL Server can be : |
| A. | Server |
| B. | Client |
| C. | Views |
| D. | None of the mentioned |
| Answer» B. Client | |
| 18. |
___________ is special type of trigger based on CLR environment. |
| A. | DML |
| B. | DDL |
| C. | LOGON |
| D. | CLR |
| Answer» E. | |
| 19. |
Triggers can be enabled or disabled with the ________ statement. |
| A. | ALTER TABLE statement |
| B. | DROP TABLE statement |
| C. | DELETE TABLE statement |
| D. | None of the mentioned |
| Answer» B. DROP TABLE statement | |
| 20. |
Triggers created with FOR or AFTER keywords is : |
| A. | AFTER |
| B. | INSTEAD OF |
| C. | CLR |
| D. | All of the mentioned |
| Answer» B. INSTEAD OF | |
| 21. |
Which of the following is not a typical trigger action ? |
| A. | Insert |
| B. | Select |
| C. | Delete |
| D. | All of the mentioned |
| Answer» C. Delete | |
| 22. |
How many types of DML triggers are present in SQL Server ? |
| A. | 1 |
| B. | 3 |
| C. | 5 |
| D. | None of of the mentioned |
| Answer» E. | |
| 23. |
The ability to create a user-defined function (UDF) is a new feature added to : |
| A. | SQL Server 6.5 |
| B. | SQL Server 7.0 |
| C. | SQL Server 2000 |
| D. | None of the mentioned |
| Answer» D. None of the mentioned | |
| 24. |
Which of the user defined function will be preferred for adding two numbers ? |
| A. | Scalar |
| B. | Inline table valued |
| C. | Max() |
| D. | Min() |
| Answer» B. Inline table valued | |
| 25. |
UDFs in SQL Server is composed of _______ parts . |
| A. | 1 |
| B. | 2 |
| C. | 3 |
| D. | 4 |
| Answer» C. 3 | |
| 26. |
Which of the following is not a limitation of user defined function ? |
| A. | User-defined functions cannot call a stored procedure, but can call an extended stored procedure |
| B. | User-defined functions cannot make use of dynamic SQL or temp tables. Table variables are allowed |
| C. | SET statements are allowed in a user-defined function |
| D. | The FOR XML clause is not allowed |
| Answer» D. The FOR XML clause is not allowed | |
| 27. |
User defined scalar function can return only __________ data type values. |
| A. | Numerical |
| B. | String |
| C. | Float |
| D. | All of the mentioned |
| Answer» E. | |
| 28. |
Which of the following does not return a table variable? |
| A. | System-defined function |
| B. | Scalar Function |
| C. | Inline Table-Valued Function |
| D. | Multi-Statement Table-Valued Function |
| Answer» C. Inline Table-Valued Function | |
| 29. |
Nesting limit OF stored procedure is up to ________level. |
| A. | 30 |
| B. | 32 |
| C. | 34 |
| D. | 36 |
| Answer» C. 34 | |
| 30. |
Type of procedure that are based on the CLR (Common Language Runtime) is : |
| A. | User Defined Stored Procedure |
| B. | Extended Procedure |
| C. | CLR Stored Procedure |
| D. | System defined Procedure |
| Answer» D. System defined Procedure | |
| 31. |
Extended procedures starts with the __________ prefix. |
| A. | sp_ |
| B. | xp_ |
| C. | clr_ |
| D. | all of the mentioned |
| Answer» B. xp_ | |
| 32. |
Stored procedure used to remember the exact number of bytes is : |
| A. | sp_datatype |
| B. | sp_datatype_info |
| C. | sp_info |
| D. | None of the mentioned |
| Answer» C. sp_info | |
| 33. |
__________ sets procedure options in SQL Server. |
| A. | sp_procoption |
| B. | sp_dropmessage |
| C. | sp_altermessage |
| D. | sp_executesql |
| Answer» B. sp_dropmessage | |
| 34. |
_______ is used to build the code dynamically and execute it. |
| A. | sp_addmessage |
| B. | sp_dropmessage |
| C. | sp_altermessage |
| D. | sp_executesql |
| Answer» E. | |
| 35. |
Which of the following stored procedure is used for error messages ? |
| A. | sp_addmessage |
| B. | sp_dropmessage |
| C. | sp_altermessage |
| D. | All of the mentioned |
| Answer» B. sp_dropmessage | |
| 36. |
_______create the removable database. |
| A. | sp_certify_removable |
| B. | sp_certify |
| C. | sp_removable |
| D. | All of the mentioned |
| Answer» B. sp_certify | |
| 37. |
Which of the following has support for transaction ? |
| A. | sp_monitor |
| B. | sp_bindsession |
| C. | sp_status |
| D. | All of the mentioned |
| Answer» C. sp_status | |
| 38. |
________ takes no parameters and returns all kinds of interesting information. |
| A. | sp_monitor |
| B. | sp_on |
| C. | sp_status |
| D. | None of the mentioned |
| Answer» B. sp_on | |
| 39. |
Reasons for consideration of stored procedure can be: |
| A. | With which tables will you have to work? Does it make sense to create a VIEW first? |
| B. | How often will this procedure actually be used? |
| C. | Do you want to view data in the database (SELECT), insert new records (INSERT INTO), or do I want to change an existing record (UPDATE)? |
| D. | All of the mentioned |
| Answer» E. | |
| 40. |
Reasons for consideration of stored procedure can be : |
| A. | With which tables will you have to work? Does it make sense to create a VIEW first? |
| B. | How often will this procedure actually be used? |
| C. | Do you want to view data in the database (SELECT), insert new records (INSERT INTO), or do I want to change an existing record (UPDATE)? |
| D. | All of the mentioned |
| Answer» E. | |
| 41. |
Nesting level of a stored procedures execution is stored in the _________ function. |
| A. | @@NEST |
| B. | @@NESTLEVEL |
| C. | @@LEVEL |
| D. | None of the mentioned |
| Answer» C. @@LEVEL | |
| 42. |
Nesting level of stored procedure is applicable for : |
| A. | Triggers |
| B. | Views |
| C. | Functions |
| D. | All of the mentioned |
| Answer» E. | |
| 43. |
___________ procedure cannot be created in Resource database. |
| A. | System |
| B. | User defined |
| C. | Extended |
| D. | All of the mentioned |
| Answer» C. Extended | |
| 44. |
Which of the following is extended procedure ? |
| A. | xp_change |
| B. | sp_owner |
| C. | sp_change |
| D. | xp_logininfo |
| Answer» B. sp_owner | |
| 45. |
Which of the following is global variable for error handling ? |
| A. | @@ERRORS |
| B. | @@ERROR |
| C. | @@ERR |
| D. | None of the mentioned |
| Answer» C. @@ERR | |
| 46. |
ERROR_SEVERITY() returns the ________level of the error. |
| A. | State number |
| B. | Full text |
| C. | Severity |
| D. | None of the mentioned |
| Answer» D. None of the mentioned | |
| 47. |
Purpose of TRY…CATCH block in SQL Server is : |
| A. | Error handling |
| B. | Stored Procedure handling |
| C. | Message handling |
| D. | None of the mentioned |
| Answer» B. Stored Procedure handling | |
| 48. |
SQL Server static cursors are always ____ |
| A. | Read-only |
| B. | Write-only |
| C. | Read,Write |
| D. | None of the mentioned |
| Answer» B. Write-only | |
| 49. |
__________ cursor is sensitive to any changes to the data source. |
| A. | Static Cursors |
| B. | Dynamic Cursors |
| C. | Keyset Driven Cursors |
| D. | None of the mentioned |
| Answer» D. None of the mentioned | |
| 50. |
Which of the following blocks are used for error handling in SQL Server ? |
| A. | TRY…CATCH |
| B. | TRY…FINAL |
| C. | TRY…END |
| D. | CATCH…TRY |
| Answer» B. TRY…FINAL | |