PrepAway - Latest Free Exam Questions & Answers

Category: 70-464 (v.1)

Exam 70-464: Developing Microsoft SQL Server 2012 Databases (update March 5th, 2015)

Which code segment should you use?

###BeginCaseStudy###
Case Study: 3
Scenario 3
Application Information
You have two servers named SQL1 and SQL2. SQL1 has SQL Server 2012 Enterprise
installed. SQL2 has SQL Server 2008 Standard installed.
You have an application that is used to manage employees and office space.
Users report that the application has many errors and is very slow.
You are updating the application to resolve the issues.
You plan to create a new database on SQL1 to support the application. The script that you
plan to use to create the tables for the new database is shown in Tables.sql. The script that
you plan to use to create the stored procedures for the new database is shown in
StoredProcedures.sql. The script that you plan to use to create the indexes for the new
database is shown in Indexes.sql.
A database named DB2 resides on SQL2. DB2 has a table named EmployeeAudit that will
audit changes to a table named Employees.
A stored procedure named usp_UpdateEmployeeName will be executed only by other stored
procedures. The stored procedures executing usp_UpdateEmp!oyeeName will always handle
transactions.
A stored procedure named usp_SelectEmployeesByName will be used to retrieve the names
of employees. Usp_SelectEmployeesByName can read uncommitted data.
A stored procedure named usp_GetFutureOfficeAssignments will be used to retrieve office
assignments that will occur in the future.
StoredProcedures.sql

Indexes.sql

Tables.sql

###EndCaseStudy###

You need to add a new column named Confirmed to the Employees table. The solution must
meet the following requirements:
Have a default value of TRUE.
Minimize the amount of disk space used.
Which code segment should you use?

Which code segment should you use?

###BeginCaseStudy###
Case Study: 3
Scenario 3
Application Information
You have two servers named SQL1 and SQL2. SQL1 has SQL Server 2012 Enterprise
installed. SQL2 has SQL Server 2008 Standard installed.
You have an application that is used to manage employees and office space.
Users report that the application has many errors and is very slow.
You are updating the application to resolve the issues.
You plan to create a new database on SQL1 to support the application. The script that you
plan to use to create the tables for the new database is shown in Tables.sql. The script that
you plan to use to create the stored procedures for the new database is shown in
StoredProcedures.sql. The script that you plan to use to create the indexes for the new
database is shown in Indexes.sql.
A database named DB2 resides on SQL2. DB2 has a table named EmployeeAudit that will
audit changes to a table named Employees.
A stored procedure named usp_UpdateEmployeeName will be executed only by other stored
procedures. The stored procedures executing usp_UpdateEmp!oyeeName will always handle
transactions.
A stored procedure named usp_SelectEmployeesByName will be used to retrieve the names
of employees. Usp_SelectEmployeesByName can read uncommitted data.
A stored procedure named usp_GetFutureOfficeAssignments will be used to retrieve office
assignments that will occur in the future.
StoredProcedures.sql

Indexes.sql

Tables.sql

###EndCaseStudy###

You need to create the object used by the parameter of usp_UpdateEmployeeName.
Which code segment should you use?

Which code segment or segments should you add at line 27 of Tables.sql?

###BeginCaseStudy###
Case Study: 3
Scenario 3
Application Information
You have two servers named SQL1 and SQL2. SQL1 has SQL Server 2012 Enterprise
installed. SQL2 has SQL Server 2008 Standard installed.
You have an application that is used to manage employees and office space.
Users report that the application has many errors and is very slow.
You are updating the application to resolve the issues.
You plan to create a new database on SQL1 to support the application. The script that you
plan to use to create the tables for the new database is shown in Tables.sql. The script that
you plan to use to create the stored procedures for the new database is shown in
StoredProcedures.sql. The script that you plan to use to create the indexes for the new
database is shown in Indexes.sql.
A database named DB2 resides on SQL2. DB2 has a table named EmployeeAudit that will
audit changes to a table named Employees.
A stored procedure named usp_UpdateEmployeeName will be executed only by other stored
procedures. The stored procedures executing usp_UpdateEmp!oyeeName will always handle
transactions.
A stored procedure named usp_SelectEmployeesByName will be used to retrieve the names
of employees. Usp_SelectEmployeesByName can read uncommitted data.
A stored procedure named usp_GetFutureOfficeAssignments will be used to retrieve office
assignments that will occur in the future.
StoredProcedures.sql

