SQL Complete Test 2008

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By MUKESH443
M
MUKESH443
Community Contributor
Quizzes Created: 2 | Total Attempts: 688
| Attempts: 289 | Questions: 73
Please wait...
Question 1 / 73
0 %
0/100
Score 0/100
1.  How many Primary key constraints can be included in a table definition?    

Explanation

In a table definition, only one primary key constraint can be included. The primary key constraint ensures that each row in the table is uniquely identified by a specific column or combination of columns. It is used to enforce data integrity and prevent duplicate or null values in the primary key column(s). Having multiple primary key constraints in a table definition would be redundant and unnecessary.

Submit
Please wait...
About This Quiz
SQL Quizzes & Trivia

This advanced SQL quiz, titled 'sql complete test 2008', evaluates knowledge on XML instances, catalog views, stored procedures, cursors, and triggers. It's designed to assess understanding of complex... see moreSQL features and their practical applications. see less

2. READ COMMITTED is the default isolation level.

Explanation

The statement is true because in most database management systems, including popular ones like Oracle and SQL Server, the default isolation level is READ COMMITTED. This means that each transaction can only see data that has been committed by other transactions, ensuring consistency and preventing dirty reads. However, it is important to note that the default isolation level can be changed by the database administrator if needed.

Submit
3. By default, SQL Server will create one data file and one log file for each newly created database.

Explanation

SQL Server does indeed create one data file and one log file for each newly created database by default. The data file is used to store the actual data within the database, while the log file is used to record all the changes made to the database. This allows for recovery and rollback operations in case of any errors or failures.

Submit
4. What is the default "SORT" order for a SQL?      

Explanation

The default "SORT" order for a SQL is ascending. This means that the data will be sorted in ascending order, from the lowest value to the highest value.

Submit
5. Which of the following below are Compound Operators in sql server 2008          

Explanation

Compound operators are shorthand notations that combine an arithmetic or logical operation with an assignment operation. In SQL Server 2008, the following are compound operators: += (addition and assignment), %= (modulus and assignment), and *= (multiplication and assignment). Therefore, the correct answer is "all of above" as all the given options are compound operators in SQL Server 2008.

Submit
6. Can a clustered index also be a unique index?      

Explanation

A clustered index can also be a unique index because a clustered index determines the physical order of data in a table. This means that each row in the table can have a unique value for the clustered index key. Therefore, by defining a clustered index as unique, it ensures that no two rows in the table can have the same value for the clustered index key.

Submit
7. The SQL Server Agent is a service that lets you configure scheduled tasks and system alerts    

Explanation

The SQL Server Agent is a service that allows users to schedule and automate tasks in SQL Server. It provides functionality for creating jobs, defining schedules, and setting up alerts. With SQL Server Agent, users can schedule tasks such as backups, data imports, and report generation, making it a valuable tool for managing and maintaining SQL Server databases. Therefore, the statement "The SQL Server Agent is a service that lets you configure scheduled tasks and system alerts" is true.

Submit
8.   Difference between UNION and UNION ALL.        

Explanation

The correct answer explains the difference between UNION and UNION ALL. It states that UNION returns only unique records from both tables, while UNION ALL returns all records from both tables. This means that if there are any duplicate records between the two tables, UNION will eliminate them, while UNION ALL will include them in the result. Additionally, the answer mentions that UNION ALL is no longer supported in SQL Server 2000 onward.

Submit
9. SQL Server supports three recovery modes: simple, full and Bulk.

Explanation

SQL Server provides three different recovery models that allow you to specify the way SQL Server manages log files and prepares your enterprise for a disaster. Each of these models represents a different approach to balancing the tradeoff between conserving disk space and providing for granular disaster recovery options. The three disaster recovery models offered by SQL Server are:

1. Simple Recovery Model
2. Full Recovery Model
3. Bulk-logged Recovery Model

Submit
10. Which statement is used to define a cursor?          

Explanation

The correct answer is DECLARE CURSOR. This statement is used to define a cursor in SQL. A cursor is a database object that allows the retrieval and manipulation of data row by row. The DECLARE CURSOR statement is used to specify the query that will be used to populate the cursor, as well as any other options or parameters. Once the cursor is declared, it can be used to fetch data from the result set and perform operations on it.

