Presentation is loading. Please wait.

Presentation is loading. Please wait.

What Developers (and others) need to know about SQL Server 2005 Express Edition Kent Tegels

Similar presentations


Presentation on theme: "What Developers (and others) need to know about SQL Server 2005 Express Edition Kent Tegels"— Presentation transcript:

1 What Developers (and others) need to know about SQL Server 2005 Express Edition Kent Tegels

2 About Me Kent Tegels Instructor for DevelopMentor MVP for SQL Server Writings on SQL Server 2005, ASP.NET and.NET Data Access Co-founder of the Greater Omaha SQL Server Users’ Group SQL Server 2005 blog at

3 Audience Profile Who are you? What do you do? Experience with SQL Server 2000? Experience with.NET? Currently using SQL Server 2005? Currently using MSDE?

4 Agenda Who, What, When, Where, Why, How Demos using Express and Express Manager Demos with XML, XQuery and SQLCLR Time for your questions

5 What is SQL Server 2005 Express Edition? SSX for short Key markets –ISV Application-Embedded Database –Low to medium volume Web sites –Hobbyist Developer –Entry point to SQL Sever 2005 –Shareware Applications –Microsoft alternative in low-cost DB segments

6 How does it compare to other editions? Feature SSX Edition Workgroup Edition Standard Edition Enterprise Edition Maximum used RAM and #CPUS 1 GB 1 CPU 3 GB 2 CPUs OS limit 4 CPUsOS limit Database File Size 4 GB (no limit on logs) No limit Additional Features Included SSB & Replication Client SSMS, basic DTS and Log Shipping OLAP, Rpt Svc, Full SB and Rplct’n Ad-hoc Reports… full works Retail prices$0$3,899 ($ CALs) $5,999 Per CPU $24,999 Per CPU

7 When would you choose SSX? Embedded with an application –Shrink-wrapped Applications –Point of Sale Applications Low and medium volume Web sites –OS limit concurrent connections –Understand data growth patterns –Limit on data size -> Export or replicate out –Limit on RAM -> System.Web.Cache –Threading support constraints

8 Express Product SKUs SSX is part of the Visual Studio Express SKU family Customized Studio Experience $49 to license… except for SSX! Visual Basic 2005 Express Visual C# 2005 Express Visual C Express Visual J# 2005 Express Visual Web Dev 2005 Express SQL Server 2005 Express

9 How much does it cost? “Free” as in “free lunch” No charge download from Microsoft Freely redistribution license for ISVs No CALs required No per CPU license required Included with other Studio Express SKUs

10 Why make SSX free? SSX replaces MSDE going forward FeatureSSXMSDE 2000 “Workload Governor”No10 connections Database Size Limit4GB maximum2GB Maximum Data Access Technology SQL Native Access Client (SNAC) MDAC (ODBC, OLE- DB, ADO, ADO.NET) GUI ToolsExpress Manager3 rd party only CPU and RAM1 st CPU, 1 st GB of RAM2 CPUs, 2 GB of RAM SQL AgentNoYes

11 What about Access and JET? Access 2003 –Strength: Easier to develop forms and reports –Strength: Rich GUI –Weakness: Database scalability –Weakness: Multiple connection support SQL Server 2005 Express Edition –Strength: Database scalability –Strength: Multiple connection support –Weakness: Forms and reports –Weakness: GUI Good combo: Access Front-end, SSX Back-end –Rich client space –ADP impedance

12 Features to Markets AutoClose XCOPY support –Once SSX installed, just copy the MDFs files –DB files scale between versions AttachDBFileName –Database contains metadata outside of master –No need to register DB ahead of time Service Broker support –To-self, Routed messages –Route through “retail” SKUs editions Replication Client –Merge, snapshot and transactional –SSX is subscriber only though

13 What is Express Manager (XM)? Lightweight alternative –SQL Server Management Studio –Enterprise Manager and Query Analyzer Preferred way to work with SSX outside of a Studio SKU Works with any SQL Edition 2000 or higher Single Active Connection.NET Application

14 Security! Secure by Design –Fully supports all login roles and options –Fully supports data encryption features Secure by Default –Windows Integrated Logins –TCP/IP and Named Pipes disabled –SQL Browser not started Secure in Deployment –Local Security Policy Applies

15 Windows Integrated Security Issues Mobile Users –Domain Controller inaccessible ISV issues –Users seize or delete account Web Users –Force impersonation –Map a login for the ASP.NET Mixed mode after the fact –Registry hack to enable SA account –Generating a new password