Indexes.sql

Tables.sql

###EndCaseStudy###

You need to provide referential integrity between the Offices table and Employees table.
Which code segment or segments should you add at line 27 of Tables.sql? (Each correct
answer presents part of the solution. Choose all that apply.)

What should you add to usp_SelectEmployeesByName?

###BeginCaseStudy###
Case Study: 3
Scenario 3
Application Information
You have two servers named SQL1 and SQL2. SQL1 has SQL Server 2012 Enterprise
installed. SQL2 has SQL Server 2008 Standard installed.
You have an application that is used to manage employees and office space.
Users report that the application has many errors and is very slow.
You are updating the application to resolve the issues.
You plan to create a new database on SQL1 to support the application. The script that you
plan to use to create the tables for the new database is shown in Tables.sql. The script that
you plan to use to create the stored procedures for the new database is shown in
StoredProcedures.sql. The script that you plan to use to create the indexes for the new
database is shown in Indexes.sql.
A database named DB2 resides on SQL2. DB2 has a table named EmployeeAudit that will
audit changes to a table named Employees.
A stored procedure named usp_UpdateEmployeeName will be executed only by other stored
procedures. The stored procedures executing usp_UpdateEmp!oyeeName will always handle
transactions.
A stored procedure named usp_SelectEmployeesByName will be used to retrieve the names
of employees. Usp_SelectEmployeesByName can read uncommitted data.
A stored procedure named usp_GetFutureOfficeAssignments will be used to retrieve office
assignments that will occur in the future.
StoredProcedures.sql

Indexes.sql

Tables.sql

###EndCaseStudy###

You need to modify usp_SelectEmployeesByName to support server-side paging. The
solution must minimize the amount of development effort required.
What should you add to usp_SelectEmployeesByName?

Which code segment should you use to define the ProductDetails column?

###BeginCaseStudy###
Case Study: 4
Scenario 4
Application Information
You are a database administrator for a manufacturing company.
You have an application that stores product data. The data will be converted to technical
diagrams for the manufacturing process.
The product details are stored in XML format. Each XML must contain only one product that
has a root element named Product. A schema named Production.ProductSchema has been
created for the products xml.
You develop a Microsoft .NET Framework assembly named ProcessProducts.dll that will be
used to convert the XML files to diagrams. The diagrams will be stored in the database as

images. ProcessProducts.dll contains one class named ProcessProduct that has a method
name of Convert(). ProcessProducts.dll was created by using a source code file named
ProcessProduct.es.
All of the files are located in C:\Products\.
The application has several performance and security issues.
You will create a new database named ProductsDB on a new server that has SQL Server
2012 installed. ProductsDB will support the application.
The following graphic shows the planned tables for ProductsDB:

You will also add a sequence named Production.ProductID_Seq.
You plan to create two certificates named DBCert and ProductsCert. You will create
ProductsCert in master. You will create DBCert in ProductsDB.
You have an application that executes dynamic T-SQL statements against ProductsDB. A
sample of the queries generated by the application appears in Dynamic.sql.
Application Requirements
The planned database has the following requirements:
• All stored procedures must be signed.
• The amount of disk space must be minimized.
• Administrative effort must be minimized at all times.
• The original product details must be stored in the database.
• An XML schema must be used to validate the product details.
• The assembly must be accessible by using T-SQL commands.
• A table-valued function will be created to search products by type.
• Backups must be protected by using the highest level of encryption.
• Dynamic T-SQL statements must be converted to stored procedures.
• Indexes must be optimized periodically based on their fragmentation.
• Manufacturing steps stored in the ManufacturingSteps table must refer to a product by
the sameidentifier used by the Products table.
ProductDetails_Insert.sql