Submit
11. Problems occurs if we don't implement proper locking strategy            

Explanation

If we don't implement a proper locking strategy, it can lead to various problems such as dirty reads, phantom reads, and lost updates. Dirty reads occur when a transaction reads data that has been modified by another transaction but not yet committed. Phantom reads occur when a transaction reads a set of rows that satisfy a certain condition, but another transaction inserts or deletes rows that also satisfy the same condition, causing the first transaction to see a different set of rows. Lost updates occur when two or more transactions try to update the same data simultaneously, resulting in one transaction's update being overwritten by another. Therefore, implementing a proper locking strategy is crucial to avoid these issues.

Submit
12. The SQL Query Analyzer is the main interface for running SQL queries against your database    

Explanation

The SQL Query Analyzer is indeed the main interface for running SQL queries against a database. It provides a platform for users to write and execute SQL queries, view query results, and analyze query performance. This tool is commonly used by database administrators and developers to interact with the database and retrieve or manipulate data.

Submit
13. With SQL Server, parameters and variables in T-SQL start with the "%" sign.

Explanation

In T-SQL, parameters and variables do not start with the "%" sign. The "%" sign is used as a wildcard character in SQL Server for pattern matching. Parameters and variables in T-SQL are typically declared using the "@" symbol. Therefore, the given statement is incorrect.

Submit
14. Default is a type of constraint although it does not really enforce anything    

Explanation

The statement suggests that default is a type of constraint, but it does not actually enforce any rules or restrictions. This implies that default is more of a default value or setting that is automatically applied when no other value is specified. Therefore, the correct answer is "Yes" to agree with the statement.

Submit
15. The INSTEAD of trigger can be applied to a view and triggered based on the modifications to the view. State True or False.

Explanation

The statement is true. An INSTEAD OF trigger can indeed be applied to a view and it is triggered based on modifications made to the view. This trigger allows the user to specify custom actions to be performed instead of the default actions that would occur when modifying the view. It gives the user more control over the behavior of the view and allows for more complex operations to be performed.

Submit
16. Which type of integrity preserves the defined relationship between tables when records are entered or deleted?          

Explanation

Referential integrity is the type of integrity that preserves the defined relationship between tables when records are entered or deleted. It ensures that any foreign key values in a table reference existing primary key values in another table, thus maintaining the consistency and validity of the data.

Submit
17. How inserting data through stored procedure do reduces network traffic and increase database performance?        

Explanation

When data is inserted through a stored procedure, the execution plan is stored in the cache after it is executed for the first time. This means that subsequent executions of the stored procedure can use the cached execution plan, reducing the need for the database to generate a new plan each time. This reduces network traffic because the execution plan does not need to be sent over the network each time the stored procedure is executed. Additionally, since the execution plan is already stored in the cache, it can be quickly retrieved and executed, improving the overall performance of the database.

Submit
18. Capabilities of RAISERROR        

Explanation

RAISERROR is a Transact-SQL statement used to generate custom error messages. The statement has the capability to log the error message in the error log (option a), print the message to the application (option b), and assign an error number, state, and severity to the error message (option c). Therefore, the correct answer is a, b, and c.

Submit
19. Which of the following statements is/are true for SQL server?            

Explanation

SQL Server has both Logical Architecture and Physical Architecture. This means that it has a logical structure that defines how data is organized and accessed, as well as a physical structure that determines how the data is stored and retrieved from the disk. SQL Server is also a DBMS (Database Management System), which means it is a complete database solution that allows users to create, manage, and manipulate databases. Additionally, SQL Server is compatible with structured query language (SQL) and provides rich support for XML, making it a versatile and powerful tool for database management and data manipulation.

Submit
20. By default sql server has ___________ isolation level        

Explanation

By default, SQL Server has the READ COMMITTED isolation level. This means that each transaction can only see committed data from other transactions. It ensures that dirty reads are not allowed, meaning that a transaction cannot read uncommitted data from another transaction. This isolation level provides a balance between data integrity and concurrency, allowing multiple transactions to access and modify data simultaneously while still maintaining consistency.

