Online Test Knowledge of SQL Server 2008 Skills

Online Test Knowledge of SQL Server 2008 Skills


  1. 5 seconds
  2. 8 seconds
  3. 10 seconds
  4. 15 seconds
  5. 1 minute
Answer: Answer is b

1. ALTER permission on the database.
2. CONTROL permission in the database.
3. ALTER ANY SCHEMA permission and CREATE XML SCHEMA COLLECTION permission in the database
Which of the above permissions is/are required to create an XML SCHEMA COLLECTION?
  1. 1 and 2
  2. 2 and 3
  3. 1 and 3
  4. 1 or 2 or 3
  5. 1 and 2 and 3
Answer: Answer is e
Further Reading:

  1. True
  2. False
Answer: Answer is a
Further Reading:

  1. Sqlinst
  2. Sqlcmd
  3. Sqlexpress
  4. sqldef
Answer: Answer is c
Further Reading:

  1. CASCADE
  2. DELETE
  3. SET NULL
  4. SET DEFAULT
Answer: Answer is b

  1. –p
  2. –P
  3. –z
  4. -Z
Answer: Answer is d
Further Reading:
Useful resources, sqlcmd Utility

  1. Only SELECT
  2. Only SELECT and INSERT
  3. Only SELECT, INSERT, UPDATE, DELETE
  4. Only SELECT, INSERT, UPDATE, MERGE, DELETE
Answer: Answer is d
Further Reading:
Useful resources, TOP

  1. 58
  2. 116
  3. 128
  4. 512
Answer: Answer is b
Further Reading:
The complete name for a stored procedure or a global temporary stored procedure, including ##, cannot exceed 128 characters. The complete name for a local temporary stored procedure, including #, cannot exceed 116 characters. Useful resources, CREATE PROCEDURE

  1. ALTER DATABASE DROP ENCRYPTION KEY
  2. DROP DATABASE ENCRYPTION KEY
  3. ALTER DATABASE REMOVE ENCRYPTION KEY
  4. REMOVE DATABASE ENCRYPTION KEY
Answer: Answer is b
Further Reading:

  1. ALTER Resource Governor Enable
  2. ALTER Resource Governor Reconfigure
  3. ALTER Resource Governor Set
  4. None of the above
Answer: Answer is b
Further Reading:
Useful resources, ALTER RESOURCE GOVERNOR


  1. ALTER INDEX Index_Product ON Table1 WITH ( DATA_COMPRESSION = PAGE ) GO
  2. ALTER INDEX Index_Product ON Table1 SET ( DATA_COMPRESSION = PAGE ) GO
  3. ALTER INDEX Index_Product ON Table1 REBUILD WITH ( DATA_COMPRESSION = PAGE ) GO
  4. ALTER INDEX Index_Product ON Table1 REBUILD SET ( DATA_COMPRESSION = PAGE ) GO
Answer: Answer is c
Further Reading:

USE Person 
GO 
DECLARE @p AS int 
SELECT @p=10 
SELECT TOP(@p) 
FROM Employee 
GO 
What Will be the output of the above code?
  1. No output is displayed.
  2. A list of first 10 employees is displayed from the Person database.
  3. An incorrect syntax error is displayed.
  4. None of the above.
Answer: Answer is c

  1. Data Compression
  2. Resource Governor
  3. Policy-Based Management
  4. Auditing
Answer: Answer is c
Further Reading:
Policy-Based Management enables the efficient management of multiple SQL Server instances from a single location. It is easy to create policies that control security, database options, object naming conventions, and other settings at a highly granular level. Such policies can evaluate servers for compliance with a set of predefined conditions and help prevent undesirable. Useful resources, Why SQL Server May Be More Suitable For You

  1. ON
  2. OFF
  3. TRUE
  4. FALSE
Answer: Answer is b
Further Reading:
Useful resources, Create Index (Transact-SQL)

  1. DELETE To
  2. MERGE To
  3. CREATE INDEX To
  4. INSERT To
  5. UPDATE To
Answer: Answer is a, d, e

  1. Transact-SQL can be used to SELECT, INSERT, UPDATE, DELETE FILESTREAM data.
  2. The size of the stored data is limited to 2 GB.
  3. You cannot take backup of a database without the FILESTREAM data.
  4. FILESTREAM storage is best used when the BLOB file sizes average 1MB or higher.