16 Enabling Standard Logins Enable the SA Account –HKEY_LOCAL_MACHINE\SOFTWARE\ Microsoft\Microsoft SQL Server\MSSQL.x\MSSQLServer –Key is LoginMode –1 for Windows Only, 2 for Mixed Mode Seize control of the SA account –Login is as local machine admin –ALTER LOGIN SA WITH PASSWORD=‘xxxxx' UNLOCK, CHECK_EXPIRATION = OFF, CHECK_POLICY = OFF

17 How do I enable ASP.NET to use SSX (Trusted)? -- Start in the right database USE AdventureWorks GO -- Map a login for ASPNet CREATE LOGIN [hostname\aspnet] FROM WINDOWS GO -- Create an account context CREATE USER ASPNET FOR LOGIN [hostname\aspnet] WITH DEFAULT_SCHEMA = HumanResources GO -- Grant permissions on JobCandidates table GRANT SELECT ON HumanResources.JobCandidate TO aspnet GO

18 What is the future of MDAC? MDAC for generic data access –Part of OS –ODBC, OLE-DB, ADO SNAC specifically for SQL Server Data Access –ODBC, OLE-DB over TDS using ADO, ADO.NET –SQLNCLI.dll –Multiple Active Response Streams –SQL Server 2005 Data Types

19 XQuery in a few seconds XQuery:T-SQL::XML:RDBMS Important with XML native type Goals –Query for values –Extract re-shapped instances –Modify existing instances XPath based FLWR syntax –No let in SQL Server 2005 Dates in ISO-8601 format

20 CTP Side Effects SQL Server 2005 is.NET CLR dependent Major, Minor and Revision build CTPs, Betas and RCs Studio ships versions independently Check compatibility before installing Specific uninstall order Uninstall any 2.x runtime last Use Virtual Host instead

21 Demos… Using SQLCMD, XM, XQuery, SQLCLR and SSX

22 Start-up ritual Drop to the command shell Net start “SQL Server (SQLEXPRESS)” Sqlcmd –S.\SQLExpress Select

23 Using the AdventureWorks Database No databases installed by default AdventureWorks downloadable Blog post on how to install into for SSX –http://sqljunkies.com/WebLog/ktegels /archive/2005/01/27/6942.aspxhttp://sqljunkies.com/WebLog/ktegels /archive/2005/01/27/6942.aspx Test it out –SELECT COUNT(RESUME) AS RESUMES FROM HUMANRESOURCES.JOBCANDIDATE

24 Demo with SQLCMD

25 XQuery in Action Resumes as XML Get Education Experiences for candidates As a View As a Stored Procedure

26 XQuery with XM

27 XML is nice, but I want HTML! Query results as pre-render HTML Use XSLT to convert Do that with T-SQL how? Use SQLCLR features to call to System.Xml.Xsl Expose that as a T-SQL User Defined Function Use Visual Studio to build and deploy

28 SQLCLR code public partial class XsltFunctions { [SqlFunction] public static SqlString SimpleTransform(SqlXml Source, SqlXml Stylesheet) { // Create Transformation Engine XslTransform trans = new XslTransform(); // Note: CreateReader is depreciated going forward trans.Load(Stylesheet.CreateReader()); // Transform to desired output XPathDocument xpd = new XPathDocument(Source.CreateReader()); XmlReader xr = trans.Transform(xpd, null); if (xr.Read()) { return new SqlString(xr.ReadOuterXml()); } else { return SqlString.Null; } };

29 SQLCLR Code Demo

30 Review and Wrap-up

31 Big Rocks SSX is Microsoft’s “free” version of SQL Server 2005 Secure in Design, by Default and in Deployment First CPU, First GB of RAM only, 4-gig limit on data Manage with Express Manager Supports most features like XQuery, SQLCLR, Replication and Service Broker Good choice for ISVs, small sites and as an entry-point

32 Essential Resources Newsgroup –http://url123.com/dag32http://url123.com/dag32 SSX Team Blog –http://url123.com/dwr5bhttp://url123.com/dwr5b SQL Server 2005 Express Edition Overview –George –http://url123.com/dwb3shttp://url123.com/dwb3s “A First Look At SQL Server 2005 for Developers” –Beauchemin, Berglund and Sullivan –http://url123.com/dayp3http://url123.com/dayp3

33 Call to Action Now is great time to start learning Follow my download and install primer to get going successfully –http://sqljunkies.com/WebLog/ktegels /archive/2005/01/27/6942.aspxhttp://sqljunkies.com/WebLog/ktegels /archive/2005/01/27/6942.aspx Install the beta on a disposable OS image and start trying things Visit us in the newsgroup to ask (and answer) questions

34 Questions?


Download ppt "What Developers (and others) need to know about SQL Server 2005 Express Edition Kent Tegels"

Similar presentations


Ads by Google