Submit
21. Which of the following commands below are used to run a stored procedure?          

Explanation

Both the "EXEC" and "EXECUTE" commands are used to run a stored procedure. The "EXEC" command is a shorthand form of "EXECUTE" and both can be used interchangeably to execute a stored procedure in SQL. Therefore, the correct answer is "Both a and b above".

Submit
22.  Which of the following is a perfect match with reference to an Index?

Explanation

An index is a data structure that allows an application program to efficiently find specific data without having to scan through the entire table. It acts as a roadmap, pointing to the location of the desired data, making searches faster and more efficient. By using an index, the application program can directly access the specific data it needs, rather than having to search through every record in the table. Therefore, the statement "Allows an application program to find specific data without scanning through the entire table" is a perfect match with reference to an index.

Submit
23. SQL Server automatically creates an index on:

Explanation

When a primary key is defined in SQL Server, it automatically creates a clustered index on that column. This is because primary keys are used to uniquely identify each row in a table, and having a clustered index on the primary key helps improve the performance of queries that involve searching, sorting, and joining data based on that key. On the other hand, SQL Server does not automatically create an index on foreign keys, as they are used to establish relationships between tables rather than uniquely identify rows. Therefore, the correct answer is that SQL Server automatically creates an index on primary keys only.

Submit
24. Cursor that reflects the changes made to the database table even after the result set is returned          

Explanation

A dynamic cursor is able to reflect any changes made to the database table even after the result set has been returned. This means that if any modifications are made to the table, such as inserting, updating, or deleting rows, the dynamic cursor will still show the updated data. This is in contrast to a static cursor, which only shows the data as it was when the result set was initially returned. A dynamic cursor provides real-time access to the database table's data, making it a more flexible and responsive option.

Submit
25. How do XML instances work with respect to a computed column?

Explanation

Computed columns in a database can have XML instances as both a source and a type. This means that the values of the computed column can be derived from XML data, and the computed column itself can also be defined as an XML type. This allows for the integration of XML data into the computed column, providing flexibility and versatility in working with XML instances within the database.

Submit
26. Which of the following SQL statement create a sequence SE with starting value as 30 and in increments of 20?

Explanation

The correct answer is "CREATE SEQUENCE SE START WITH 30 INCREMENT BY 20". This statement creates a sequence named SE with a starting value of 30 and increments of 20.

Submit
27.  For which of the following it is ideal to define non-clustered indexes?

Explanation

Non-clustered indexes are ideal for all of the listed options.

- Queries that do not return large result sets benefit from non-clustered indexes as they can improve the query performance by providing a quick lookup to the data.
- Columns that are frequently used in the WHERE clause for exact matches can be efficiently searched using non-clustered indexes.
- Columns with many distinct values can benefit from non-clustered indexes as they allow for faster searching and retrieval of specific values.

Therefore, defining non-clustered indexes is ideal for all of these scenarios.

Submit
28.  You are writing a distributed query to query data from another SQL Server database.  What is the fully qualified naming convention?

Explanation

The correct answer is "linked_server_name.database.owner.table". In a distributed query, the fully qualified naming convention includes the linked server name, followed by the database name, owner (schema) name, and table name. This ensures that the query is executed on the specific server, database, and table specified.

Submit
29. Which statement is used to delete all rows in a table without having the action logged?        

Explanation

The Truncate table statement is used to delete all rows in a table without having the action logged. Unlike the Drop table statement, which permanently removes the table and its data, the Truncate table statement only removes the data within the table, making it a more efficient way to delete all rows without logging each individual deletion. The Delete table statement is not a valid SQL statement.

Submit
30. Consider a table 'employees' and a stored procedure 'sp_process' The following statements are executed: SELECT * from employees EXEC sp_process What is the outcome of the above execution?

Explanation

Both the SELECT statement and the stored procedure sp_process will execute successfully. The SELECT statement will retrieve all the data from the employees table, and the stored procedure sp_process will be executed without any issues.