Answer: Answer is a, d
Further Reading:
The FILESTREAM data can be accessed and manipulated in two ways – either with the standard Transact-SQL programming model, or via the Win32 streaming APIs. Both mechanisms are fully transaction-aware and support most DML operations including insert, update, delete, and select.BLOBs smaller than 256 kilobytes (KB) are better stored inside a database, and BLOBs larger than 1 megabyte (MB) are best stored outside the database. For those sized between 256 KB and 1 MB, the more efficient storage solution depends on the read vs. write ratio of the data, and the rate of “overwrite”. Storing BLOB data solely within the database (e.g., using the varbinary (max) data type) is limited to 2 gigabytes (GB) per BLOB. Useful resources, FILESTREAM Storage in SQL Server 2008

  1. Tiny Encryption Algorithm
  2. Advanced Encryption Standard(AES)
  3. Blowfish
  4. Triple Data Encryption Standard(3DES)
Answer: Answer is b, d
Further Reading:

  1. sp_renamedb oldname,newname
  2. sp_renamedb newname,oldname
  3. sp_dbrename oldname,newname
  4. sp_rename oldname,newname
Answer: Answer is a
Further Reading:

  1. IGNORE_DUP_KEY cannot be set to ON for XML indexes.
  2. IGNORE_DUP_KEY can be set to ON for spatial indexes.
  3. IGNORE_DUP_KEY can be set to ON for filtered indexes.
  4. IGNORE_DUP_KEY can be set to ON for XML indexes.
  5. IGNORE_DUP_KEY cannot be set to ON for indexes created on a view.
Answer: Answer is a, e
Further Reading:
IGNORE_DUP_KEY cannot be set to ON for indexes created on a view, non-unique indexes, XML indexes, spatial indexes, and filtered indexes. Useful resources, Create Index

  1. 0 and 66020
  2. 1 and 65530
  3. 0 and 65534
  4. 1 and 65535
Answer: Answer is c
Further Reading:
The login time-out must be a number between 0 and 65534. Useful resources, ssbdiagnose Utility

  1. ALTER TABLE Production.ProductCost DROP CONSTRAINT PK_Product WITH (ONLINE = ON) GO
  2. ALTER TABLE Production.ProductCostHistory DROP CONSTRAINT PK_Product DROP INDEX Index_Product WITH (ONLINE = ON) GO
  3. DROP INDEX Index_Product ON Production.ProductCostGO
Answer: Answer is c
Further Reading:
Useful resources, Dropping Indexes

  1. Geography
  2. Longitude
  3. Altitude
  4. Geometry
  5. Latitude
Answer: Answer is a, d
Further Reading:
Useful resources, spatial data types

  1. CREATE VIEW permission in database
  2. ALTER permission on schema
  3. CONTROL permission on object
Answer: Answer is a, b
Further Reading:
Create a view requires CREATE VIEW permission in the database and ALTER permission on the schema in which the view is being created.Useful resources, CREATE VIEW

  1. When a table or index is created, data compression is set to NONE, unless otherwise specified.
  2. Nonclustered indexes inherit the compression property of the table
  3. New pages allocated in a heap as part of DML operations will not use PAGE compression until the heap is rebuilt.
  4. When you are compressing indexes, leaf-level pages can be compressed with only page compression.
Answer: Answer is a, c
Further Reading:
Useful resources,Data Compression

  1. System stored procedures
  2. Triggers
  3. SQL DDL syntax
  4. None of the above
Answer: Answer is b

  1. Extensible Key Management
  2. SOAP Security
  3. Hashing
  4. Transparent Data Encryption
Answer: Answer is a, d
Further Reading:
Useful resources, Security

  1. True
  2. False
Answer: Answer is a
Further Reading:
Useful resources,CHECK Constraints

  1. ALTER SERVER AUDIT <audit_name> WITH (ENABLE=TRUE)
  2. ALTER SERVER AUDIT <audit_name> SET (ENABLE=TRUE)
  3. ALTER SERVER AUDIT <audit_name> WITH (STATE=ON)
  4. ALTER SERVER AUDIT <audit_name> SET (STATE=ON)
