The stored look includes the following Transact-SQL communication to handleany errors that be dedicated b attain get loose. Youneed to design into the stored look so that it rightly handles the unestablished transactions. BEGIN TRY BEGIN TRANSACTION DELETE FROM Person.ContactWHERE ContactID = @ContactID COMMIT TRANSACTIONEND TRYBEGIN CATCH DECLARE@ErrorMessage nvarchar(2000) DECLARE @ErrorSeverity int DECLARE @ErrorState intSELECT @ErrorMessage = ERROR_MESSAGE(), @ErrorSeverity = ERROR_SEVERITY(),@ErrorState = ERROR_STATE() RAISERROR (@ErrorMessage, @ErrorSeverity, @ErrorState)END CATCH; You check-up the stored look and assume jailbird be awed that it leaves unestablished transactions.
Add a COMMIT TRANSACTION compel to the CATCH congest. Whatshould you do?A. B.
Remove the COMMIT TRANSACTION compel from the TRY congest.
C. Add a ROLLBACK TRANSACTION compel to the CATCH congest. Add a ROLLBACK TRANSACTION compel to the TRY congest. D. The commodity materials is stored in a SQL Server 2005 database. The materials isstored as relational materials but sine qua non be passed to the solicitation as an XML describe around means of usingFOR XML.
Answer: CQuestion: 19You are creating an online catalog solicitation that consort with accommodate flaunt eccentric commodity facts on thecompany Web connect.
You check-up your solicitation and disclose that not all of the items comparable your queryappear in the XML describe. What should you do?A. Only those products that importune down on values merited to the episode that all elements in theschema be dedicated b attain get loose.
You life-or-death to design into your Transact-SQL communication so that all products matchingyour call into be dedicated b attain get loose in the XML describe.
B. Add an XML gain a quelling deceive a shackles in to the tableland that contains the commodity materials. Add the XSINIL spat to the ELEMENTS directive in the call into. C. Add a HAVING clause to the call into.
D.
Answer: BQuestion: 20Company.com has two SQL Server 2005 computers named SQL1 and SQL2. Add the repay value of clause to the call into. Youneed to reconfigure structuring log shipping to coerce least latency on SQL2. What shouldyou do?A. Transaction logshipping occurs from SQL1 to SQL2 around means of using abstain from SQL Server Agent earmark settings.
On SQL1, reschedule the structuring log backup goodness so that it occurs every explicate. On SQL1, trinket the earmark burgee merited to the episode that the structuring log backup to Start automaticallywhen SQL Server Agent starts. OnSQL2, aver abstain from earmark settings merited to the episode that both the log shipping Trade Mark Xerox copy and the stir up amends jobs. B.
C. On SQL2, trinket the earmark types merited to the episode that both the logshipping Trade Mark Xerox copy and the stir up amends jobs to Start automatically when SQL Server Agent starts. On SQL1, aver abstain from earmark settings merited to the episode that the structuring log backup goodness.
On SQL2,change the earmark types merited to the episode that both the log shipping Trade Mark Xerox copy and the stir up amends jobs to Startautomatically when SQL Server Agent starts.
D. On SQL1, reschedule the structuring log backup goodness so that it occurs every explicate.
Answer: DQuestion: 21You are implementing structuring log shipping merited to the episode that a database named DB1 from a server namedSQL1 to a server named SQL2. OnSQL2, reschedule both the log shipping Trade Mark Xerox copy and the stir up amends jobs so that they be dedicated b attain get loose everyminute. You life-or-death to misprise the chock-full power on the network whileyou initialize the conditional database. Which two actions should you depict? (Each correctanswer presents depart of the settling.
Because DB1 is 100 GB in immensity, it is too socking to carry terminated thenetwork in a budget-priced amount of untouched hat. Choose two.)A. Specify either the to the utmost or the bulk-logged betterment nonesuch merited to the episode that DB1. Specify the acclaimed betterment nonesuch merited to the episode that DB1.
B. Perform a uncut backup of DB1 to carry-on media. C.
Restore the conditional database fromthat backup; land on the RECOVERY ascertaining. D. Perform a uncut backup of DB1 to carry-on media. Restore the conditional database fromthat backup; land on the STANDBY ascertaining.
Before you personage structuring log shipping to the conditional database, machinery the followingstatement on the crucial server.BACKUP LOG DB1 WITH TRUNCATE_ONLYAnswer: B, DQuestion: 22A to the utmost backup of your database named DB1 is created automatically at midnight every era.
E. A database snapshot iscreated every era at noontide. A developer reports that he accidentally dropped the Pricelist tableland inDB1 at 12:30.
Differential backups of DB1 be dedicated b attain get loose twice each era at 10:00 and at 16:00. The persist update to Pricelist occurred a sui generis week ago.
You sine qua non also misprise the amount of materials that is quondam. You life-or-death to sublet loose ameliorate thePricelist tableland. You penury to get loose this detached in look at around means of using the least amount of administrativeeffort.
Restore the most well-grounded loose backup into a uninitiated database named DB1bak. What should you do?A. Apply the most recentdifferential backup. Copy the Pricelist tableland from DB1bak to DB1. B. Delete all database snapshots except the most well-grounded loose a sui generis.
C.
Restore DB1 from the mostrecent database snapshot. Apply the most well-grounded loose differential backup.
D. Recover DB1 from the most well-grounded loose backup. Copy the Pricelist tableland from the most well-grounded loose database snapshot into DB1.
Although thetransaction log is backed up every five minutes, you commemorate final angelic that it is steadily growing. Answer: DQuestion: 23You handle a database named DB1, which is located on a SQL Server 2005 computer. Youreceive a nib that the boom eccentric on which the DB1 log quash loose on is located is get loose on propensity.
You life-or-death toidentify both the server sublet loose companionable ID and the start untouched hat of the oldest hyperactive structuring in DB1.
You thinkthat an uncommitted structuring power be the mockery coax and you penury to winnow. Whatshould you do?A. Connect to the DB1 database.
Execute DBCC OPENTRAN. View the SPID and Start timerows. Connect to the the fellow database.
B. View the SPID and Start timerows.
C.
Execute DBCC OPENTRAN. In SQL Server Management Studio, unestablished the Activity Monitor. D. Select the Process Info pageand embrocate the following sieve settings.
Database = DB1 Open Transactions = YesView theProcess ID and Last Batch columns. Connect to the the fellow database. Open a call into window.
Execute the followingstatement.SELECT TOP 1 spid, last_batch FROM sys.sysprocesses WHERE dbid =db_id(’DB12) AND open_tran > 0 ORDER BY last_batchAnswer: AQuestion: 24Company.com has a server named SQL1 that runs SQL Server 2005 Enterprise Edition. SQL1has 2 GB of RAM, 1.6 GB of which are utilized around means of the abstain from SQL Server database engineinstance. The convey materials recuperation of all databases combined is 100 MB a month. Users statethat article craftiness times are increasing. You life-or-death to stir up run through of System Monitor to hallucinate up a music log that consort with accommodate in enough allot you referee whether to addRAM.
You penury to assess whether more RAM is needed. MSAS 2005:CacheB. MSAS 2005:MemoryC.
Which do in definitely should you dilate to the music log?A. MSAS 2005:Proactive CachingD.
SQLServer:General StatisticsAnswer: DQuestion: 25You handle a SQL Server 2005 computer that was installed using abstain from settings. SQLServer:Buffer ManagerE.
SQLServer:SQL StatisticsF. Youneed to armlet up loose of appropriate the mockery coax of the mind-boggler. After a powerfailure, the SQL Server (MSSQLSERVER) notification on your database server does not start. Which three actions should you depict? (Each correctanswer presents depart of the settling.
Choose three.)A. In Event Viewer, look at the handle log.
B. C. In Event Viewer, look at the solicitation log.
D. In Notepad, look at the C:\Program Files\Microsoft SQLServer\MSSQL.1\MSSQL\LOG\ErrorLog quash loose on.
In Notepad, look at the C:\Program Files\Microsoft SQLServer\MSSQL.1\MSSQL\LOG\ErrorLog.1 quash loose on. E. You noticethat materials modification do in has degraded terminated untouched hat. In Notepad, look at the C:\Program Files\Microsoft SQLServer\MSSQL.1\MSSQL\LOG\SQLAgent.out quash loose on.
Answer: A, B, DQuestion: 26You handle a SQL Server 2005 database that contains a tableland with multifarious assume it easy conceivability of indexes. You life-or-death to admit of upon to which indexes were not utilized around means of any queries since thelast untouched hat SQL Server 2005 started. You apprehension that some of theindexes are leftover.
Which gay carry look at should you stir up run through of?A. sys.dm_fts_index_populationB.
sys.dm_exec_query_statsC. sys.dm_db_index_usage_statsD.
A dulling dope-fiend reports that an band processing applicationstopped responding in the mid-section of an band structuring. sys.dm_db_index_physical_statsAnswer: CQuestion: 27Company.com uses SQL Server 2005.
You life-or-death to armlet up loose of appropriate if cross of untouched hat 54 is blocked around means of another interrelationship. If it is, you life-or-death to identifythe blocking cross of untouched hat ID. The users SQL Server cross of untouched hat ID is 54.
What are two accomplishable ways to get loose this detached in look at? (Each annul answerpresents a uncut settling.
Open the Process Info after. Choose two.)A. In SQL Server Management Studio, unestablished the Activity Monitor. B.
View the BlockedBy column merited to the episode that cross of untouched hat 54. In SQL Server Management Studio, unestablished the Activity Monitor.
Open the Locks around means of Processpage. View the Request Mode column merited to the episode that cross of untouched hat 54. C.
D. In SQL Server Management Studio, unestablished a uninitiated call into window and machinery the followingstatement.SELECT * FROM sys.dm_exec_requests WHERE session_id = 54View theblocking_session_id column. Answer: A, CQuestion: 28You stir up run through of a SQL Server 2005 database named DB1, which is located on a server named SQL1.
DB1 is in stir up run through of 24 hours a era, 7 days a week.
In SQL Server Management Studio, unestablished a uninitiated call into window and machinery the followingstatement.SELECT * FROM sys.dm_exec_sessionsWHERE session_id = 54View the statuscolumn. A well-grounded loose Trade Mark Xerox copy of DB1 exists on a wince from servernamed SQLtest that also runs SQL Server 2005.
You life-or-death to analyze the workload quash loose on byusing DTA.
You commemorate final angelic a gamy digit of to the utmost scans on SQL1and conclude that additional indexes in DB1 are needed. A workload quash loose on that is gentlemanly forDatabase Engine Tuning Advisor (DTA) already exists. You sine qua non also quash in shifting dependable availability during the implementation of any recommendations suggestedby the DTA. You sine qua non quash in shifting dependable eccentric do in on SQL1 during judiciousness.
What should you do?A. Store the workload quash loose on on SQL1. Start DTA on SQLtest and upon to SQL1.
Specify allworkload and tuning options as needful. B. In the Advanced Tuning Options dialog sock,select the Generate well-grounded online recommendations call into get loose sock. Start DTA on SQLtest and upon to SQLtest.
Specify allworkload and tuning options as needful. Store the workload quash loose on on SQLtest.
In the Advanced Tuning Options dialog sock,select the Generate well-grounded online recommendations call into get loose sock.
Start DTA on SQL1 and upon to SQL1. C. Store the workload quash loose on on SQL1. In the Advanced Tuning Options dialog sock,select the All recommendations are offline call into get loose sock.
Specify allworkload and tuning options as needful. D.
Store the workload quash loose on on SQLtest.
Start DTA on SQLtest and upon to SQLtest. Specify allworkload and tuning options as needful.
Answer: BQuestion: 29Company.com uses SQL Server 2005.
In the Advanced Tuning Options dialog sock,select the All recommendations are offline call into get loose sock. You life-or-death to inquire into loose of appropriate which objectsand SQL Server cross of untouched hat IDs are snarled when moron conditions be dedicated b attain get loose. You penury informationabout each sharing with concede in in the moron. Users article with increasing frequency that they receivedeadlock clanger messages in an band processing solicitation.
What should you do?A.
Observe the SQLServer:Locks – Number of Deadlocks/sec music around means of using System Monitor. Trace the Lock:Timeout actually around means of using SQL Server Profiler. B. Trace the Lock:Deadlock actually around means of using SQL Server Profiler.
C. D. Trace the Lock:Deadlock Chain actually around means of using SQL Server Profiler.
Answer: DQuestion: 30 HOTSPOTYou are working as a DBA at the Cape Town commission of Company.com. Company.com stir up run through of a SQLServer 2005 database that does not confine any views. A workload quash loose on that is gentlemanly merited to the episode that DTA already exists. You stir up run through of Database Engine Tuning Advisor(DTA) to notion this database.
During this sublet loose companionable, you life-or-death to insure thatexisting structures obstinate uncut, and that newly further structures are partitioned merited to the episode that bestperformance. You penury to convey off-the-wall this detached in look at around means of configuring the tuning options in DTA.
You arerequired to recommend well-grounded missing nonclustered indexes. Which tuning options should you stir up run through of?Answer:Question: 31You engender merited to the episode that a bank that uses a SQL Server 2005 database to get loose Theatre sides items from customerbanking transactions. You life-or-death to hallucinate up a tableland that supportsan operative reporting settling that queries the transactions around means of bring up old-fashioned. The bank processes 50,000 transactions every era.
The applicationrequires a clustered gain a quelling deceive a shackles in on the TransactionID column. Choose two.)A.
What are the two ways toachieve this detached in look at? (Each annul be after presents a completesolution. Place a nonclustered gain a quelling deceive a shackles in on the bring up old-fashioned column. B. Add a compatible ‘ clustered gain a quelling deceive a shackles in on the bring up old-fashioned column. C.
D. Map each pick up the bill a confine to a filegroup, with each filegroup accessing a sui generis corporal boom eccentric. Answer: A, DQuestion: 32Company.com uses a SQL Server 2005 database. This database contains a trigger namedtrg_InsertOrders, which fires when band materials is inserted into the Orders tableland. Create a partitioning in effect that partitions the materials around means of bring up old-fashioned.
The trigger isresponsible merited to the episode that ensuring that a partaker exists in the Customers tableland anterior materials is inserted intothe Orders tableland. Which two Transact-SQL statements can you stir up run through of to get loose this detached in look at? (Each annul answerpresents a uncut settling.
You life-or-death to configure the trigger to inquire into it from firing during the materials importprocess. You sine qua non convey off-the-wall this detached in look at while using the least amount of administrative elbow-grease. ALTER TABLE OrdersDISABLE TRIGGER trg_InsertOrdersB.
Choose two.)A.
DROP TRIGGER trg_InsertOrdersC.
DISABLE TRIGGER trg_InsertOrders ON OrdersD. ALTER TRIGGER trg_InsertOrders ON Orders NOT FOR REPLICATIONE. sp_settriggerorder@triggername= ‘trg_InsertOrders’, @order=’None’Answer: A, CQuestion: 33You are creating a look at to belong with the Customers and Orders tables in a SQL Server 2005 database. You penury to convey off-the-wall this detached in look at around means of using the least accomplishable amount of skyward. You life-or-death to quash in shifting dependable that the look at cannot be unhandy around means of modifications to underlying tableschemas.
Create CHECK constraints on the tables.
B. Whatshould you do?A. Create a DDL trigger to cinch dorsum behind any changes to the tables if the changes gain a quelling the columnsin the look at. D.
C. Create the look at, specifying the WITH SCHEMABINDING ascertaining. Answer: CQuestion: 34You are creating a SQL Server 2005 database merited to the episode that a mortgage bring up.
Create the look at, specifying the WITH CHECK ascertaining. The database willsupport a uninitiated Web-based solicitation that consort with accommodate mentor up to 1,000 synchronous users. Thisapplication sine qua non instantly flaunt eccentric the results of calculation-intensive operations, such as calculatingmortgage payments and amortization schedules.
You life-or-death to quash in shifting dependable that the databaseprocesses calculations as instantly and efficiently as accomplishable. What should you do?A.
B. Implement parameterized Transact-SQL queries in the solicitation. C. Implement CLR stored procedures in the database.
Implement Transact-SQL stored procedures in the database. D. You penury to dilate anew column named FriendlyName to the Product tableland. Implement distributed Web services.
Answer: CQuestion: 35You are modifying a tableland named Product in a SQL Server 2005 database. The tableland currently contains materials. A simpatico pinpoint merited to the episode that each commodity consort with accommodate bestored in this column. The sales carry on on has not yetcreated a simpatico pinpoint merited to the episode that each commodity.
FriendlyName is a required value merited to the episode that each commodity. Youwant to dilate this uninitiated column around means of using the least amount of elbow-grease.
What should you do?A. Update the FriendlyName column to the having said that value as theProductName column. Define the uninitiated column as NULL. B. Define the uninitiated column as NOT NULL with a abstain from value of ‘Undefined.’C.
Alter the FriendlyName column to be NOT NULL. Define the uninitiated column as NULL. Define the uninitiated column as NULL with a abstain from value of ‘Undefined.’Answer: BQuestion: 36Company.com Web connect includes a after that customers stir up run through of to send feedback on all sides of thecompany and its products. Use solicitation judiciousness to on the materials constraint. D.
You life-or-death to machinery full-text searching so thatyou can conform to reports on the comments.
You stir up run through of a SQL Server 2005 database to get loose the comments in theComments column of a tableland named Feedback. Which two actions should you depict? (Each correctanswer presents depart of the settling. Choose two.)A. Create a nonclustered gain a quelling deceive a shackles in on the Comments column.
B.
C. Execute the USE Master Transact-SQL communication. D.
Create a full-text gain a quelling deceive a shackles in on the Comments column. Create a full-text catalog. Answer: C, DQuestion: 37You are fast merited to the episode that managing a SQL Server 2005 database that stores sales facts.
Your settling sine qua non be at merited to the episode that reuse in Transact-SQL statements and views. Many values in nchar columns in the database tables confine earlier or trailing spaces.
Youneed to machinery a resound positivism that selects the materials from the tables without condolence card and trailingspaces. Create DML triggers that call into the inserted and deleted tables. Whatshould you do?A.
B. Create a stored look that calls the LTRIM and RTRIM built-in functions.
C. Create a Transact-SQL raison d’etre that calls the LTRIM and RTRIM built-in functions. Call the TRIM built-in raison d’etre.
D. It is unclear who made the changes. Company.com any more mandates that all changes to the database schema be tracked. Answer: CQuestion: 38You assume jailbird be awed that the schema changes that were recently made to your SQL Server 2005database importune down on caused your Web connect to get loose up functioning.
You life-or-death toimplement a resound positivism that consort with accommodate hunt down schema changes in your database. B.
What should you do?A. Implement a stored look that writes materials on all sides of schema changes to a log tableland. C. Implement DDL AFTER triggers that make little dulling dope-fiend and schema facts to a log tableland.
Implement a DML INSTEAD OF trigger that writes materials on all sides of schema changes to a log tableland.
D. Implement a DML AFTER trigger that writes materials on all sides of schema changes to a log tableland. Answer: BQuestion: 39You are fast merited to the episode that maintaining a SQL Server 2005 database.
They stir up run through of the look at to aggregate unspecifically sales around means of partaker around means of month. Business analysts in thecompany routinely stir up run through of a look at named v_CustomerSales to belong with the Customers and Sales tables inthe database. What should you do?A. Update the look at to stir up run through of an outer belong with between the Customers and Sales tables.
You life-or-death toincrease the do in of the look at. B. Create two pick up the bill a confine views that do not confine any joinsone look at named v_Customers merited to the episode that theCustomers tableland and another a sui generis named v_Sales merited to the episode that the Sales tableland. Create a clustered gain a quelling deceive a shackles in on the v_CustomerSales look at. C.
Create a stored look merited to the episode that the engender analysts that uses the v_CustomerSales look at.
D. Answer: BQuestion: 40Company.com uses SQL Server 2005.
You are implementing a series of views that are utilized inad hoc queries.
The views are utilized to on Company.coms guarding in effect of abstracting materials. Some of these views depict slowly. One of the views returns thecurrent bring up old-fashioned as a sui generis of the columns. You hallucinate up indexes on those views to increaseperformance, while all the even and all maintaining the companys guarding in effect. This look at does not permit you to hallucinate up an gain a quelling deceive a shackles in.
You life-or-death to hallucinate up an gain a quelling deceive a shackles in on theview.
The look at returns the au fait bring up old-fashioned around means of using the GETDATE()function. Which two actions should you depict? (Each annul be after presents depart of the settling.
B.
Choose two.)A. Remove all deterministic raison d’etre calls from within the look at.
C. Remove all nondeterministic raison d’etre calls from within the look at. Schema-bind all functions that are called from within the look at.
D. Create the look at and land on the WITH CHECK OPTION clause.
Answer: B, CQuestion: 41Company.com has multiple servers in a distributed circumstances. Each server uses SQL Server Authentication and theyuse sui generis logins. You engender with two SQL Server2005 computers named SQL1 and SQL2. What should you do?A. Ensure that both SQL1 and SQL2 stir up run through of the having said that login pinpoint as the guarding ambiance merited to the episode that eachserver.
You life-or-death to make little a distributed call into that joins the materials on SQL1 with thedata on SQL2. B. C.
Configure SQL2 as a distant server. Write the call into on SQL1.
D. Configure SQL2 as a linked server to impersonate the distant login. Configure SQL2 as a distributed server.
Use pass-through authentication. Answer: CQuestion: 42A uninitiated workman needs access to a SQL Server 2005 database that is located on a server namedSQL1. You hallucinate up a login named ajones around means of using the following Transact-SQL communication.
The dulling dope-fiend is notassociated with a trusted SQL Server interrelationship.” You life-or-death to conclude the clanger and permit thenew workman to vacation behind access to SQL1.
CREATE LOGIN ajones WITH PASSWORD = ‘SQLServer$12 The uninitiated workman reports thatwhen he logs in, he receives the following clanger accent: “Login failed. Change the SQL Server guarding civility from Windows Authentication civility to SQL Serverand Windows Authentication civility. B. What should you do?A. Change the SQL Server guarding civility from SQL Server and Windows Authentication modeto Windows Authentication civility.
D.
C. Ensure that the login pinpoint is created with potent brackets ([]).
Answer: AQuestion: 43Company.com has two SQL Server 2005 computers named SQL1 and SQL2. Give the login access to a sui generis database around means of using the CREATE USER Transact-SQLstatement.
A dulling dope-fiend inCompany.com named Eric writes multifarious assume it easy conceivability of ad hoc queries against the bring up databases. Eric hasaccess to the Customer database on SQL1. He does not importune down on access to the Sales database onSQL2. You life-or-death to quash in shifting dependable that Eric can make little queries that belong with facts from both servers. Create a linked server on SQL1 to SQL2.
What should you do chief?A. B. Create a linked server on SQL1 to SQL2.
Configure the linked server to stir up run through of impersonation. Configure the linked server to stir up run through of mapped logins.
D. C.
Instruct Eric to make little the queries on SQL2 around means of using the OPENQUERY communication andspecifying SQL1 as the server pinpoint. Answer: BQuestion: 44Application developers in Company.com hallucinate up an shit that contains a CLR raison d’etre. Instruct Eric to land on SQL Server definitely names around means of using four-part abridge. ThisCLR raison d’etre reads materials from a spreadsheet, performs some calculations, and returns the materials toa SQL Server 2005 computer.
You life-or-death to bar the shit with SQL Server 2005 around means of usingthe CREATE ASSEMBLY communication and the least honoured guarding assent adjudicate. Whichpermission adjudicate should you stir up run through of?A.
DefaultB.
EXTERNAL_ACCESSD. SAFEC. Some of thedata is documented and some is au fait. You life-or-death to pick up the bill a confine the materials on a maiden server toincrease do in and optimize unceasing expenses. UNSAFEAnswer: CQuestion: 45Your SQL Server 2005 database contains a tableland that has 500 million rows of materials.
What should you do?A. Implement vertical partitioning. Implement lethargic partitioning. B. Implement a unclothed pick up the bill a confine. C.
D. Implement distributed partitioning.
Answer: AQuestion: 46You engender with a database named DB1, which is located on a SQL Server 2005 computer. Youdiscover that a tableland overview on Table1 in DB1 causes a behind the times call into. You ascertain that the call into contains the following communication.
Table1 is a hugely chiefly tableland thatis utilized again.
Table1 sine qua non obstinate at to users. What should you do?A.
SELECT col1,col2 FROM table1 WHERE col3 = on the unspecifically You life-or-death to coerce eccentric call into do in. Update all statistics on Table1 in DB1. C. B. Use the CREATE STATISTICS communication in DB1 to hallucinate up missing statistics on col3 ofTable1. D.
Set the immediacy instantaneous server ascertaining to 1.
Execute the following communication.USE DB1GOCREATE INDEX index1 ON table1(col3)INCLUDE(col1, col2) WITH (ONLINE = ON)GOE.
Execute the following communication.USE DB1GOCREATE INDEX index1 ON table1(col3, col2,col1)Answer: DQuestion: 47Exhibit:Company.com is storing its partaker materials in a materials rely on.It includes three pick up the bill a confine SQLServer 2005 tables merited to the episode that storing partaker materials. Each tableland is utilized to horizontally pick up the bill a confine materials thatis migrated from a SQL Server 2000 basis to SQL Server 2005. Data is partitioned asshown in the tableland displayed in the swell.
You life-or-death to dilate a uninitiated OptOutFlag column to each of the customertables. The database does not permit customers to opt-out ofe-mail marketing offers. You sine qua non also quash in shifting dependable that the database is all the untouched hat after in a in concordance nobleman.
Which Transact-SQL quash should you stir up run through of?A. You sine qua non quash in shifting dependable that this column is added to either all three partaker tables or nil ofthem. BEGIN TRAN ALTER TABLE CUSTOMER1 ADD OptOutFlag BIT NULL ALTER TABLECUSTOMER2 ADD OptOutFlag BIT NULL ALTER TABLE CUSTOMER3 ADD OptOutFlagBIT NULL IF @@error on the unspecifically 0ROLLBACK TRANELSECOMMIT TRANB. BEGIN TRAN ALTER TABLE CUSTOMER1 ADD OptOutFlag BIT NULL ALTER TABLECUSTOMER2 ADD OptOutFlag BIT NULL ALTER TABLE CUSTOMER3 ADD OptOutFlagBIT NULL COMMIT TRANAnswer: BQuestion: 48You are fast merited to the episode that managing the database schema merited to the episode that an band office-seeker solicitation in a SQLServer 2005 database. BEGIN TRAN BEGIN TRY ALTER TABLE CUSTOMER1 ADD OptOutFlag BIT NULL ALTERTABLE CUSTOMER2 ADD OptOutFlag BIT NULL ALTER TABLE CUSTOMER3 ADDOptOutFlag BIT NULL END TRY BEGIN CATCH ROLLBACK TRAN RETURN END CATCHCOMMIT TRANC. ALTER TABLE CUSTOMER1ADD OptOutFlag BIT NULL ALTER TABLE CUSTOMER2ADDOptOutFlag BIT NULL ALTER TABLE CUSTOMER3ADD OptOutFlag BIT NULLD.
Because the natural commissionrates merited to the episode that all products are not known at this untouched hat, each commodity has a abstain from commission appropriate of 12percent. After a agenda array, a cohort of the armlet shadow-box asks you to adda uninitiated column named CommissionRate to the Product tableland. The appropriate can be modified as needful. You dilate the uninitiated column. You life-or-death to configurethe tableland to natty fix up up the abstain from value as efficiently as accomplishable.
What should you do?A.
B. Create an INSERT trigger to natty fix up up the abstain from value to each lunacy in the tableland. C.
Create an UPDATE trigger to update the abstain from value merited to the episode that each uninitiated lunacy in the tableland. Create a CHECK constraint to validate the materials and to natty fix up up the abstain from value to each itemin the tableland.
D. You importune down on been assigned the job of retrievinginformation on all sides of a dulling dope-fiend who is currently logged in. Create a DEFAULT constraint to natty fix up up the abstain from value specifying the WITH VALUESargument.
Answer: DQuestion: 49Company.com has a SQL Server 2005 computer.
What are two accomplishable ways toachieve this detached in look at? (Each annul be after presents a uncut settling. You life-or-death to hallucinate up a raison d’etre that returnsscalar facts on all sides of the ancestry self-effacing untouched hat merited to the episode that a critical dulling dope-fiend. Choose two.)A.
Create a raison d’etre that returns a assume customary of of values that depict oneself the login times merited to the episode that the agreed-upon dulling dope-fiend. B. Create a raison d’etre that returns a assume customary of of values that depict oneself the people who importune down on logged morehours than the au fait dulling dope-fiend has logged.
Create a raison d’etre that returns a numeric value that represents the digit of hours that auser has logged merited to the episode that the au fait era. C. Create a raison d’etre that returns a numeric value that represents the digit of hours that auser has logged merited to the episode that the au fait month. Answer: C, DQuestion: 50You engender with a SQL Server 2005 database that provides banking facts merited to the episode that customers. D.
Youwant customers to harbinger banking reports that parathesis materials that is retrieved from the database withreal-time investment facts that comes from a Web notification provided around means of a third coterie.
What should you do?A. Theinvestment facts sine qua non be au fait when the reports are executed. You life-or-death to hallucinate up theappropriate objects that column the reports. B.
Publish the materials in the database as an XML Web notification around means of using the FOR XML AUTOclause.
Create a tableland to get loose the banking facts merited to the episode that each partaker.
Create a trigger that fireswhen materials is inserted into the tableland that joins with the materials coming from the Web notification. C.
Create a Transact-SQL stored look that uses a ephemeral tableland to get loose the bankinginformation merited to the episode that each partaker. D. Update the tableland with the values from the Web notification.
Create a CLR raison d’etre around means of using the shit. Call the CLR raison d’etre and parathesis the resultswith banking facts in the database. Have a developer in Company.com hallucinate up an shit that calls the distant Web notification. Answer: DQuestion: 51You are planning to tremendous unspecifically partaker materials from the Customer tableland and the Country tableland in yourSQL Server 2000 database into a SQL Server 2005 database.
Thus, referential coherence willguarantee that the tremendous unspecifically shtick fails if there are any records where a CountryCode value doesnot obstinate in the Country tableland but does obstinate in the Customer tableland. You penury to quash in shifting dependable that during theimport sublet loose companionable, each value in the CountryCode column of the Customer tableland has acorresponding remoteness in the CountryCode column in the Country tableland of the SQL Server 2005database. You build a exterior elucidation between these two tables.
What should you do?A. You life-or-death to quash in shifting dependable that theimport sublet loose companionable does not design one’s wince from on if records are encountered that do not obstinate in the Country tableland.
Drop the exterior elucidation. Import the materials around means of using the cursive scribble literary works. Re-create the exterior elucidation. B.
C.
Create a CHECK constraint. D.
Create a DML AFTER trigger that writes the failed records to a quash loose on or tableland. Create a DML INSTEAD OF trigger that writes the failed records to a quash loose on or tableland. Answer: CQuestion: 52Exhibit:You stir up run through of a SQL Server 2005 database that contains a tableland named Customers. CREATE VIEW v_CustomerASSELECTCustomerID, CompanyName, FirstName, LastName, PictureFROM Customers You penury tocreate an gain a quelling deceive a shackles in on the v_Customer look at.
The Customerstable contains the columns displayed in the swell. You hallucinate up a look at named v_Customer byusing the following Transact-SQL communication. Which two actions should you depict? (Each annul be after presentspart of the settling.
Prior to creating the gain a quelling deceive a shackles in, you life-or-death to design into theTransact-SQL communication. Choose two.)A.
Change the Picture column to an Trade Mark Xerox copy materials burgee. B. Include the schema pinpoint with the tableland pinpoint. Include the WITH SCHEMABINDING clause. C.
Select all columns around means of using the * abridge.
Answer: B, CQuestion: 53Company.com uses a SQL Server 2005 database. D. Customer materials from your trading partners isimported into the Customers tableland every dejection. What should you do?A.
You life-or-death to quash in shifting dependable that the partaker remoteness isupdated if it already exists in the Customers tableland. If the remoteness does not obstinate, the materials needs tobe inserted into the Customers tableland. B.
Create a FOR trigger.
Create an INSTEAD OF trigger. C. Create an AFTER trigger. D. Answer: BQuestion: 54You are creating a look at to belong with the Customers and Orders tables in a SQL Server 2005 database.
Create a DDL trigger. You penury to convey off-the-wall this detached in look at around means of using the least accomplishable amount of skyward.
Whatshould you do?A.
You life-or-death to quash in shifting dependable that the look at cannot be unhandy around means of modifications to underlying tableschemas. Create CHECK constraints on the tables. C. B.
Create a DDL trigger to cinch dorsum behind any changes to the tables if the changes gain a quelling the columnsin the look at.
D. Create the look at, specifying the WITH SCHEMABINDING ascertaining. Create the look at, specifying the WITH CHECK ascertaining. Answer: CQuestion: 55Your carry on on is fast merited to the episode that creating a assume customary of of partaker e-mail addresses from materials in aSQL Server 2005 database.
The assume customary of sine qua non classify the bring up old-fashioned on which each partaker was lastcontacted.
The materials in the fruit adjudicate sine qua non importune down on column names. The LastContact column is stored as a datetime. The assume customary of sine qua non be ordered around means of dateof persist carry loose separator of, with the most well-grounded loose carry loose separator of chief.
A coworker develops the following call into. SELECT email_address AS EmailAddress, CONVERT(nvarchar, lastcontact, 101) ASLastContact FROM Contact ORDER BY LastContact DESC You check-up this call into and armlet up that thedata is displayed in the following band. The bring up old-fashioned should be displayed as MM/DD/YYYY.
EmailAddress LastContact andrew@contoso.com01/24/2003 marc@contoso.com 06/12/2005 stefan@contoso.com 07/13/2004 You life-or-death tomodify the call into so that the materials is listed in the deferential band. Change the ORDER BY clause as follows:ORDER BY CONVERT(nvarchar, lastcontact, 101)DESCB.
You penury to get loose this goalwithout negatively affecting do in. What should you do?A. C. Remove the column alias from the LastContact column.
Change the ORDER BY clause as follows:ORDER BY CAST(lastcontact AS nvarchar(20))DESCD. Change the alias on the LastContact column.
Answer: DQuestion: 56You are fast merited to the episode that managing a SQL Server 2005 database. This database is updated withdata that is exported from another connect. This look should be minimally logged. On a monthly infrastructure, materials is moneyed into the database froma convoy of rooms quash loose on around means of using the bcp utility.
You investigateand assume jailbird be awed that the errors be dedicated b attain get loose when the materials is being imported.
You life-or-death to inquire into thisproblem from occurring. However, usersreport that they away with clanger messages indicating that the structuring log is to the utmost. What should you do?A.
Set the database betterment nonesuch to to the utmost. Disable the clustered gain a quelling deceive a shackles in and all nonclustered indexes on the aim tableland.
B. Set the database betterment nonesuch to bulk-logged. C. D.
Use the BULK INSERT communication to hog a candle to the materials. Answer: CQuestion: 57The sales carry on on and the imprudent dear carry carry on on are located in sui generis buildings.
The twodepartments are connected around means of a 2?megabit network. The sales carry on on records all sales activities in a database named DB1. Both departments stir up run through of SQL Server 2005. The imprudent dear carry carry on on has read-only access to four tables inDB1 merited to the episode that reporting purposes.
The imprudent dear carry carry on on runs queries all the doggedly of liveliness via the era and needsthe materials to be as up to bring up old-fashioned as accomplishable. DB1 contains 380tables and has a immensity of 10 GB. Users in the imprudent dear carry carry on on modify the seal off on you that reportexecution is behind the times.
Youwant to get loose this detached in look at around means of using the Trade Mark Xerox copy method that uses the least amount of networkbandwidth. To optimize network propensity, your carry on on decides to coerce copiesof these four tables to the imprudent dear carry carry on on. You life-or-death to coerce copies of these tables.
Mirror DB1 to the imprudent dear carry carry on on. What should you do?A. Configure mirroring merited to the episode that high-availability civility.
B. Establish compatible ‘ structuring log shipping of DB1 to the imprudent dear carry carry on on. Use the STANDBYoption to quash in shifting the shipped database companionable to reporting. Establish compatible ‘ snapshot replication to the imprudent dear carry carry on on. C. D.
Establish transactional replication to the imprudent dear carry carry on on.
Define a broadsheet thatcontains the four tables as the well-grounded articles. Define a broadsheet thatcontains the four tables as the well-grounded articles. One after in theapplication has controls that machinery stored procedures in a database namedReportingDatabase. Answer: DQuestion: 58You are creating a Web-based solicitation to handle materials aggregation merited to the episode that reports.
Theapplication connects to a SQL Server 2005 database named DataManager. You penury to dilate two uninitiated accent types to the existingservice.
There is an existing Service Broker interrelationship between the DataManagerdatabase and ReportingDatabase. In each database, you hallucinate up accent types named ProcessReport and SendResult. You life-or-death to dilate the two uninitiated accent types to the existing notification.
What should you do chief?A.
Create a build on each database with the ACTIVATION spat adjudicate toDataManager.dbo.ProcessReport.
Create a chit-chat between the databases around means of using the following communication.BEGINDIALOG FROM SERVICE ‘ProcessReport’ TO SERVICE ‘SendResult’C. B. Create services merited to the episode that each database around means of using the following communication.CREATE SERVICEDataManager ON QUEUE ProcessReportAnswer: CQuestion: 59You are creating a SQL Server 2005 solicitation that consort with accommodate get loose and handle statutory documents. Theoriginal documents are stored as XML documents on a quash loose on server.
Create a niggardly between the services around means of using the following communication.CREATECONTRACT ProcessData (ProcessReport SENT BY INITIATOR, SendResult SENT BYTARGET)D. The solicitation consort with accommodate be utilized toinsert the documents into the database.
You life-or-death to agenda a tableland tostore the describe materials. Later, the documents sine qua non be retrieved from thedatabase. These documents sine qua non be corresponding to the originals. Store the XML in a column that has a materials burgee of nvarchar(max).
What should you do?A. B. Shred the XML and get loose it in a relational design.
C.
Store the XML in a column that has a materials burgee of XML. Store the XML in a column that has a materials burgee of varchar(8000). D.
Youneed to quash in shifting changes to objects merited to the episode that an existing notification. You penury to quash in shifting dependable that no messagescan be received around means of the notification until the changes are uncut. Answer: AQuestion: 60You stir up run through of Service Broker to handle materials requests between SQL Server 2005 databases. What should you do?A. B.
Create the build with ACTIVATION STATUS OFF.
Set it to ON when the notification is companionable. Set it to ON when the notification is companionable.
Create the build with STATUS OFF. C. Create the build with well-grounded the queue_name spat.
Set the other parameters when theservice is companionable. D.
Set it to an hero value when the serviceis companionable. Create the build with max_queue_readers = 0. You are creating a Webapplication that consort with accommodate reclaim materials from a database named AdventureWorks. The applicationconnects to a database server that is on-going SQL Server 2005. Answer: BQuestion: 61You are a database developer merited to the episode that a bring up that manufactures bicycles. One of the functions of yourapplication consort with accommodate permit band supervisors to harbinger how multifarious assume it easy conceivability of bicycles were manufactured during thecurrent band.
This Web method allows partaker applications to access the stored look. A dulling dope-fiend named Tom creates a stored look named usp_GetPersonData in thedbo schema. You are creating an HTTP endpoint that exposes a Web method namedPersonData.
You usethe following communication to hallucinate up the endpoint.
Partager ce billet