Submit
31. A transaction attempting to modify data on a row or page on which a shared lock is placed can acquire an update lock on the resource. State True or False.

Explanation

When a transaction has a shared lock on a row or page, it means that it is only reading the data and not modifying it. However, if the transaction wants to modify the data on that same row or page, it can acquire an update lock on the resource. This allows the transaction to transition from a shared lock (read-only) to an update lock (read and write). Therefore, the statement is true.

Submit
32. Which of the following is limitation of INSTEAD of trigger?

Explanation

The correct answer is "All of the listed options". This means that all of the statements mentioned in the options are limitations of INSTEAD of triggers. INSTEAD of triggers do not support recursion, meaning they cannot call themselves within their own execution. Additionally, only one INSTEAD of trigger can be defined for each action on a given table, and a table cannot have an INSTEAD of trigger and a FOREIGN KEY constraint with CASCADE defined for the same action. Therefore, all of these options are limitations of INSTEAD of triggers.

Submit
33. With this type of index, the bottom level of an index does not contain data, but rather it contains pointers to data.

Explanation

A nonclustered index is a type of index where the bottom level does not contain actual data, but instead contains pointers to the data. This means that the index structure is separate from the actual data, allowing for faster retrieval of specific data based on the indexed columns.

Submit
34.  Assume that you have a Database ERP in which there is a field called ERP_NUM which is used in several places.  The column has a specific behavior which is different from the traditional SQL server data types.         Which of the following feature we can use to address the above requirement?

Explanation

A User Defined Type can be used to address the requirement of having a specific behavior for the ERP_NUM field in the Database ERP. User Defined Types allow for the creation of custom data types in SQL Server that can have specific properties and behaviors. By creating a User Defined Type for the ERP_NUM field, we can define its specific behavior and use it in multiple places within the database. This provides a way to ensure consistency and enforce specific rules for the ERP_NUM field throughout the database.

Submit
35. With this type of index, the data are stored in the bottom level of the index and in the same order as that index.

Explanation

In a clustered index, the data is physically stored in the same order as the index. This means that the rows of the table are organized based on the key values of the clustered index. This type of index is efficient for retrieving data in the order specified by the index, as it eliminates the need for additional sorting. It is commonly used on columns that are frequently searched or sorted.

Submit
36. A filtered index is an optimized non-clustered index    

Explanation

A filtered index is a type of non-clustered index that is optimized to improve query performance by including only a subset of rows that meet a specific filter criteria. This allows for more efficient storage and retrieval of data, especially when dealing with large tables. Therefore, the given statement that a filtered index is an optimized non-clustered index is true.

Submit
37. Which of the following databases are created on installing SQL server?       -

Explanation

The databases "master" and "msdb" are created on installing SQL server. The "master" database contains system-level information for the SQL server instance, while the "msdb" database is used by SQL Server Agent for scheduling jobs, managing alerts, and storing backup and restore information. Therefore, the correct answer is "both a and b above".

Submit
38. Choose the incorrect option about the sql server index          

Explanation

not-available-via-ai

Submit
39. How many isolation levels can be active for a user at any point of time?

Explanation

There can only be one isolation level active for a user at any point in time.

Submit
40. Which of the below is the correct syntax for a VIEW?        

Explanation

not-available-via-ai

Submit
41. Nonclustered indexes are faster than clustered indexes for retrieval.

Explanation

Nonclustered indexes are not necessarily faster than clustered indexes for retrieval. The speed of retrieval depends on various factors such as the size of the index, the number of rows in the table, and the specific query being executed. In some cases, a well-designed clustered index can provide faster retrieval times compared to a nonclustered index. Therefore, the statement that nonclustered indexes are always faster than clustered indexes for retrieval is false.

Submit
42. Which of the following is a way to create and modify tables using SQL Server?

Explanation

Both of the two methods mentioned will work for creating and modifying tables using SQL Server. One can write SQL code using either CREATE or ALTER SQL statements to create or modify tables. Additionally, one can also use the graphical facilities of SQL Server Enterprise Manager to perform these tasks.

Submit
43. Which of the following is/are false for RAW mode of FOR XML?   .      