Product, xml
All product types are 11 digits. The first five digits of the product id reference the category of
the product and the remaining six digits are the subcategory of the product.
The following is a sample customer invoice in XML format:

ProductsByProductType.sql

Dynamic.sql

Category FromType.sql

IndexManagement.sql

###EndCaseStudy###

Which code segment should you use to define the ProductDetails column?

Which code segment should you execute?

###BeginCaseStudy###
Case Study: 4
Scenario 4
Application Information
You are a database administrator for a manufacturing company.
You have an application that stores product data. The data will be converted to technical
diagrams for the manufacturing process.
The product details are stored in XML format. Each XML must contain only one product that
has a root element named Product. A schema named Production.ProductSchema has been
created for the products xml.
You develop a Microsoft .NET Framework assembly named ProcessProducts.dll that will be
used to convert the XML files to diagrams. The diagrams will be stored in the database as

images. ProcessProducts.dll contains one class named ProcessProduct that has a method
name of Convert(). ProcessProducts.dll was created by using a source code file named
ProcessProduct.es.
All of the files are located in C:\Products\.
The application has several performance and security issues.
You will create a new database named ProductsDB on a new server that has SQL Server
2012 installed. ProductsDB will support the application.
The following graphic shows the planned tables for ProductsDB:

You will also add a sequence named Production.ProductID_Seq.
You plan to create two certificates named DBCert and ProductsCert. You will create
ProductsCert in master. You will create DBCert in ProductsDB.
You have an application that executes dynamic T-SQL statements against ProductsDB. A
sample of the queries generated by the application appears in Dynamic.sql.
Application Requirements
The planned database has the following requirements:
• All stored procedures must be signed.
• The amount of disk space must be minimized.
• Administrative effort must be minimized at all times.
• The original product details must be stored in the database.
• An XML schema must be used to validate the product details.
• The assembly must be accessible by using T-SQL commands.
• A table-valued function will be created to search products by type.
• Backups must be protected by using the highest level of encryption.
• Dynamic T-SQL statements must be converted to stored procedures.
• Indexes must be optimized periodically based on their fragmentation.
• Manufacturing steps stored in the ManufacturingSteps table must refer to a product by
the sameidentifier used by the Products table.
ProductDetails_Insert.sql

Product, xml
All product types are 11 digits. The first five digits of the product id reference the category of
the product and the remaining six digits are the subcategory of the product.
The following is a sample customer invoice in XML format:

ProductsByProductType.sql

Dynamic.sql

Category FromType.sql

IndexManagement.sql

###EndCaseStudy###

You need to modify Production.ProductDetails_Insert to comply with the application
requirements.
Which code segment should you execute?

Which code segment should you use to complete the function?

###BeginCaseStudy###
Case Study: 4
Scenario 4
Application Information
You are a database administrator for a manufacturing company.
You have an application that stores product data. The data will be converted to technical
diagrams for the manufacturing process.
The product details are stored in XML format. Each XML must contain only one product that
has a root element named Product. A schema named Production.ProductSchema has been
created for the products xml.
You develop a Microsoft .NET Framework assembly named ProcessProducts.dll that will be
used to convert the XML files to diagrams. The diagrams will be stored in the database as

images. ProcessProducts.dll contains one class named ProcessProduct that has a method
name of Convert(). ProcessProducts.dll was created by using a source code file named
ProcessProduct.es.
All of the files are located in C:\Products\.
The application has several performance and security issues.
You will create a new database named ProductsDB on a new server that has SQL Server
2012 installed. ProductsDB will support the application.
The following graphic shows the planned tables for ProductsDB:

