6. Traditional Choices
Logshipping
Replication
Mirroring
Clustering
Solution is fragmented
Lacks flexibility
Always ON
7. ALWAYS ON
Always ON Availability groups
Active Multiple Secondaries
System center integration
Supports file streaming, contained databases
Automatic Page repair
8. Column Store Index
In memory Column Store Index
Stores Index data Column wise
Online index rebuilding for varchar(max), nvarchar(max),
9. User defined Server level roles
9 server roles
available
Create new Server
roles – Add
members and drop
members from it
10. Partitioned Tables
Limit raised from 1000 to 15000 (Table and Index
partitioning )
Performance improvements
Maintain partitions
11. intellisense
Based on partial words and not first few characters
Tools > Options
Enable Line numbers
Auto List members
12. T-SQL enhancements
Windows Functions Date & time Functions
FIRST_VALUE DATEFROMPARTS
LAST_VALUE DATETIME2FROMPARTS
LAG DATETIMEFROMPARTS
LEAD DATETIMEOFFSETFROMP
PERCENT_RANK ARTS
SMALLDATETIMEFROMPA
PERCENTILE_CONT
RTS
PERCENTILE_DISC
TIMEFROMPARTS
EOMONTH
Logical Functions Sequences
IIF
CHOOSE
13. Other new features
Sequences
Power View – The self Service tool
Transparent data encryption
Master data Services
Data Quality services
Visual Studio IDE
DBA on the cloud
DBA for Big Data
DBA for PDWs
14. Microsoft Virtual Academy
http://www.microsoftvirtualacademy.com/
http://msdn.microsoft.com/en-US/
Tutorials
Social
15. Tech Ed 2013 – Bengaluru & Pune
Microsoft TechEd India 2013 is the best way to
stay aligned with Microsoft’s current technologies
and product releases. Connect with Microsoft
experts and industry leaders to gain practical
advice, network and discuss critical technology
issues
https://india.msteched.com/
AlwaysOn Availability Groups is an enterprise-level high-availability and disaster recovery solution introduced in SQL Server 2012 to enable you to maximize availability for one or more user databases
Parallel data Center which sits idleIt is just an insuranceLog shipping is used to synchronize distributed database server. It synchronizes servers by copying transaction logs. SQL Server agent jobs are used to make the process automatic.No automatic transfer in case of a failover. Databases are synchronized, but if primary fails, application is not redirected to secondary.This has to be done manually Similar to magazine subscriptions; Can get it into inbox, delivered by a courier Similarly via Publication and subscription data moves from remote location to desired locationTransaction replication, merge replication, snapshot replication Snapshot – Data changes are not tracked. It completely overwrites existing dataTxn replication tracks changes to log file. Merge replication tracks changes through triggers and metadata tablesMirroring – Principal Server sends active txn logs to mirrored server. Mirrored server applies txn log in sequence.High safety mode – SynchronousHigh performance mode - asynchronousHaldron is the older nameAlways ON is integrated, flexible and efficient SQL Server wizard takes care of all the plumbing and the setup
Works only with ClustersWindows Admin creates a cluster and then SQL Server is installed on top of that App needs 3 databases; 1 fails, 2 is intact Always ON Availability group treats these databases as 1 unitFail together, fail back togetherNo need to change DSN names or connection strings – which secondary becomes primary can be determined by PoliciesRead from secondaries and back up from secondariesIs the primary log truncated – NO – It is snapshot isolation for secondaries by default i.e. – There are 2 logsToday mirroring can also be readable. But in order to make mirroring readable you can have to make a snapshot which is not light or real timeIf you need more recent data, drop that snapshot and create a new one – Very heavy All sites should be on the same network, same subnet ; Anything over 40 kms apart will introduce latency 2 synchronous secondaries + 1 automatic failover pairRead / Write connections OR read Only Application intent – new param in connection string Lowers TCO ; Integrated with SSMS and PowershellEach available replica tries to recover from corrupted pages by requesting the page to a primaryIf primary page is corrupt, it broadcasts a request for a fresh copy to all secondaries. 823 – Action is taken if OS performed a CRC (Cyclic Redundancy Check) that failed on the data824 – Logical errors – torn write or bad page checksum829 – A page has been marked as restore pendingWhat cant be automatically repairedFile header page (page ID 0)Page 9 – database boot pageGAM – Global Allocation MapSGAM – Shared global Allocation MapPFS – page Free SpaceOnly 1 listener is required per cluster. Every copy of DB has a copy of the listener. If the cluster goes down then there is no listener. Mirroring / Logshipping can be done at an instance level; always ON at cluster level
Tunes queries when working on large datasets ( Warehousing scenarios) – 10 to 100 times more performance improvementsThere are 2 kinds of storage in databases – row and columns Stores rows of data on the same pageStores a column of data on the same page Major increase in speed and hard drive useColumn store indexes uses xVelocity /VertipaqYou cant delete / Insert and update data – It is read only Use partitions to avoid rebuilding indexDisable index, insert data, update index
Avoids creating Database level permissions – 9 server rolesEarlier heavy dependency on domain groupsT-SQL, management studio or Power shellInfrastructure needs to grow to sustain the growth of an enterprise. Example: group 1 DBA – manage instances, group 2 DBA – manage performance (run DMVs, profilers, - Sysadmin)9 server roles, bulkadmin was introduced in SQL Server 2005. So if you are using versions before that – 8 server rolesYou need to provide “View System State” authorization to a number of people2 optionsGrant one by oneGrant to domain group Create roles using T-SQL or Power Shell or simply SSMSAlter server role add userGrant
When SQL Server performs I/O – It sorts by partition. In order to improve performance, use RAID and strip data across partitionsLock escalation at the partition level rather than the table level – reduces locking contentionsPartition function – defines boundaries. Example: Month start date, Month end datePartition Scheme – Maps partition functions to file groupsRecommended 16 GB of RAM if large number of partitions are in useStatistics are not created by scanning all rows when a partition index is created or rebuilt. Instead the query optimizer uses default sampling algorithm to generate statsCREATE STATS (UPDATE STATS) with FULLSCAN clause
How Big, criticality, rate of data growth, Virtual or real ? – Consider licensesUser groups – SQL Bangalore Working and Networking is the only way to go