Explanation

The RAW mode of FOR XML in SQL does not return an in-line XSD schema when the XMLSCHEMA option is used. Additionally, each row in the query result is transformed into an XML element. Therefore, both options a and c are false for RAW mode of FOR XML.

Submit
44. . Consider the following scenario: A company ABC has many stored procedures each one querying customer database using multiple conditions. The DBA thinks that having too many stored procedures is bad for maintenance and recommends to reduce the number of procs. Which of the following will be a solution to the above recommendation?

Explanation

Using Dynamic SQL in stored procedures allows for the flexibility to generate and execute SQL statements at runtime. This means that instead of having separate stored procedures for each query condition, a single stored procedure can be used with dynamic SQL to handle multiple conditions. This approach reduces the number of stored procedures needed, making maintenance easier as changes can be made in a single location. Additionally, it allows for more efficient code reuse and can improve performance by minimizing the need for recompilation.

Submit
45. Which of the following DBCC command is used to see when was the last time the index rebuild?          

Explanation

DBCC SHOW_STATISTICS is the correct answer because it is a command used to display statistical information about the distribution of values in an index or column of a table. This includes information about the last time the index was updated or rebuilt.

Submit
46. Which global variables can be used to determine if a transaction is still open?        

Explanation

The global variable @@TRANCOUNT can be used to determine if a transaction is still open. This variable keeps track of the number of active transactions in the current session. If the value of @@TRANCOUNT is greater than 0, it means that there is an open transaction.

Submit
47. ____________ is a set of graphical tools that allows you to transfer data between disparate sources into one or more destinations.          

Explanation

Data Transformation Services is a set of graphical tools that allows you to transfer data between disparate sources into one or more destinations. It provides the capability to extract data from various sources, transform it according to the desired format or structure, and load it into the desired destination. This process helps in integrating and consolidating data from different sources, making it easier to analyze and use for decision-making purposes.

Submit
48. For which of the following is a  two-phase commit, consisting of prepare and commit used?

Explanation

A two-phase commit, consisting of prepare and commit, is used for distributed transactions. Distributed transactions involve multiple databases or systems, where updates need to be synchronized and committed across all the participating systems. The two-phase commit protocol ensures that all the participating systems agree to commit the transaction before it is finalized, and if any system fails to agree, the transaction can be rolled back to maintain consistency across all the systems involved.

Submit
49. Consider the following statements with respect to cursors: Statement 1 :Cursor processing is faster than set-oriented processing and  causes locks to be held for shorter period of time. Statement 2: Cursors can be used to minimize locking contention for updates and deletions of a large number of rows in a table. Which of the following is applicable for above?

Explanation

Cursors are not faster than set-oriented processing, as set-oriented processing is optimized for processing data in bulk. Cursors are used when processing data row by row is necessary. However, Statement 2 is true because cursors can be used to minimize locking contention for updates and deletions of a large number of rows in a table. This is because cursors allow for more granular control over the locking of individual rows.

Submit
50. Remote BLOB storageis a ____________ API which reduces the application building complexity      

Explanation

Remote BLOB storage is a client-side API which reduces the application building complexity. This means that the API is designed to be used on the client-side of an application, rather than on the server-side. By using this API, developers can offload the storage and retrieval of large binary objects (BLOBs) to a remote location, reducing the complexity of their application code and improving performance.

Submit
51. A transaction attempting to modify data on a row or page on which a shared lock is placed can                               acquire an exclusive lock on the resource. State True or False.  

Explanation

False. A transaction attempting to modify data on a row or page on which a shared lock is placed cannot acquire an exclusive lock on the resource.

Submit
52. Consider the following cursor processing: DECLARE authors_cursor SCROLL FOR SELECT au_lname, au_fname FROM authors ORDER BY au_lname, au_fname OPEN authors_cursor FETCH NEXT FROM authors_cursor FETCH ABSOLUTE 20 FROM authors_cursor FETCH RELATIVE 3 FROM authors_cursor FETCH RELATIVE -7 FROM authors_cursor FETCH RELATIVE 7 FROM authors_cursor FETCH FIRST FROM authors_cursor CLOSE authors_cursor DEALLOCATE authors_cursor (Assume that authors table has 200 author profiles)   How many unique rows are retrieved upon executing the above cursor statements?"       

