SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index...
-
Upload
stefanie-segers -
Category
Documents
-
view
223 -
download
6
Transcript of SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index...
![Page 1: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/1.jpg)
SQL Server 2012
Top 10 new features
![Page 2: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/2.jpg)
Agenda
1. AlwaysOn Availability Groups2. ColumnStore Index3. Contained database4. Windowing functions5. FileTable6. Semantic Search7. T-SQL enhancements8. Server roles en default schema voor groups9. SSIS project deployment10. BISM met PowerView
![Page 3: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/3.jpg)
1. Availability Groups
• Mirroring 2.0 (?)• Highlights:– Zelf groep van databases definiëren– Tot 4 secondaries– Read-only secondaries– Backup from secondary• (not differential)
• Zie sessie van Robert Hartskeerl over AlwaysOn om 11.00u
![Page 4: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/4.jpg)
2. Column store index
• Normale heap/index slaat records rij voor rij op• Veel IO overhead als niet alle kolommen nodig zijn • Column store index slaat gegevens per kolom op– Betere compressie– Minder IO– Veel betere performance
• Zie sessie van Hugo Kornelis: SQL Server 2012 ColumnStore index om 14.45u
![Page 5: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/5.jpg)
3. Contained Database
• Moving a database to a different SQL Server instance is easy– Detach / attach– Backup / restore
• Right?• How about
– Logins ?– Linked Servers ?– Database mail ?– Jobs ?– #temp tables / cross database joins and collation ?– … ?
![Page 6: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/6.jpg)
Contained Database geeft:
1. Database authentication• Users met wachtwoord / windows users• Geen mapping met login -> geen orphaned users
2. TempDB collation issues• Objecten in tempdb worden gemaakt met de collation van de
database
3. DB is meer een black box. Verplaatsen is makkelijker (Azure?, OTAP?, ..)
• Nog te wensen:– Volledige onafhankelijkheid van instance– Alleen partially contained is nu geïmplementeerd
![Page 7: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/7.jpg)
DEMOContained database
![Page 8: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/8.jpg)
Tot slot
• EXEC sp_configure ‘contained database authentication’, 1
• SELECT * FROM sys.dm_db_uncontained_entities
• ALTER DATABASE <name> SET CONTAINMENT PARTIAL
• Niet alle features zijn te combineren met contained databases• Er zijn enkele security implicties, oa:
– Databases met guest account enabled zijn benaderbaar– Users met control database permission kunnen containment aanzetten
en mensen toegang geven– … (zie BOL)
![Page 9: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/9.jpg)
4. Windowing functions
• over clause van aggregate functies uitgebreid met:– Rows x preceding– Rows between x preceding and y following– Rows unbounded preceding– …
• Geeft toepassingen als moving average, meelopend totaal, vergelijk met vorige maand, …
![Page 10: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/10.jpg)
DEMOWindowing functions
![Page 11: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/11.jpg)
Extra grouping functions• PERCENTILE_CONT, PERCENTILE_DISC– In statistics, a percentile (or centile) is the value of a
variable below which a certain percent of observations fall.
• PERCENT_RANK, CUME_DIST– Calculates the relative rank of a row within a group of
rows• FIRST_VALUE, LAST_VALUE– Returns the first, last value in an ordered set of values– +- Comparable to sibling functions in SSAS hierarchy
• LEAD, LAG– Accesses data from a subsequent, earlier row in the same
result set without the use of a self-join with a given offset
![Page 12: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/12.jpg)
5. FileTable• Klassiek database ontwerp issue:
BLOB’s in database of extern op fileshare?– Beide oplossingen hebben nadelen
• SQL Server 2008: FileStream– Best of both worlds: wij doen ze in de database maar SQL
Server zet ze op een fileshare– Nadeel: applicatiecode moet aangepast om feature te
gebruiken
• SQL Server 2012: FileTable– Geen onderscheid meer tussen fileshare en tabel– Intergreert goed met full text en semantic search
![Page 13: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/13.jpg)
6. Semantic Search
• Uit BOL: – provides deep insight into unstructured documents
stored in SQL Server databases by extracting statistically relevant key phrases, and then - based on these phrases – identifying similar documents. These results are made available as structured data through three Transact-SQL rowset functions
– full-text search: query for words in a document– semantic search: query the meaning of the document– E.g. query the document similarity index to identify
resumes that match a job description
![Page 14: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/14.jpg)
Voorbereiding
• Installeer en enable full text search• Run SemanticLanguageDatabase.msi– Unpacks mdf
• Attach semanticdb database• Register semanticdb:
– sp_fulltext_semantic_register_language_statistics_db @dbname = N'semanticsdb;
• Installeer iFilters om te zoeken inbijvoorbeeld docx, pptx, …
![Page 15: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/15.jpg)
DEMOFileTable + semantic search
![Page 16: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/16.jpg)
7. T-SQL enhancements
• Throw (ter vervanging van raiserror)• Sequence (ter vervanging van identity)• Paging (offset x rows fetch next y rows)• Functions:– Parse (convert met regional settings)– Try_parse (parse maar zonder errors)– Format (omdat we code 105 van convert niet kunnen
onthouden)– Concat (omdat we niet van NULL houden)– IIF (omdat CASE soms omslachtig is)
![Page 17: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/17.jpg)
DEMOT-SQL
![Page 18: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/18.jpg)
8. Security
• Server roles• default schema voor groups
![Page 19: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/19.jpg)
User defined server roles• Eigen rollen maken op instance level– Vergelijkbaar met database roles– Minder noodzaak voor sysadmin– Minder rechten voor administrators (better separation
of duties)– Triggers voor add/remove logins to user-defined server
roles • T-SQL– CREATE/DROP SERVER ROLE– ALTER SERVER ROLE• E.g. ALTER SERVER ROLE Production ADD MEMBER
[TrainSQL\Peter] ; • Vervangt sp_addrolemember
![Page 20: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/20.jpg)
default schema voor groups
• Probleem met SQL Server 2008 en eerder:– Schema en user worden automatisch aangemaakt
als object gemaakt in default schema en er is geen default schema
– Logins gebaseerd op groepen kennen geen default schema
• Login gebaseerd op windows groep kan nu default schema krijgen (no. 1 customer request)
• Schema management makkelijker
![Page 21: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/21.jpg)
DEMOSecurity
![Page 22: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/22.jpg)
9. SSIS project deployment
• Probleem met SQL Server 2008 en eerder:– Deployen naar filesystem of SQL Server (msdb)?
• Project deployment:– SSISDB catalog (vergelijkbaar met ReportServer
database)– Meer versies van project mogelijk– Environments vervangen configurations– Parameters vervangen parent package configurations
• T-SQL procedures om packages uit te voeren
![Page 23: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/23.jpg)
DEMOSSIS
![Page 24: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/24.jpg)
10. BISM met PowerView
• BISM = BI Semantic Model– Nieuw model naast SSAS UDM– Gebaseerd op PowerPivot
• PowerView:– Rapportage tool voor niet techneuten
• Zie sessie van Marcel Westra om 13.30u
![Page 25: SQL Server 2012 Top 10 new features. Agenda 1.AlwaysOn Availability Groups 2.ColumnStore Index 3.Contained database 4.Windowing functions 5.FileTable.](https://reader036.fdocuments.in/reader036/viewer/2022062418/5551a0f14979591f3c8bbd17/html5/thumbnails/25.jpg)
GetReady 2012
• Utrecht• 19 juni• Hele dag nieuwe features• Peter ter Braake