DAT310: Microsoft SQL Server Management: Developing Managed Data ...

1884 days ago, 675 views
PowerPoint PPT Presentation

Presentation Transcript

Slide 1

Required Slide SESSION CODE : DAT310 Microsoft SQL Server Management: Developing Managed Data-Tier Applications Charlie Carson Senior Development Lead Microsoft Corporation

Slide 2

Introducing another idea: Data-level Application Component (DAC) A model of a database from the application's perspective A DAC is to a database as an outline is to a house App : ::

Slide 3

Why do we require a model? Discover issues early: make proc p2 as select * from dbo . employeee Msg 208, Level 16, State 1, Procedure p2, Line 3 Invalid protest name " employeee '. Whoops!

Slide 4

Why do we require a model? Take into account arranging: make proc myProc as consolidation table_target utilizing table_source … or ?

Slide 5

Why do we require a model? Catches what the database is SUPPOSED to resemble, as indicated by the Application Developer We can do a correlation between the model and the database and search for irregularities We call deviation from the model DRIFT Unintentional Drift is terrible ! Wellspring of truth:

Slide 6

But, change HAPPENS There are (no less than) two sorts of progress: Upgrade Maintenance

Slide 7

Change HAPPENS May be planned Index defrag Backups Just-In-Time Add a record Delete some counterfeit information In either case, the objective is for the framework to carry on the same before the support as after Maintenance:

Slide 8

Having a model assists with Change I can check for float in the wake of playing out some upkeep and Get certainty that I didn't break the application Detect unintentional changes questions that were abandoned by JIT chip away at the database If I rolled out a deliberate improvement (a settle) then I can overhaul the model so that on the off chance that another person fixes my alter, I'll get another float cautioning A model assists with Maintenance:

Slide 9

Change HAPPENS Upgrades are a major ordeal. They should be : Intentional Repeatable Fast Consider some counter-illustrations : Accidentally dropping a table (and the information) Upgrade works awesome in test, however gets a mistake when connected to creation Production is down for 2 days while a modify proclamation executes Upgrades:

Slide 10

Having a model assists with Change Intentional By contrasting the new model with the current database, I can picture shouldn't something be said about's to happen. On the off chance that something doesn't look right I can prematurely end the update. Repeatable No float gives me certainty that the overhaul I've invested weeks testing will play out a similar route underway. Quick Ok, doesn't assist with this one  A model helps Upgrades be:

Slide 11

Having a model assists with Azure Scripts are weak, and dark The make database explanation which keeps running on-start may fizzle with SQL Azure on the grounds that less alternatives are upheld System can't follow up for my benefit or give direction – it's restricted to execute the script and pass or fall flat The DAC permits the framework to help me It can give me a notice or mistake early on the off chance that I determine something that is likely wrong Target proper Transact-SQL can be created that accomplishes my expectation Deployment Intent:

Slide 12

DAC is an agreement The DAC is an agreement between the two personas required with application lifecycle

Slide 13