Explanation

The cursor is declared and opened to select the last name and first name of authors from the authors table, ordered by last name and first name. The cursor is then used to fetch rows at different positions using the FETCH statement. The FETCH ABSOLUTE 20 retrieves the row at position 20, the FETCH RELATIVE 3 retrieves the row 3 positions ahead of the current position, the FETCH RELATIVE -7 retrieves the row 7 positions before the current position, and the FETCH RELATIVE 7 retrieves the row 7 positions ahead of the current position. Finally, the FETCH FIRST retrieves the first row. Since there are only four unique positions specified in the FETCH statements, the number of unique rows retrieved is four.

Submit
53. When a SELECT * command is executed on a table, when is the shared lock on the first row released?

Explanation

When a SELECT * command is executed on a table, the shared lock on the first row is released after it is read. This means that the lock is released immediately after the first row is accessed and retrieved by the SELECT statement. The lock is not held for the entire duration of reading all the rows or until the transaction is committed or rolled back.

Submit
54. Which of the following is correct for a shared lock?

Explanation

A shared lock is acquired by a process on a resource for the duration of read. This means that multiple processes can acquire a shared lock on the same resource simultaneously, allowing them to read the resource concurrently. However, a shared lock does not allow the process to modify the resource.

Submit
55.  A transaction attempting to modify data on a row or page on which a shared lock is placed can                               acquire an exclusive lock on the resource. State True or False.

Explanation

When a transaction attempts to modify data on a row or page on which a shared lock is placed, it cannot acquire an exclusive lock on the resource. This is because a shared lock allows multiple transactions to read the data simultaneously, but it restricts any transaction from modifying the data until the shared lock is released. Therefore, the statement is false.

Submit
56. SQL Server AFTER Triggers may be assigned views.

Explanation

not-available-via-ai

Submit
57. What is the purpose of MERGE in sql server 2008?        

Explanation

The purpose of the MERGE statement in SQL Server 2008 is to allow a single statement for INSERT, DELETE, and UPDATE operations on a row based on a condition. This means that the MERGE statement can perform all three operations in one statement, making it more efficient and concise.

Submit
58. 'dbo' stands for database object.

Explanation

The statement "dbo stands for database object" is incorrect. In the context of databases, "dbo" stands for "database owner" and is used to identify the default schema in SQL Server. It does not stand for "database object." Therefore, the correct answer is False.

Submit
59. Is a composite index key always part of a covering index?      

Explanation

A composite index key is not always part of a covering index. A composite index key is formed by combining multiple columns into a single index key, while a covering index is an index that includes all the columns needed to satisfy a query, eliminating the need to access the actual table data. While a composite index key can be part of a covering index, it is not a requirement. A covering index can include any combination of columns that are needed for efficient query execution.

Submit
60.
  With this type of SQL Server cursor concurrency no lock is obtained until the user updates the data.

Explanation

With optimistic concurrency, locks are not obtained until the user updates the data. This means that multiple users can read the same data simultaneously without blocking each other. When a user tries to update the data, the system checks if any other user has made changes since the data was last read. If no changes have been made, the update is allowed. If changes have been made, the update is blocked to prevent conflicts. This approach allows for better performance and scalability in situations where conflicts are rare.

Submit
61.  Consider the following scenario: The creator of a stored procedure also owns the tables that it references. Statement 1: An user can execute the stored procedure but cannot access the referenced table unless the creator grants access to the table Statement 2: An user can execute the stored procedure and inherits the rights on the referenced table from the owner within the context of the stored procedure Which of the following is applicable for the above?

Explanation

An user can execute the stored procedure and inherits the rights on the referenced table from the owner within the context of the stored procedure. This means that the user does not need explicit access granted to the table, as they will have the necessary rights to access it while executing the stored procedure. Therefore, Statement 2 is true. However, Statement 1 is false because the user can access the referenced table without the creator granting access.

Submit
62. Which of the following is used to locate specific content and elements within an XML document?