Answer: Answer is c
Further Reading:
Useful resources, alter server audit

  1. 0000
  2. NULL
  3. 1234
  4. None of the above
Answer: Answer is b
Further Reading:
If the -P option is used at the end of the command prompt without a password sqlcmd uses the default password (NULL). Useful resources, sqlcmd utility

  1. Real
  2. Rowversion
  3. type_var
  4. sql_variant
  5. monetary
Answer: Answer is d
Further Reading:
Useful resources, sql_variant



  1. The number of columns must be same in all queries.
  2. The order of columns must be same in all queries.
  3. The data types of the columns of the queries must be compatible.
  4. There should be at least one common column in the tables which are part of the UNION operation.
Answer: Answer is a, b, c
Further Reading:
Useful resources, union

  1. True
  2. False
Answer: Answer is a
Further Reading:
Windows Security log can be specified as a target for Audit (starting with the Windows Server® 2003 operating system).Useful resources,Auditing in SQL Server 2008

  1. 4 digits
  2. 6 digits
  3. 8 digits
  4. 10 digits
Answer: Answer is d
Further Reading:
Useful resources, date data type

  1. 00:00:00.0000000 through 23:59:59.9999999
  2. 00:00:00.0000000 through 24:00:00.0000000
  3. 00:00:00.0000000 through 23:59:00.0000000
  4. 00:00:00.0000000 through 23:59:59.0000000
Answer: Answer is a
Further Reading:
Useful resources, time

  1. On demand
  2. On change: prevent
  3. On change: log only
  4. On schedule
Answer: Answer is a
Further Reading:
Useful resources,Policy-Based Management

  1. Server Audit object
  2. Server Audit Specification object
  3. Database Audit Specification object
Answer: Answer is a
Further Reading:
Useful resources,Auditing in SQL Server 2008

  1. Windows Authentication
  2. SQL Server Authentication
  3. IIS Authentication
  4. Digest Authentication
Answer: Answer is a
Further Reading:
Windows Authentication is the default authentication mode for sqlcmd. To use SQL Server Authentication, you must specify a user name and password by using the -U and -P options. Useful resources,Start the sqlcmd Utilitysqlcmd utility

Operation: e1 / e2
  1. p1 - s1 + s2 + max(6, s1 + p2 + 1)
  2. max(s1, s2) + max(p1 - s1, p2 - s2) + 1
  3. p1 + p2 + 1
Answer: Answer is a
Further Reading:

  1. Clustered
  2. Nonclustered
  3. None of the above
Answer: Answer is a
Further Reading:

  1. Integer
  2. Binary
  3. Decimal
  4. Hexadecimal
Answer: Answer is a, d
Further Reading:
language_term can be specified as a string, integer, or hexadecimal value corresponding to the locale identifier (LCID) of the language Useful resources, alter fulltext stoplist



  1. Image
  2. Text
  3. Nchar
  4. geography
Answer: Answer is c
Further Reading:
Useful resources,sparse

  1. ON
  2. WRITE
  3. PERSISTED
Answer: Answer is c
Further Reading:
The Database Engine uses the PERSISTED keyword in the CREATE TABLE and ALTER TABLE statements to physically store computed columns in the table. Useful resources, computed columns

  1. One-to-one
  2. One-to-many
  3. Many-to-one
  4. Many-to-many
Answer: Answer is a
Further Reading:
Useful resources, Auditing in SQL Server 2008

  1. Multiple UNIQUE constraints can be defined on a table.
  2. When using the UNIQUE constraint, only one null value is allowed per column.
  3. UNIQUE constraint cannot be referenced by a FOREIGN KEY constraint
Answer: Answer is c
Further Reading:
Useful resources,Unique Constraints

  1. Text
  2. Int
  3. Varchar
  4. bigint
Answer: Answer is a, c
Further Reading:
Useful resources, collate

  1. 50
  2. 75
  3. 100
  4. 150
  5. 200
Answer: Answer is c
Further Reading:
Useful resources,resource pool

  1. 16
  2. 18
  3. 38
  4. 48