Two personas Competing objectives App designer needs to be lithe Paid to enhance Uses cool new instruments Uses Visual Studio ( presumably beta something) DBA needs to be dependable Paid to give strength Gets hollered at whatever point something terrible happens Sleeping during that time without getting paged is an or more NEVER uses Visual Studio (won't introduce it underway)

Slide 14

Two personas Competing objectives But they need to connect all through the lifecycle of the application Planning Deployment Troubleshooting Upgrades This rubbing prompts to apprehension for both sides

Slide 15

Two personas Vast lion's share of applications are little, not mission basic Departmental DBA's are overpowered Managing 100s (or 1000s) of databases Getting more awful, worse 1 more application = 1 more cerebral pain Departmental DBA's are compelled to be reactionary Limited to JIT bolster from the DBA and that lone begrudgingly Push back against new organizations and change all in all

Slide 16

Two personas Developers improve around the focal IT Run applications on a "desktop database server" in their office This is an awful thing: SQL Server sprawl Probably not fitting equipment Probably not accurately looked after (reinforcements) Eventually, it will end gravely Lost information (equipment comes up short) Orphaned legacy frameworks

Slide 17

DAC v1 center Focus of DAC v1 100-1,000s of little applications Not focusing on LOB applications Examples: Work thing ticketing Process computerization Blog Wiki Number of Apps CRM ERP App Sophistication

Slide 18

DAC is an agreement Developer can: Specify what is critical to him tables, sections, sees, and so on. NOT determine things that are going to make the DBA ANGRY The record way for the mdf & log document The recuperation show for the database

Slide 19

DAC is an agreement Target Selection Policy Specify necessities on the server for an effective arrangement Major Version >= 10.0 These are heated into the . dacpac and approved by the framework before conveying Way superior to a remark in a Transact SQL script or a readme.txt Way, route superior to a fizzled arrangement and a "What the hell?" call from the DBA at 3 a.m .

Slide 20

DAC is an agreement Target Selection Policy can be contemplated over too An astute DBA, with 20 generation servers to browse, can compose a PowerShell script to discover the servers which a given dacpac can be sent to effectively.

Slide 21

DAC Overview Big Picture/Vision Contains the sought state of the application Allows tooling to empower situations like float recognition Target server investigation and approval Moves designers from a procedural script to a revelatory model No compelling reason to make modify proclamations + scripts that should be keep running in the right request Captures Deployment Requirements by means of PBM Condition Validated by the framework and can be gotten to programatically Single ancient rarity as unit of organization for the information level . dacpac is extensible and can contain different records with the goal that it can be fused into existing sending forms

Slide 22

DAC v1 Overview Visual Studio 2010/SQL Server 2008 R2 Limited question bolster Supported: Tables, Views, Functions, Indexes, Procs , Triggers, Users Not upheld: Permissions , Service Broker Queues, Certificates, and so forth. Concentrate and Register will piece you on the off chance that you have unsupported articles Limited approval profundity We get numerous however not all blunders that keep a fruitful convey Drift is restricted to the items we bolster Upgrade is SxS rather than set up Works for little databases yet has issues for the facilitated situations and for expansive databases Limited tooling support in SSMS Can send, redesign, yet show think about (and float perception) requires Visual Studio Ultimate

Slide 23

DAC Project System (Visual Studio 2010) Create DACs .SQL records as info No new dialect to learn But decisive (out-of-request alright) High loyalty for source based items (sees, procs , and so on.) With IntelliSense for altering Across the whole venture, not only the present document Code bits Static code examination Best practices, and so forth. Strategy manager To indicate target server necessities With a Build Verb Deeper approval Provides higher trust in the subsequent . dacpac being "right"

Slide 24

DAC Project System (Visual Studio 2010) Schema Compare Borrowed from VSTS-Data Compare pattern of database to venture and the other way around Publish venture to SQL Server occurrence (or Azure) Streamlined for spry improvement, naturally puts in new database versus redesigns existing database Reverse Engineer Create DAC extend (. sql records) from existing database or . dacpac Integrated investigating Execute sql and see question arranges Other elements

Slide 25

SQL Server 2008 R2 - SSMS Deploy DAC to another database Extract DAC from a current database View Data-level Applications as of now sent to the framework i.e. database's which has a DAC connected with them Upgrade existing Data-level Applications Warns if float has occured Uninstall existing Data-level Applications Lifecycle Management

Slide 26

Required Slide Track PMs will supply the substance for this slide, which will be embedded amid the last clean. DAT Track Scratch 2 Win Find the DAT Track Surface Table in the Yellow Section of the TLC Try your fortunes to win a Zune HD Simply scratch the amusement pieces on the DAT Track Surface Table and Match 3 Zune HDs to win

Slide 27

Required Slide Resources Learning Sessions On-Demand & Community Microsoft Certification & Training Resources www.microsoft.com/teched www.microsoft.com/learning Resources for IT Professionals Resources for Developers http://microsoft.com/technet http://microsoft.com/msdn

Slide 28

Required Slide Complete an assessment on CommNet and enter to win!

Slide 29

Sign up for Tech·Ed 2011 and spare $500 beginning June 8 – June 31 st http://northamerica.msteched.com/enrollment You can likewise enlist at the North America 2011 stand situated at enlistment Join us in Atlanta one year from now

Slide 30

© 2010 Microsoft Corporation. All rights saved. Microsoft, Windows, Windows Vista and other item names are or might be enrolled trademarks as well as trademarks in the U.S. as well as different nations. The data thus is for enlightening purposes just and speaks to the present perspective of Microsoft Corporation as of the date of this presentation. Since Microsoft must react to changing economic situations, it ought not be translated to be a promise with respect to Microsoft, and Microsoft can't ensure the precision of any data gave after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Slide 31

Required Slide