Wednesday, June 26, 2013

SQL Server MCQ Test – 2


Que.1. Which feature converts row data to column for better analytical view?
A:    Views
B:    Join
C:    Pivot
D:    Trigger

Right Answer: C

Que.2. Which of the following statements is/are not true for SQL profiler?
A:    enables you to monitor events
B:    check if rows are being inserted properly
C:    check the performance of a stored procedure
D:    ALL

Right Answer: C

Que.3. Which global variables can be used to determine if a transaction is still open?
A:    @@NESTLEVEL
B:    @@FETCH_STATUS
C:    @@TRANCOUNT
D:    @@CONNECTIONS

Right Answer: C

Que.4. Which statement is used to define a cursor?
A:    OPEN
B:    FETCH
C:    DECLARE CURSOR
D:    @@FETCH_STATUS

Right Answer: C

Que.5. What is the default "SORT" order for a SQL?
A:    Ascending
B:    Descending

Right Answer: A

Que.6. Capabilities of RAISERROR
A:    It can be logged in the error log
B:    It can print a message to the application
C:    It can assign an error number, state and severity
D:    a,b and c

Right Answer: D

Que.7. How inserting data through stored procedure do reduces network traffic and increase database performance?
A:    Stored procedure can accept parameter
B:    Permission check is not required
C:    The execution plan is stored in the cache after it was executed the first time.

Right Answer: C

Que.8. Stored procedures are safe from SQL injection attacks
A:    True
B:    False

Right Answer: A

Que.9. Which of the following connection type supports application role permissions and password encryption?
A:    OLE DB
B:    DBLib
C:    ODBC
D:    OLE DB and ODBC

Right Answer: D

Que.10. Cursor that reflects the changes made to the database table even after the result set is returned
A:    Static
B:    Dynamic
C:    FORWARD_ONLY
D:    Keyset

Right Answer: B

Que.11. Which of the following is/are false for RAW mode of FOR XML?
A:    XMLSCHEMA option does not returns an in-line XSD schema.
B:    BINARY BASE32 returns the binary data in base32-encoded format.
C:    Each row in the query result is transformed into an XML element
D:    Both a and b above

Right Answer: D

Que.12. Which statement is correct from partitioned view?
A:    We cannot create an indexed view on a partitioned view
B:    We can create an indexed view on a partitioned view as long as the index is clustered
C:    We can create an indexed view on a partitioned view

Right Answer: C

Que.13. ___________ refers to the ability of the system to recover committed transaction updates if either the system or the storage media fails
A:    Isolation
B:    Atomicity
C:    Consistency
D:    Durability

Right Answer: D

Que.14. Which utilities can we used to export data from sql server to a text file?
A:    DTS export wizard
B:    BCP
C:    ISQL
D:    a and b

Right Answer: D

Que.15. You have a column that will only contain values from 0 to 256. What is the most economical data type to use for the column?
A:    TINYINT
B:    SMALLINT
C:    INT
D:    DECIMAL(1)

Right Answer: B

Que.16. Difference between UNION and UNION ALL.
A:    Both are similar
B:    UNION ALL is no longer supported in sql server 2000 onward
C:    UNION returns only unique records from both tables. UNION ALL returns all records from both tables

Right Answer: C

Que.17. Problems occurs if we don't implement proper locking strategy
A:    Dirty reads
B:    Phantom reads
C:    Lost updates
D:    Unrepeatable reads

Right Answer: D

Que.18. Which of the following statement is used to make sql server resize the database file to its smallest possible size?
A:    DBCC SHRINKFILE
B:    DBCC SHRINKDB
C:    DBCC SQLPERF SHRINKDB

Right Answer: A

Que.19. Which of the following fixed database roles can add or remove user IDs?
A:    db_accessadmin
B:    db_securityadmin
C:    db_setupadmin
D:    db_sysadmin

Right Answer: A

Que.20. By default sql server has ___________ isolation level
A:    READ COMMITTED
B:    READ UNCOMMITTED
C:    SERIALIZABLE
D:    REPEATABLE READ

Right Answer: A

No comments:

Post a Comment