Explanation

not-available-via-ai

Submit
63.  Referential integrity can be enforced by using DML triggers. Which of the following are other methods by which the same enforcement can be achieved?(Choose 2)

Explanation

Referential integrity can be enforced by using stored procedures because they allow the database to perform specific actions whenever data is inserted, updated, or deleted. By including logic in the stored procedures, the database can ensure that any changes made to the data maintain the integrity of the relationships between tables.

Defining foreign key constraints is another method to enforce referential integrity. Foreign key constraints ensure that values in a column of one table match the values in a primary key column of another table. This ensures that any changes made to the data maintain the integrity of the relationships between tables.

Submit
64. Which statement is correct from partitioned view?        

Explanation

not-available-via-ai

Submit
65. Sham has to convert the rows of the 'Employee' table to a xml file, adhering to the following rules : 1.The values in each row should be the property of the 'row' tag 2.Create another file in which the column name must be the tag name for each value 3.Root tag must have the name as 'ROOT' and each and every row must start with the tag name 'ROW' 4.Root tag must have a property specifying the xml Namespace Which of the following query is the correct one for the rule 3?

Explanation

The correct answer is "SELECT * FROM EMPLOYEE ORDER BY EMPNAME FOR XML RAW,ELEMENTS ROOT('ROOT')". This query retrieves all the rows from the 'Employee' table, orders them by the employee name, and formats the result as an XML file. The FOR XML RAW clause specifies that each row should be represented as an XML element, and the ELEMENTS clause indicates that the column names should be used as the tag names for each value. The ROOT('ROOT') clause sets the root tag name as 'ROOT', as required by the rule.

Submit
66. The ______________ database is a system database which is used as a template whenever a new database is created.        

Explanation

The master database is a system database that serves as a template for creating new databases. It contains the system-level information for the SQL Server instance and is used to control the behavior of all other databases. When a new database is created, it inherits certain properties and settings from the master database. Therefore, the correct answer is "master".

Submit
67. Which of the following refers to the SQL Server transaction isolation level which places and holds locks on all rows that are read?

Explanation

The REPEATABLE READ isolation level in SQL Server ensures that any rows read during a transaction are locked, preventing other transactions from modifying or deleting them until the current transaction is completed. This guarantees that the data read by the transaction remains consistent throughout the transaction, even if other transactions make changes to the data.

Submit
68. Which of the following fixed server roles can manage linked servers?

Explanation

The setupadmin fixed server role can manage linked servers. This role is responsible for managing the configuration of the server and has the necessary permissions to create and manage linked servers. The other fixed server roles listed do not have the required permissions to manage linked servers.

Submit
69. Declarative Management Framework is a system for managing the ___________ of SQL Server 2008            

Explanation

The Declarative Management Framework is a system for managing the instances of SQL Server 2008. It provides a set of tools and features that allow administrators to define and enforce policies for SQL Server instances, ensuring that they are configured and maintained according to best practices. This includes managing security, performance, and other aspects of the SQL Server instances.

Submit
70.  Which of the following are correct for indexed views?(Choose 2)

Explanation

An indexed view is any view that has a clustered index defined on it. This means that the view has a physical structure that allows for faster data retrieval and improved query performance. Indexed views aid in optimizing performance by precomputing and storing the results of complex queries, reducing the need for expensive join operations and aggregations.

Submit
71. A database schema is a way to logically group objects such as tables,rows, views, stored procedures etc.      

Explanation

The given answer is false because a database schema is not a way to logically group objects such as tables, rows, views, stored procedures, etc. Instead, a database schema is a collection of database objects, including tables, views, and constraints, that are logically grouped together. It is a way to organize and define the structure, relationships, and constraints of a database.

Submit
72. Which type of SQL Server cursor concurrency places an update lock on a row when the row is read?

Explanation

The READCOMMITTED concurrency type in SQL Server cursor places an update lock on a row when the row is read. This means that other transactions can still read the row, but they cannot modify it until the lock is released. This ensures that the data being read is consistent and prevents dirty reads.

Submit
73. Why the catalogs views are the preferred choice for accesing the information in system catalogs? (choose 3)