Answer: Answer is c

  1. SELECT Column1 + Column2 FROM Table GROUP BY Column1, Column2
  2. SELECT Column1, Column2 FROM Table GROUP BY Column1 + Column2
  3. SELECT Column1 + constant + Column2 FROM Table GROUP BY Column1 + Column2
  4. SELECT Column1 + Column2 FROM Table GROUP BY Column1 + Column2
Answer: Answer is a, d
Further Reading:
Useful resources,GROUP BY

  1. The server blocks any new activity to be performed to the SQL Server instance.
  2. Audit events are buffered in memory until they can be flushed to the target.
  3. The audit is automatically disabled
  4. An error is displayed.
Answer: Answer is b
Further Reading:
Useful resources, Auditing in SQL Server 2008

  1. 5 digits
  2. 6 digits
  3. 7 digits
  4. 10 digits
Answer: Answer is c
Further Reading:
Useful resources, time


  1. DEFAULT
  2. CONTENT
  3. DOCUMENT
  4. FILESTREAM
Answer: Answer is b
Further Reading:
Useful resources, columns

SELECT Name FROM person.employees WHERE Name LIKE '[_]n' GO 
Which of the following values will be returned by the above code?
  1. In
  2. Sin
  3. _n
  4. All of the above
Answer: Answer is a
Further Reading:
Useful resources, LIKE

  1. core.sp_delete_data
  2. core.sp_purge_data
  3. core.sp_remove_data
  4. None of the above
Answer: Answer is b
Further Reading:
Useful resources, Managing Data Collection

DBCC CHECKIDENT ('table_name', RESEED, new_reseed_value)
  1. It checks the current iDentity fielD value of the specifieD table.
  2. It sets the identity field value to the new reseed value.
  3. It sets the identity field value to 1.
  4. All of the above.
Answer: Answer is a, b
Further Reading:
Useful resources, DBCC CHECKIDENT

  1. n (n= number of expressions in the element list passed to CUBE)
  2. n+1 (n= number of expressions in the element list passed to CUBE)
  3. 2^n (n= number of expressions in the element list passed to CUBE)
  4. 2^n+1 (n= number of expressions in the element list passed to CUBE)
Answer: Answer is c
Further Reading:
Useful resources, GROUP BY

  1. 1 to 116
  2. 1 to 127
  3. 1 to 128
  4. 1 to 512
Answer: Answer is c
Further Reading:
Useful resources, Identifiers

  1. ABCD
  2. ABDC
  3. DCAB
  4. DCBA
Answer: Answer is a

  1. Push, delete
  2. Insert, pop
  3. Put, extract
  4. Push, pop
Answer: Answer is d
Further Reading:
Useful resources, Stack

  1. 15
  2. 20
  3. 50
  4. 100
Answer: Answer is c

  1. Breadth-first search
  2. Depth-first search
Answer: Answer is a


  1. With DDL, you can create and remove tables, schemas, domains, indexes and views.
  2. SELECT, INSERT and UPDATE are DCL commands.
  3. GRANT and REVOKE are DML commands.
  4. COMMIT and ROLLBACK are DCL commands.
Answer: Answer is a

  1. It checks the allocation of all the objects in the specified database.
  2. It checks the structural integrity of all the objects in the specified database.
  3. It checks for consistency in and between system tables in the specified database.
  4. It checks the consistency of disk space allocation structures of a specified database.
Answer: Answer is a, b, d
Further Reading:
DBCC CHECKALLOC - Checks the consistency of disk space allocation structures for a specified database.
DBCC CHECKTABLE- Checks the integrity of all the pages and structures that make up the table or indexed view.
DBCC CHECKCATALOG-Checks for catalog consistency within the specified database. The database must be online.
Useful resources,DBCC CHECKDBDBCC CHECKDB
Share this article :

+ comments + 1 comments

April 1, 2019 at 3:47 PM

Hey, would you mind if I share your blog with my twitter group? There’s a lot of folks that I think would enjoy your content. Please let me know. Thank you.
RPA Course Training in Chennai
AWS Training in Chennai | Best AWS Training in Chennai
Data Science Training in Chennai | Best Data Science Training in Chennai
No.1 Python Training in Chennai | Best Python Training in Chennai

Post a Comment

 
Copyright © 2014. Mominul's Diary - All Rights Reserved
Developed by Mominul Islam