You will also add a sequence named Production.ProductID_Seq.
You plan to create two certificates named DBCert and ProductsCert. You will create
ProductsCert in master. You will create DBCert in ProductsDB.
You have an application that executes dynamic T-SQL statements against ProductsDB. A
sample of the queries generated by the application appears in Dynamic.sql.
Application Requirements
The planned database has the following requirements:
• All stored procedures must be signed.
• The amount of disk space must be minimized.
• Administrative effort must be minimized at all times.
• The original product details must be stored in the database.
• An XML schema must be used to validate the product details.
• The assembly must be accessible by using T-SQL commands.
• A table-valued function will be created to search products by type.
• Backups must be protected by using the highest level of encryption.
• Dynamic T-SQL statements must be converted to stored procedures.
• Indexes must be optimized periodically based on their fragmentation.
• Manufacturing steps stored in the ManufacturingSteps table must refer to a product by
the sameidentifier used by the Products table.
ProductDetails_Insert.sql

Product, xml
All product types are 11 digits. The first five digits of the product id reference the category of
the product and the remaining six digits are the subcategory of the product.
The following is a sample customer invoice in XML format:

ProductsByProductType.sql

Dynamic.sql

Category FromType.sql

IndexManagement.sql

###EndCaseStudy###

You need to create a function that will use a SELECT statement in
ProductsByProductType.sql.
Which code segment should you use to complete the function?

Which code segment should you use?

###BeginCaseStudy###
Case Study: 4
Scenario 4
Application Information
You are a database administrator for a manufacturing company.
You have an application that stores product data. The data will be converted to technical
diagrams for the manufacturing process.
The product details are stored in XML format. Each XML must contain only one product that
has a root element named Product. A schema named Production.ProductSchema has been
created for the products xml.
You develop a Microsoft .NET Framework assembly named ProcessProducts.dll that will be
used to convert the XML files to diagrams. The diagrams will be stored in the database as

images. ProcessProducts.dll contains one class named ProcessProduct that has a method
name of Convert(). ProcessProducts.dll was created by using a source code file named
ProcessProduct.es.
All of the files are located in C:\Products\.
The application has several performance and security issues.
You will create a new database named ProductsDB on a new server that has SQL Server
2012 installed. ProductsDB will support the application.
The following graphic shows the planned tables for ProductsDB:

You will also add a sequence named Production.ProductID_Seq.
You plan to create two certificates named DBCert and ProductsCert. You will create
ProductsCert in master. You will create DBCert in ProductsDB.
You have an application that executes dynamic T-SQL statements against ProductsDB. A
sample of the queries generated by the application appears in Dynamic.sql.
Application Requirements
The planned database has the following requirements:
• All stored procedures must be signed.
• The amount of disk space must be minimized.
• Administrative effort must be minimized at all times.
• The original product details must be stored in the database.
• An XML schema must be used to validate the product details.
• The assembly must be accessible by using T-SQL commands.
• A table-valued function will be created to search products by type.
• Backups must be protected by using the highest level of encryption.
• Dynamic T-SQL statements must be converted to stored procedures.
• Indexes must be optimized periodically based on their fragmentation.
• Manufacturing steps stored in the ManufacturingSteps table must refer to a product by
the sameidentifier used by the Products table.
ProductDetails_Insert.sql

Product, xml
All product types are 11 digits. The first five digits of the product id reference the category of
the product and the remaining six digits are the subcategory of the product.
The following is a sample customer invoice in XML format:

ProductsByProductType.sql

Dynamic.sql

Category FromType.sql

IndexManagement.sql

###EndCaseStudy###

An administrator provides a digital certificate named ServerCert.
You need to implement Transparent Data Encryption (TDE) on ProductsDB.
Which code segment should you use?

Which WHILE statement should you use at line 18?

###BeginCaseStudy###
Case Study: 4
Scenario 4
Application Information
You are a database administrator for a manufacturing company.
You have an application that stores product data. The data will be converted to technical
diagrams for the manufacturing process.
The product details are stored in XML format. Each XML must contain only one product that
has a root element named Product. A schema named Production.ProductSchema has been
created for the products xml.
You develop a Microsoft .NET Framework assembly named ProcessProducts.dll that will be
used to convert the XML files to diagrams. The diagrams will be stored in the database as

images. ProcessProducts.dll contains one class named ProcessProduct that has a method
name of Convert(). ProcessProducts.dll was created by using a source code file named
ProcessProduct.es.
All of the files are located in C:\Products\.
The application has several performance and security issues.
You will create a new database named ProductsDB on a new server that has SQL Server
2012 installed. ProductsDB will support the application.
The following graphic shows the planned tables for ProductsDB:

