www.kastechssg.com [email protected]
Aug 15, 2020
v
www.kastechssg.com [email protected]
v Installation & Build
www.kastechssg.com [email protected]
Cluster Installation (Active-Active / Active-Passive).
DAN ( Database Area Network i.e. Multi application databases on single node) Dedicated servers (Single Application databases on single node)
Setting up Production, Development , SIT, UAT servers.
Installation of single instance /multi-instances (max 50)
SQL SERVER VERSIONS 2008,2008R2,2012,2014,2016
Creation of Maintenance plans ( application jobs, Backup jobs, index, update stats , database integrity check , database shrink jobs)
Creating databases , logins and grant permissions to users.
Applying patches ( Security patches, Service Packs, Cumulative Updates) on standalone and multiple nodes cluster.
Assessment of storage space depends on characteristics of Application.
Database Migration and Upgrades
v Security Management
www.kastechssg.com [email protected]
Creating users and Assigning permissions based on level of databases Access.
Hardening of Operating System as mentioned below:
Controlling ADMIN access to the database. Increase role based access instead of ADMIN( sysadmin) role.
Data Encryption between Application and database ( Symmetric and Asymmetric keys), Certificates, Transparent data Encryption , Cell level Encryption , Column level Encryption ( SQL 2016).
Remove unwanted users who are not authorized to login and perform specific task. Mode of Authentication (Windows and SQL mode).
Regular Audit checkups.
Update Security Patches on time.
Enable fire wall settings.
v High Availability
www.kastechssg.com [email protected]
Configuration and troubleshooting of following mechanisms.
Log shipping Database Mirroring
Failover Clustering
Always On
Replication ( Object Level)
v Database Maintenance and Monitoring
www.kastechssg.com [email protected]
Designing & Performing database maintenance tasks (Rebuild Index, Updates stats, Integrity check) during non business hours and weekends.
Disk management and monitoring space in disks.
24/7 on call production support.
Daily/ Emergency data refreshes as per customer request.
Maintaining Data highly available for the customers.
Regular database health checkup using automated scripts for critical tier-1 applications.
Designing and monitoring database backup and recovery models.
Migration of databases from Production to UAT/ DEV.
Deploying scripts on Production databases as per business need.
Implementing Change Requests and Work Orders on both Production and Non Production databases.
v Performance Tuning
www.kastechssg.com [email protected]
Index Maintenance
Stats Maintenance
Resolving Blocking, Locking and Deadlock issues.
Performance monitoring and resolving CPU, Memory Utilization bottle necks.
Resolving Tempdb Issues.
Resolving I/O , hardware, Network issues.
Interacting with Application team to resolve performance issues.
Query Tuning for long running queries and execution plan to view the query design.
Resolving space issue by adding space to disks and shrinking Database Log space.
Dynamic Management Views (DMV's), Stored Procedures (SP’s) , Regular DBCC (Database Consistency Checks to monitor performance bottle necks.
01 02 03 04 05 06 07 08 09 10
v Third Party Tools
www.kastechssg.com [email protected]
SQL Spot light tool By Quest : To monitor performance of SQL server
Light Speed by Quest : For backup and recovery
NetBackup : To archive the backups and retrieve when needed.
Robo Copy : To copy data and files across the servers.
SQL COMPARE by Redgate : Deploy the changes with out need of database recovery between the servers.
SCOM : Ticketing Tool.
v Documentation
www.kastechssg.com [email protected]
List of Production and Non Production
servers.
Installation and upgrades on servers.
Service packs and hot fixes applied to
servers.
Logins and roles that has
been removed.
Number of Application servers.
Process Improvements.
Filter out the Applications ( Tier-1,
Tier-2, Tier-3) depends up on criticality.
Number of database servers.
v Log shipping
www.kastechssg.com [email protected]
Primary database on primary server
Secondary database on secondary server
Log backups Copy Backup files secondary server
Restored Logs to secondary database
Backup performed by SQL server agent job on the secondary server
Copy and restore performed by SQL server Agent jobs on the secondary server
Database high availability.
Database primary (source) server and standby (target) server.
Availability of two copies- Primary database and Secondary database.
v Database Mirroring
www.kastechssg.com [email protected]
Principal Server
SQL Server 2008
Adventure Works DB
translog
SQL Server 2009
Adventure Works DB
translog
SQL Server xyz
Witness Server MSDB DB
Client Client Client Client
Network
v Database Mirroring
www.kastechssg.com [email protected]
• Disaster recovery and high availability technique • Two SQL Server instances on the same or different machines • Create primary instance of SQL Server called the principal • Create mirrored instance called the mirror. • Principal and Mirrored instance are always in Sync • In special cases, there can be a third SQL Server instance that acts as a witness
v Always On
www.kastechssg.com [email protected]
WSFC Resource Group for ‘MyAg’ Availability Group
Node 01
Node 01 Node 02 Node 03 Node 04 Node 05
SQL Server Instance
SQL Server Instance
SQL Server Instance
SQL Server Instance
SQL Server Instance
Primary Replica
Secondary Replica
Secondary Replica
Secondary Replica
Secondary Replica
‘MyAg’ Availability Group
Windows Server Failover Clustering (WSFC) Cluster
v Always On
www.kastechssg.com [email protected]
The Always On Availability Groups feature is a high-availability and disaster-recovery solution that provides an enterprise-level alternative to database mirroring.
Availability Group
Always On Availability Groups is a database mirroring technique that allows administrators to pull together a group of user databases that can failover together.
SQL SERVER 2012 : 4 (secondary Readable Replica) + 1 (Primary Replica)
SQL SERVER 2014 : 8 (Secondary Readable Replica) + 1 (Primary Replica)
v SQL SERVER 2016 new features
www.kastechssg.com [email protected]
TempDB : Multiple tempDB database files can configured at the time of installation which is nit supported in previous versions.
Query Store : It stores query texts, execution plans, performance metrics with in the database which allows to troubleshoot performance issue easily.
Temporal Tables : These are history tables which records complete data changes with respective to date and time.
JSON : JSON is supported in SQL SERVER to import, export and storing.
Live Query Statistics : SQL server is providing ability to view execution plan when the query is in active state which helps to find cause of long running queries.
Polybase : It integrates sql server query engine with external data in Azure and Hadoop blob storage.
Stretch Database : It lets to store achieve data in to cloud (AZURE) and current data in Local ( On Premises).
SQL SERVER
v SQL SERVER 2016 new features
www.kastechssg.com [email protected]
Security Features
Row Level Security : Data access can be restricted at database engine level
Dynamic Masking :Masked data is hidden to users and users who is having UNMASK permission can view it.
Always Encrypted : When application is having dedicated encrypted key it can access encrypted sensitive data in database.
v Log shipping Vs Mirroring
www.kastechssg.com [email protected]
Log shipping
Monitor server is an optional.
Log shipping is a manual failover process.
There will not be an automatic application connection redirection. It has to be redirected manually.
Principal server, mirror server, and witness server are the components involve in database mirroring set up.
Log shipping will have multiple secondary databases for the synchronization.
Witness server is an optional but it is a must for setting up automatic failover since witness is a watchdog instance to check if principal server is working
Both committed and uncommitted transactions are transferred to the secondary database.
Log shipping supports both bulk logged recovery model and full recovery model.
Mirroring
Database mirroring is an automatic failover process.
Primary server, secondary server and monitor server are the components in log shipping set up.
Application connection can be redirected automatically with proper configuration.
Database mirroring will not have multiple database destinations for mirroring
There will not be data transfer latency.
In database mirroring, mirror database cannot be used for reporting solution.
Only committed transactions are transferred to the mirror database.
Mirroring supports only Full Recovery model.
There will be data transfer latency.
In log shipping, secondary database can be used for reporting solution.
v Windows Cluster
www.kastechssg.com [email protected]
Requires more hardware.
High Cost.
Complex Design
A server cluster is a group of two or more physically separate servers working together to form one "virtual" server.
A Microsoft service called Microsoft Cluster Services (MSCS) is used to manage the clustered server(s).
If one node in the cluster fails, another machine in the cluster assumes the responsibilities of the downed node.
A SQL Server cluster is a virtual server composed of two or more server machines (nodes) running SQL Server.
v Windows Cluster
www.kastechssg.com [email protected]
Active Node
Shared Storage
Passive Node Windows 2012 SQL 2012
Windows 2012 SQL 2012
Windows 2012 SQL 2012
Heartbeat
Database Database
v Windows Cluster
www.kastechssg.com [email protected]
Active/Passive
• One node controlling SQL Server resources at one time and the other node is continuously in standby mode waiting for a failover to occur.
• In the event of a failover, the standby node will acquire control of the SQL Server resources.
Active/Active
• Each node in the cluster is running a separate and active instance of SQL Server. • In the event of a node failure, the other node is able to take control of the failed node's SQL
Server instance. This healthy node will then be running both instances of SQL Server—its own instance and the failed node's instance.
• This healthy node will then be running both instances of SQL Server—its own instance and the failed node's instance.