Explanation

Catalog views are the preferred choice for accessing information in system catalogs because they have descriptive names for both the views and their columns. Additionally, the metadata information is presented in a fixed format that is easy to understand as it is dependent on system tables. Catalog views also provide the most direct way to obtain, transform, and represent customized forms of the catalog metadata. Lastly, they provide access to all the metadata, making them a comprehensive option for accessing information in system catalogs.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 17, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 17, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jan 16, 2012
    Quiz Created by
    MUKESH443
Cancel
  • All
    All (73)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
 How many Primary key constraints can be included in a table...
READ COMMITTED is the default isolation level.
By default, SQL Server will create one data file and one log file for...
What is the default "SORT" order for a SQL?...
Which of the following below are Compound Operators in sql server 2008...
Can a clustered index also be a unique index?...
The SQL Server Agent is a service that lets you configure scheduled...
 ...
SQL Server supports three recovery modes: simple, full and Bulk.
Which statement is used to define a cursor?...
Problems occurs if we don't implement proper locking strategy...
The SQL Query Analyzer is the main interface for running SQL queries...
With SQL Server, parameters and variables in T-SQL start with the...
Default is a type of constraint although it does not really enforce...
The INSTEAD of trigger can be applied to a view and triggered based on...
Which type of integrity preserves the defined relationship between...
How inserting data through stored procedure do reduces network traffic...
Capabilities of RAISERROR        
Which of the following statements is/are true for SQL server?...
By default sql server has ___________ isolation level...
Which of the following commands below are used to run a stored...
 Which of the following is a perfect match with reference to an...
SQL Server automatically creates an index on:
Cursor that reflects the changes made to the database table even after...
How do XML instances work with respect to a computed column?
Which of the following SQL statement create a sequence SE with...
 For which of the following it is ideal to define non-clustered...
 You are writing a distributed query to query data from another...
Which statement is used to delete all rows in a table without having...
Consider a table 'employees' and a stored procedure...
A transaction attempting to modify data on a row or page on which a...
Which of the following is limitation of INSTEAD of trigger?
With this type of index, the bottom level of an index does not contain...
 Assume that you have a Database ERP in which there is a field...
With this type of index, the data are stored in the bottom level of...
A filtered index is an optimized non-clustered index    
Which of the following databases are created on installing SQL server?...
Choose the incorrect option about the sql server index...
How many isolation levels can be active for a user at any point of...
Which of the below is the correct syntax for a VIEW?...
Nonclustered indexes are faster than clustered indexes for retrieval.
Which of the following is a way to create and modify tables using SQL...
Which of the following is/are false for RAW mode of FOR XML?...
. Consider the following scenario:...
Which of the following DBCC command is used to see when was the last...
Which global variables can be used to determine if a transaction is...
____________ is a set of graphical tools that allows you to transfer...
For which of the following is a  two-phase commit, consisting of...
Consider the following statements with respect to cursors:...
Remote BLOB storageis a ____________ API which reduces the application...
A transaction attempting to modify data on a row or page on which a...
Consider the following cursor processing:...
When a SELECT * command is executed on a table, when is the shared...
Which of the following is correct for a shared lock?
 A transaction attempting to modify data on a row or page on...
SQL Server AFTER Triggers may be assigned views.
What is the purpose of MERGE in sql server 2008?...
'dbo' stands for database object.
Is a composite index key always part of a covering index?...
 ...
 Consider the following scenario:...
Which of the following is used to locate specific content and elements...
 Referential integrity can be enforced by using DML triggers....
Which statement is correct from partitioned view?...
Sham has to convert the rows of the 'Employee' table to a xml...
The ______________ database is a system database which is used as a...
Which of the following refers to the SQL Server transaction isolation...
Which of the following fixed server roles can manage linked servers?
Declarative Management Framework is a system for managing the...
 Which of the following are correct for indexed views?(Choose 2)
A database schema is a way to logically group objects such as...
Which type of SQL Server cursor concurrency places an update lock on a...
Why the catalogs views are the preferred choice for accesing the...
Alert!

Advertisement