You will also add a sequence named Production.ProductID_Seq.
You plan to create two certificates named DBCert and ProductsCert. You will create
ProductsCert in master. You will create DBCert in ProductsDB.
You have an application that executes dynamic T-SQL statements against ProductsDB. A
sample of the queries generated by the application appears in Dynamic.sql.
Application Requirements
The planned database has the following requirements:
• All stored procedures must be signed.
• The amount of disk space must be minimized.
• Administrative effort must be minimized at all times.
• The original product details must be stored in the database.
• An XML schema must be used to validate the product details.
• The assembly must be accessible by using T-SQL commands.
• A table-valued function will be created to search products by type.
• Backups must be protected by using the highest level of encryption.
• Dynamic T-SQL statements must be converted to stored procedures.
• Indexes must be optimized periodically based on their fragmentation.
• Manufacturing steps stored in the ManufacturingSteps table must refer to a product by
the sameidentifier used by the Products table.
ProductDetails_Insert.sql

Product, xml
All product types are 11 digits. The first five digits of the product id reference the category of
the product and the remaining six digits are the subcategory of the product.
The following is a sample customer invoice in XML format:

ProductsByProductType.sql

Dynamic.sql

Category FromType.sql

IndexManagement.sql

###EndCaseStudy###

You execute IndexManagement.sql and you receive the following error message: “Msg 512,
Level 16, State 1, Line 12
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=
,<, <= , >, > = or when the subquery is used as an expression.”
You need to ensure that IndexManagement.sql executes properly.
Which WHILE statement should you use at line 18?

Which code segment should you use?

###BeginCaseStudy###
Case Study: 4
Scenario 4
Application Information
You are a database administrator for a manufacturing company.
You have an application that stores product data. The data will be converted to technical
diagrams for the manufacturing process.
The product details are stored in XML format. Each XML must contain only one product that
has a root element named Product. A schema named Production.ProductSchema has been
created for the products xml.
You develop a Microsoft .NET Framework assembly named ProcessProducts.dll that will be
used to convert the XML files to diagrams. The diagrams will be stored in the database as

images. ProcessProducts.dll contains one class named ProcessProduct that has a method
name of Convert(). ProcessProducts.dll was created by using a source code file named
ProcessProduct.es.
All of the files are located in C:\Products\.
The application has several performance and security issues.
You will create a new database named ProductsDB on a new server that has SQL Server
2012 installed. ProductsDB will support the application.
The following graphic shows the planned tables for ProductsDB:

You will also add a sequence named Production.ProductID_Seq.
You plan to create two certificates named DBCert and ProductsCert. You will create
ProductsCert in master. You will create DBCert in ProductsDB.
You have an application that executes dynamic T-SQL statements against ProductsDB. A
sample of the queries generated by the application appears in Dynamic.sql.
Application Requirements
The planned database has the following requirements:
• All stored procedures must be signed.
• The amount of disk space must be minimized.
• Administrative effort must be minimized at all times.
• The original product details must be stored in the database.
• An XML schema must be used to validate the product details.
• The assembly must be accessible by using T-SQL commands.
• A table-valued function will be created to search products by type.
• Backups must be protected by using the highest level of encryption.
• Dynamic T-SQL statements must be converted to stored procedures.
• Indexes must be optimized periodically based on their fragmentation.
• Manufacturing steps stored in the ManufacturingSteps table must refer to a product by
the sameidentifier used by the Products table.
ProductDetails_Insert.sql

Product, xml
All product types are 11 digits. The first five digits of the product id reference the category of
the product and the remaining six digits are the subcategory of the product.
The following is a sample customer invoice in XML format:

ProductsByProductType.sql

Dynamic.sql

Category FromType.sql

IndexManagement.sql

###EndCaseStudy###

You are planning the ManufacturingSteps table.
You need to define the ProductID column in the CREATE TABLE statement.
Which code segment should you use?


Page 14 of 18« First...1213141516...Last »