SlideShare ist ein Scribd-Unternehmen logo
1 von 74
תאריך סימוכין 1 Database Mirror for the exceptional DBA דוד יצחק  רפא"ל – מערכות לחימה מתקדמות בע"מ cimid@rafael.co.il 4.4.2011
Rafael Advanced Defense Systems Designs, develops, manufactures and supplies a wide range of high tech defense systems for air, land, sea and space applications. Sales in 2010 exceeding $1851M About 7000 Employees
Speaker Qualifications SQL Server , Oracle , Sybase ,Sybase Anywhere - application & infrastructure DBA . 14 years of SQL  experience, starting with version 6.5 Education :   BSC (Information System Engineer)  MBA Currently ME (System Engineering)
Agenda Database Mirroring Architecture Short Overview Automating Setup using T SQL & SQLCMD or Power shell Monitoring and Alerting What Next I Expect in Denali Planning (T&E) and Best Practices. Resources Next Session (?) :  Reporting Considerations Merge Replication and Database Mirror as a combined solution Database Mirroring and failover Cluster combination .Net coding with Database Mirror
Key Terms-1 Principal:  Source of the mirroring.  Can  mirror one or more databases on a single SQL Server instance to another SQL Server instance. You mirror a database, not a subset of the database Mirror:  The recipient of the mirroring from the principal DB server.  Kept in hot standby mode cannot be used directly in any way.  In continuous “restore” mode. Physical transaction records are continuously applied to this mirror database. Not available for direct DB  usage - exception is creating DB  snapshots
Key Terms- 2 Witness  Optional  Server that monitor the principal and mirror servers to provide a quorum  Partner   Opposite server when referring to the principal and mirror servers Endpoint  Bound to a network protocol 	Allows  SQL servers to communicate across the network.
Key Terms - 3 Session  Active relationship between the servers involved in DB  mirroring  Allows them to maintain server state information about one another Roles  Possible roles: Witness role—Can be any edition of a SQL Server (even SQL Server Express). Principal role Mirror role After a failure, the mirror server takes over the principal role, and the roles reverse.  
Key Terms - 4 Role Switching  Active relationship between the servers involved in DB  mirroring  Allows them to maintain server state information about one another The act of transferring the principal role to the mirror server. When a failure occurs : Principal role is switched to the mirror server DB is broughtonline as the principal DB
Copy-on-Write Technology 2. Log record  Copied to mirror server  over Network  I 1. Client  transaction Principle Server Mirror Server Mirror DB 3.physical log record is written to the mirror DB Principle DB 2.transaction is written to principal server’s transaction log 4. acknowledgment to principal server of its write success Mirror DB  is  exactly the same  as the Principal DB  *
Principle 1. Write the data to transaction log and commit the data DB Mirror High Performance 2. Send the transaction to mirror  Mirror 3. Write the data to transaction log and commit the data  4. Send  Acknowledgement to principle
Principle 1. Write the data to transaction log DB Mirror High Safety with Witness 2. Send the transaction to mirror  Mirror 3. Write the data to transaction log and commit the data  4. Send  Acknowledgement to principle  5. Commit the data
Database Mirroring Operating Modes: Sync/ Async Synchronous operations Committed transaction is committed on both partners of the database mirroring pair.  Ensure Zero Data loss. Add some latency cost - it is across two servers. Possible performance issues on slower networks.   Recovery is Faster – no uncommitted trans to be applied/undone  Failover can be automatic.  High-safety modes use synchronous operations. Enterprise/Standard Edition.
Database Mirroring Operating Modes: Sync/ Async Asynchronous  operations Transactions commit without waiting for the mirror server to write the log to disk.  Can increase performance but chance of some data  loss. Enterprise Edition Only .  Manual failover only.  High-performance mode uses asynchronous operations.
Flow to determine the operating Mode for DB
Operating Modes
Database Mirroring Operating Modesin SSMS
Database Mirroring Operating Modes: Sync/ Async Asyns / Sync depends on the transaction safety setting.  Control this setting through  SAFETY option when configuring with T-SQL. The default for SAFETY is FULL (synchronous operations). Set it to OFF for asynchronous operations.  With mirroring wizard, this option is set for you automatically. ALTER DATABASE $(MirrorDatabaseName) SET SAFETY OFF /ON
Failover variations 1 Automatic failover: high-availability mode Enabled with  a three-server configuration:  principal, mirror, witness server.  	Mirror DB must already be synchronized (Sync with the transactions as they are being written to the principal).  	Role switching is done automatically.
Failover variations 2 Manual failover:  high-protection mode No witness server &  you are using synchronous operations.  The principal and mirror are connected to each other Mirror DB is synchronized.  Role switching is done manually. High safety without automatic failover  mode. You are making the decision to start using the mirror server as the principal (no data loss).   ALTERDATABASE $(MirrorDatabaseName)SETSAFETYFULL ALTERDATABASE $(MirrorDatabaseName)SETPARTNERFAILOVER
Failover variations 3Forced service Mirror server being available but possibly not synchronized.  Mirror server can be forced to take over when the principal server has failed.  Possibly means data loss because the transactions were not synchronized. For high safety without automatic failover mode (high-protection mode)  or high-performance mode.
Failover variations 3Forced service ---Run the ALTER DATABASE databaseName SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS   SET @strSQL='ALTER DATABASE '+ @strDatabaseName+' SET PARTNER OFF' EXECsp_executesql@strSQL SET @strSQL='RESTORE DATABASE '+ @strDatabaseName+' WITH RECOVERY' EXECsp_executesql@strSQL PRINT'Bringing '+ @strDatabaseName+' ONLINE' OR  ALTER DATABASE <DatabaseName> SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS
Rafael  Choice   Asynchronous mirroring without automatic failover . Mirroring asynchronously (high-performance mode) Failover is performed manually.  when you respond to a failure, you can make a decision as to whether to fail over all databases to the mirroring partners or simply try to resolve the failing database.
Steps to Set Up DB mirroringIn General Create endpoints on all of the instances.  Create a login for the service accounts of the other instances if they do not exist.  Grant connect permissions to the service accounts of the other instances on the endpoint.  Set the principal partner for the mirror database on the mirror partner.
Steps to Set Up DB mirroring In General  Set the mirror partner for the principal database on the principal partner.  If using a witness server, set the witness partner on the principal partner to enable automatic failover.  If not using a witness server, you may want to change the operating mode from “High safety (synchronous)” to “High performance (asynchronous).  
Automating Setup – 3 options T-SQL with SPs and linked servers Alternatives - script creates a connection to each server T SQL with sqlcmd  & CONNECT command .  PowerShell .  I will show option T SQL with sqlcmd
T-SQL with SPs & linked servers disadvantage Create linked servers to allow MSSQL run commands against both partners and witness. SET @PrincipalServer=@@ServerName SET @CurrDBName=DB_NAME() SET @EPName='MirroringEndPoint' -- Make sure linked server to mirror exists  EXEC @Results =dbo.dba_ManageLinkedServer @ServerName= @ MirrorServer,                 @Action ='create' IF @Results <> 0  BEGIN RETURN @Results; END
Automating Setup – PowerShell 1 PowerShell has the ability to load and use .Net objects. Load the SMO objects into PowerShell and use them directly in the script.  The SQL Team separated some of the SMO functions into separate DLLs in SQL Server 2008.  The script checks the internal version of SMO and loads the SMOExtended object if you are using the SQL Server 2008 version of SMO. Disadvantage: SSMS support partially debugging Power Shell. Need  editor.   
Automating Setup – PowerShell 2
Automating Setup – PowerShell 3
Automating Setup – PowerShell 4
Automating Setup - SQLCMD Command-line utility  Next generation of the isql and osql utilities Can use  variables within sqlcmd input files or scripts. Admins  have a lot of scripts  each performs its own functions on a specific server.  Consolidate into a single script using the :CONNECT command.
Sqlcmd- Example 1 with variables  -- Set here Principal Server name  :setvarPrincipalServer  "userWXP.domain.local" --Set DBs names to DB mirroring  (Principal databases) . :setvarMirrorDatabaseName "AdventureWorks" --Set backup directory on  principal server  . :setvarBackupDirectory "D:atabase_Mirroring“ --Make a connection to Principal Server using  Windows Authentication :CONNECT $(PrincipalServer) GO BACKUPDATABASE  [$(MirrorDatabaseName)] TO DISK='$(BackupDirectory)(MirrorDatabaseName).bak' WITHINIT; Go
Sqlcmd - Example 2 with variables file  /*	Script variables */ :r "d:obsssqlb_env.sql" /* End Of Script variables */ :CONNECT $(PrincipalServer) GO BACKUPDATABASE  [$(MirrorDatabaseName)]  TODISK='$(BackupDirectory)(MirrorDatabaseName).bak‘ WITHINIT; Go
Prepare the Database for MirroringSQLCMD Version Make  sure the compatibility level is 90 - the min  level required for database mirroring.   If <  90, sets the compatibility level to the highest setting supported by the version of SQL Server.  Make  sure the database is using the Full Recovery model.  If not  changes the recovery model to Full .
Prepare the Database for MirroringSQLCMD Version SELECT @Compatibility =D.compatibility_level,                @RecoveryModel=D.recovery_model,                @MirrState=DM.mirroring_state FROMsys.databases D  INNERJOINsys.database_mirroring DM ONDM.database_id=D.database_id WHERED.database_id= @DBID  IF @MirrStateISNOTNULL BEGIN RAISERROR('Database [%s] is already configured for mirroring on server [%s].',                    16, 1, @DBName, @Server); RETURN; END IF @Compatibility < 90  … ELSEIF @MaxCompat>= 100 -- SQL Server 2008+  … IF @RecoveryModel<> 1 -- Full Recovery Model
11.1&11.2 Procedure to failover   from/to Principal/mirror Server SQLCMD Version /*	Script variables */ :r "D:obsssqlb_env.sql“ --Detects any DB that fit the criteria .  --Issues the failback command one at a time for each DB . USE[master] GO SELECTDB_ID(N'$(MirrorDatabaseName)')AS [Database ID]; GO IFEXISTS(SELECT 1 FROMsys.database_mirroringWHEREdatabase_id=DB_ID(N'$(MirrorDatabaseName)')ANDmirroring_role_desc='PRINCIPAL') ALTERDATABASE $(MirrorDatabaseName)SETSAFETYFULL GO SELECTDB_ID(N'$(MirrorDatabaseName)')AS [Database ID]; GO IFEXISTS(SELECT 1 FROMsys.database_mirroringWHEREdatabase_id=DB_ID(N'$(MirrorDatabaseName)')ANDmirroring_role_desc='PRINCIPAL') ALTERDATABASE $(MirrorDatabaseName)SETPARTNERFAILOVER GO
 Database mirroring status table :  dbm_monitor_data table Undocumented table  in  msdb . sp_dbmmonitorupdate  creates, updates, truncates  the database mirroring status table.  DB Mirroring Monitor  Job creates this table - Automatically the first time a database mirroring status update occurs.  DB Mirroring Monitor & DB  Mirroring Monitor Job call  sp_dbmmonitorupdate system sp Frequently of updates ?  Depends on the method used and the configuration settings.
 Database mirroring status table :    select * from msdb.dbo.dbm_monitor_data order by local_timedesc Query the db  mirroring status table on both the principal server and the mirror server. redo_rate is always 0 on the principal server - does not redo transactions.
  Database Mirroring Monitor Job 1 Update the DB mirroring monitor table (sp_dbmmonitorupdate system sp) Default schedule is to run once a minute Can change  from 1 to 120 minutes.  If SQL Server Agent is disabled, Job cannot run. Created automatically when you start a database mirroring session using SSMS or T SQL
  Database Mirroring Monitor Job 2 sp_dbmmonitoraddmonitoring Creates the Job with a default schedule to run every minute. Example: Create a new Database Mirroring Monitor Job that runs every 10 minutes. EXEC sp_dbmmonitoraddmonitoring 10 sp_dbmmonitordropmonitoring Drop the job.  No parameters  Example:  EXEC sp_dbmmonitordropmonitoring
  Database Mirroring Monitor Job 3 sp_dbmmonitorchangemonitoring:  update the interval in which an existing Database Mirroring Monitor Job will run.  2 parameters Parameter argument is 1, which means update period, followed by the new update interval for the value argument.  Example:  run every 15 minutes. EXEC sp_dbmmonitorchangemonitoring 1, 15  
  Understanding Warning Thresholds 1 Events that are written to the Windows Event Log whenever  the threshold exceeded.  Can configure alerts to fire based on the error numbers for these events: Unsent log (error number 32042):  Number of kilobytes in unsent logs that can accumulate on the principal server before this event is raised.  Important Communication issue between partners  ( high-performance mode ) In high-safety mode if DB mirroring has been paused.     
  Understanding Warning Thresholds 2   Unrestored log (error number 32043):  Configure the number of kilobytes in unrestored logs accumulated on the mirror server before this event is raised.  Determine the amount of time it will take to roll forward the log on the mirror server in failover.  Generally because the I/O subsystem on the mirror server cannot keep up with the logs coming from the principal server.
  Understanding Warning Thresholds 3 Oldest Unsent transaction (error number 32040):  Number of minutes worth of transactions that can accumulate in the send queue on the principal server before this event is raised.  Communication issue between partners - high-performance mode  In high-safety mode if DB mirroring has been paused.
  Understanding Warning Thresholds 4 Mirror commit overhead (error number 32044):  Configure the number of milliseconds in the average transaction delay that can be tolerated on the principal server before this event is raised.  The time the principal server waits for the mirror server to write a transaction to the redo queue - only relevant in high-safety mode   
   Using the Database Mirroring Monitor 1 Refreshes status every 30 sec  (async connections to principal &mirror servers). Member of the dbm_monitor db  role in MSDB  (not sysadmin server role)   have to wait for the data to be updated by the DB  Mirroring Monitor Job  Step 1: Registering Mirrored Databases Step 2: Performing Health Checks  
   Using the Database Mirroring Monitor 2
   Using the Database Mirroring Monitor 3 Principal log : status of principal server as of the time displayed Unsent log Num of kilobytes waiting in the send queue. Oldest unsent transaction Oldest transaction in the send queue waiting to be sent to the mirror server   Amount of potential data loss (in time) in the event of a failure. Time to send log (estimated): Estimate for the amount of time for the principal server to transmit transactions in the send queue to the mirror server.
   Using the Database Mirroring Monitor 4 Current send rate Rate in kilobytes  transactions are being sent to the mirror server.  Current rate of new transactions ,[object Object],Rate in kilobytes of  new transactions being written to the log on the principal
   Using the Database Mirroring Monitor 5 ,[object Object],  Unrestored log Num of kilobytes waiting in the redo queue.   Time to restore log (estimated): Estimate time for mirror server to apply the transactions waiting in the redo queue to the mirror DB.   Current restore rate Rate in kilobytes that transactions are being restored to mirror DB.  
   Using the Database Mirroring Monitor 6 Mirror commit overhead Only for high-safety mode.  Num of milliseconds of average delay per transaction you can accept while the principal server waits for a transaction to write to the redo queue on the mirror server before a warning is generated on the principal server.   Time to send and restore all current log (estimated):  Estimated time to send and restore all of the transactions that have currently been committed on the principal server to the mirror server.  Can  be less than   “Time to send log (estimated)” + “Time to restore log (estimated)”  Because these are parallel operations.
    Monitoring using system SP sp_dbmmonitorresults Directly  returning rows from DB mirroring status table.  Parameters:  @database name: limits the result set to a single database. @mode: Optional parameter that specifies the number of rows returned by the result set. The required input is an integer value between 0 and 9.  • 0: Last row • 1: Last 2 hours ...... • 8: Last 1,000 rows • 9: Last 1,000,000 rows or essentially all rows   @update_table  : Optional parameter  1 or 0 that determines whether the DB  mirroring status table is updated before returning the result set.
    Monitoring using system SP sp_dbmmonitorresults EXECsp_dbmmonitorresults @database_name=N'adventureWorks', @mode = 6, @update_table=
    Managing Warning Thresholds using system SP 1 Instead of the Database Mirroring Monitor 3  SPs  configure, view, and remove warning thresholds:  sp_dbmmonitorchangealert,  sp_dbmmonitorhelpalert sp_dbmmonitordropalert.
= @average_delay, @enabled = 1;     Managing Warning Thresholds using system SP 2 --Warn if the unset log exceeds the  the threshold in KB execsys.sp_dbmmonitorchangealert@database_name=N'$(MirrorDatabaseName)',@alert_id=2,@threshold = @enable_send_queue, @enabled = 1; --Warn if the unrestored log exceeds the  the threshold in KB execsys.sp_dbmmonitorchangealert@database_name=N'$(MirrorDatabaseName)',@alert_id=3,@threshold = @redo_queue, @enabled = 1; --Warn if the age  of the oldest unset transaction  exceeds  the threshold in minutes execsys.sp_dbmmonitorchangealert@database_name=N'$(MirrorDatabaseName)',@alert_id=1,@threshold = @time_behind, @enabled = 1; --Warn if the mirror commit overhead exceeds  the threshold in milliseconds execsys.sp_dbmmonitorchangealert@database_name=N'$(MirrorDatabaseName)',@alert_id=4,@threshold
= @average_delay, @enabled = 1; Top wait Events Checks Network Waits DB mirror
= @average_delay, @enabled = 1; Top wait Events Checks Network Waits DB mirror 2
Read-writeWorkload Real-time Reporting Real-time Reporting Fast Incremental Backups Fast Backups ,[object Object]
Use fast backups on mirror DB
More than 1 mirror DB destination to improve DRP  What Next I Expect in DenaliOffload Processing– Improve Primary Performance! Real-time  Queries Continuous redo  shipping, validation & apply  Mirror DB Principle DB
Disasters happen every day...its a fact !  Disasters cost money so why suffer by being unprepared?  Organizations that survive typically have: management foresight tested Processes & procedures back-up facilities A PLAN!!
Disaster Recovery Process ,[object Object]
Data Centric Environments
צמצום “Mean Time To Recovery”   אחרי אירועDRP(redirect) X LAN/WAN Disaster Recovery Site	 Production Site (resync backwards after source restoration)
Sample mirroring deployment Plan
Sample mirroring deployment Plan
ד"ר עמי הרי  קורס T&E הנדסת מערכת טכניון
מדדים  (RTO) Recovery Time Objective  הזמן המרבי עד לחזרתה של המערכת לתפקוד מלא עבור תהליכים עסקיים שונים  (RPO) Recovery Point Objective הזמן המרבי שלגבי ניתן לאבד מידע . כמות המידע שהארגון מוכן לאבד ? יום שלם , מספר שעות /דקות  משתנה באותה סקלה כמו RTO אבל לא תלוי בו (מערכות מסחר RPO אפס אבל RTO גדול יותר) . Service Level Agreement בהקשר לזה מדברים על זמינות , MTTF(Mean Time Between Failure) , MTTR (Mean time To recover)  זמינות גבוהה (High availability)  יכולת של המשתמש לגשת למערכת לצורך אחזור נתונים בכל עת  חוסר זמינות= downtime
מדדים : ניתוח סיכונים(Risk Analysis)  תהליך לאיתור סיכונים צפויים ביישום תהליך או מוצר חדש.  כולל  הערכת ההסתברות וההשפעה הצפויה, ודרכי התגובה, של כל סיכון על מנת לגדר אותו ככל האפשר. רמת הסיכון נקבעת על בסיס המכפלה של "הסיכוי לתקלה "ו"עוצמת התקלה": Risk Level = Probability*Impact
תעדוף  כשבונים אתר DRP באתר חלופי – קובעים את סדר השחזור לפי רמת החשיבות של המערכות  אילו מערכות לא ישוחזרו רמת השירות שתינתן במסגרת אילוצי מצב חירום
מדדי ביצועים
מדדי ביצועים
שגרה  האם אנו מוכנים לאירוע DRP ?
אירוע DRP הוכרז מה עושים ?

Weitere ähnliche Inhalte

Was ist angesagt?

High Availbilty In Sql Server
High Availbilty In Sql ServerHigh Availbilty In Sql Server
High Availbilty In Sql Server
Rishikesh Tiwari
 
Sql server’s high availability technologies
Sql server’s high availability technologiesSql server’s high availability technologies
Sql server’s high availability technologies
venkatchs
 
Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always on
dilip nayak
 
Pre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctlyPre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctly
Antonios Chatzipavlis
 

Was ist angesagt? (10)

SQL Server High Availability Solutions (Pros & Cons)
SQL Server High Availability Solutions (Pros & Cons)SQL Server High Availability Solutions (Pros & Cons)
SQL Server High Availability Solutions (Pros & Cons)
 
Troubleshooting sql server
Troubleshooting sql serverTroubleshooting sql server
Troubleshooting sql server
 
High Availbilty In Sql Server
High Availbilty In Sql ServerHigh Availbilty In Sql Server
High Availbilty In Sql Server
 
SQL Server Clustering Part1
SQL Server Clustering Part1SQL Server Clustering Part1
SQL Server Clustering Part1
 
Sql server’s high availability technologies
Sql server’s high availability technologiesSql server’s high availability technologies
Sql server’s high availability technologies
 
Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014
 
Alwayson AG enhancements
Alwayson AG enhancementsAlwayson AG enhancements
Alwayson AG enhancements
 
Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always on
 
Pre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctlyPre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctly
 
SQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesSQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New Features
 

Ähnlich wie Database Mirror for the exceptional DBA – David Izahk

Effective Usage of SQL Server 2005 Database Mirroring
Effective Usage of SQL Server 2005 Database MirroringEffective Usage of SQL Server 2005 Database Mirroring
Effective Usage of SQL Server 2005 Database Mirroring
webhostingguy
 
Be05 introduction to sql azure
Be05   introduction to sql azureBe05   introduction to sql azure
Be05 introduction to sql azure
DotNetCampus
 
Disaster recovery with sql server
Disaster recovery with sql serverDisaster recovery with sql server
Disaster recovery with sql server
Rajib Kundu
 
Microsoft SharePoint Disaster Recovery to Azure
Microsoft SharePoint Disaster Recovery to AzureMicrosoft SharePoint Disaster Recovery to Azure
Microsoft SharePoint Disaster Recovery to Azure
David J Rosenthal
 

Ähnlich wie Database Mirror for the exceptional DBA – David Izahk (20)

Effective Usage of SQL Server 2005 Database Mirroring
Effective Usage of SQL Server 2005 Database MirroringEffective Usage of SQL Server 2005 Database Mirroring
Effective Usage of SQL Server 2005 Database Mirroring
 
SQL Server - High availability
SQL Server - High availabilitySQL Server - High availability
SQL Server - High availability
 
Sql Sever Presentation.pptx
Sql Sever Presentation.pptxSql Sever Presentation.pptx
Sql Sever Presentation.pptx
 
High availability solution database mirroring
High availability solution database mirroringHigh availability solution database mirroring
High availability solution database mirroring
 
Continuent Tungsten - Scalable Saa S Data Management
Continuent Tungsten - Scalable Saa S Data ManagementContinuent Tungsten - Scalable Saa S Data Management
Continuent Tungsten - Scalable Saa S Data Management
 
SQL Server Clustering and High Availability
SQL Server Clustering and High AvailabilitySQL Server Clustering and High Availability
SQL Server Clustering and High Availability
 
GWAB 2015 - Data Plaraform
GWAB 2015 - Data PlaraformGWAB 2015 - Data Plaraform
GWAB 2015 - Data Plaraform
 
Be05 introduction to sql azure
Be05   introduction to sql azureBe05   introduction to sql azure
Be05 introduction to sql azure
 
Checklist_AC.pdf
Checklist_AC.pdfChecklist_AC.pdf
Checklist_AC.pdf
 
Why you should(n't) run your databases in the cloud
Why you should(n't) run your databases in the cloudWhy you should(n't) run your databases in the cloud
Why you should(n't) run your databases in the cloud
 
Sql Server
Sql ServerSql Server
Sql Server
 
Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administrators
 
Disaster recovery with sql server
Disaster recovery with sql serverDisaster recovery with sql server
Disaster recovery with sql server
 
Ibm db2 case study
Ibm db2 case studyIbm db2 case study
Ibm db2 case study
 
Pandora FMS: DB2 Enterprise Plugin
Pandora FMS: DB2 Enterprise PluginPandora FMS: DB2 Enterprise Plugin
Pandora FMS: DB2 Enterprise Plugin
 
SQL Injection
SQL InjectionSQL Injection
SQL Injection
 
SharePoint Security in an Insecure World - AUSPC 2012
SharePoint Security in an Insecure World - AUSPC 2012SharePoint Security in an Insecure World - AUSPC 2012
SharePoint Security in an Insecure World - AUSPC 2012
 
Under the Hood 11g Identity Management
Under the Hood  11g Identity ManagementUnder the Hood  11g Identity Management
Under the Hood 11g Identity Management
 
Schema-based multi-tenant architecture using Quarkus &amp; Hibernate-ORM.pdf
Schema-based multi-tenant architecture using Quarkus &amp; Hibernate-ORM.pdfSchema-based multi-tenant architecture using Quarkus &amp; Hibernate-ORM.pdf
Schema-based multi-tenant architecture using Quarkus &amp; Hibernate-ORM.pdf
 
Microsoft SharePoint Disaster Recovery to Azure
Microsoft SharePoint Disaster Recovery to AzureMicrosoft SharePoint Disaster Recovery to Azure
Microsoft SharePoint Disaster Recovery to Azure
 

Mehr von sqlserver.co.il

Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013
sqlserver.co.il
 
Things you can find in the plan cache
Things you can find in the plan cacheThings you can find in the plan cache
Things you can find in the plan cache
sqlserver.co.il
 
Sql server user group news january 2013
Sql server user group news   january 2013Sql server user group news   january 2013
Sql server user group news january 2013
sqlserver.co.il
 
SQL Explore 2012: P&T Part 3
SQL Explore 2012: P&T Part 3SQL Explore 2012: P&T Part 3
SQL Explore 2012: P&T Part 3
sqlserver.co.il
 
SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2
sqlserver.co.il
 
SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1
sqlserver.co.il
 
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended EventsSQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
sqlserver.co.il
 
SQL Explore 2012 - Michael Zilberstein: ColumnStore
SQL Explore 2012 - Michael Zilberstein: ColumnStoreSQL Explore 2012 - Michael Zilberstein: ColumnStore
SQL Explore 2012 - Michael Zilberstein: ColumnStore
sqlserver.co.il
 
SQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DACSQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DAC
sqlserver.co.il
 
SQL Explore 2012 - Aviad Deri: Spatial
SQL Explore 2012 - Aviad Deri: SpatialSQL Explore 2012 - Aviad Deri: Spatial
SQL Explore 2012 - Aviad Deri: Spatial
sqlserver.co.il
 
Bi303 data warehousing with fast track and pdw - Assaf Fraenkel
Bi303 data warehousing with fast track and pdw - Assaf FraenkelBi303 data warehousing with fast track and pdw - Assaf Fraenkel
Bi303 data warehousing with fast track and pdw - Assaf Fraenkel
sqlserver.co.il
 

Mehr von sqlserver.co.il (20)

Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013
 
Things you can find in the plan cache
Things you can find in the plan cacheThings you can find in the plan cache
Things you can find in the plan cache
 
Sql server user group news january 2013
Sql server user group news   january 2013Sql server user group news   january 2013
Sql server user group news january 2013
 
DAC 2012
DAC 2012DAC 2012
DAC 2012
 
Query handlingbytheserver
Query handlingbytheserverQuery handlingbytheserver
Query handlingbytheserver
 
Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012
 
Products.intro.forum version
Products.intro.forum versionProducts.intro.forum version
Products.intro.forum version
 
SQL Explore 2012: P&T Part 3
SQL Explore 2012: P&T Part 3SQL Explore 2012: P&T Part 3
SQL Explore 2012: P&T Part 3
 
SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2
 
SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1
 
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended EventsSQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
 
SQL Explore 2012 - Michael Zilberstein: ColumnStore
SQL Explore 2012 - Michael Zilberstein: ColumnStoreSQL Explore 2012 - Michael Zilberstein: ColumnStore
SQL Explore 2012 - Michael Zilberstein: ColumnStore
 
SQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DACSQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DAC
 
SQL Explore 2012 - Aviad Deri: Spatial
SQL Explore 2012 - Aviad Deri: SpatialSQL Explore 2012 - Aviad Deri: Spatial
SQL Explore 2012 - Aviad Deri: Spatial
 
מיכאל
מיכאלמיכאל
מיכאל
 
נועם
נועםנועם
נועם
 
עדי
עדיעדי
עדי
 
מיכאל
מיכאלמיכאל
מיכאל
 
Bi303 data warehousing with fast track and pdw - Assaf Fraenkel
Bi303 data warehousing with fast track and pdw - Assaf FraenkelBi303 data warehousing with fast track and pdw - Assaf Fraenkel
Bi303 data warehousing with fast track and pdw - Assaf Fraenkel
 
DBCC - Dubi Lebel
DBCC - Dubi LebelDBCC - Dubi Lebel
DBCC - Dubi Lebel
 

Database Mirror for the exceptional DBA – David Izahk

  • 1. תאריך סימוכין 1 Database Mirror for the exceptional DBA דוד יצחק רפא"ל – מערכות לחימה מתקדמות בע"מ cimid@rafael.co.il 4.4.2011
  • 2. Rafael Advanced Defense Systems Designs, develops, manufactures and supplies a wide range of high tech defense systems for air, land, sea and space applications. Sales in 2010 exceeding $1851M About 7000 Employees
  • 3. Speaker Qualifications SQL Server , Oracle , Sybase ,Sybase Anywhere - application & infrastructure DBA . 14 years of SQL experience, starting with version 6.5 Education : BSC (Information System Engineer) MBA Currently ME (System Engineering)
  • 4. Agenda Database Mirroring Architecture Short Overview Automating Setup using T SQL & SQLCMD or Power shell Monitoring and Alerting What Next I Expect in Denali Planning (T&E) and Best Practices. Resources Next Session (?) : Reporting Considerations Merge Replication and Database Mirror as a combined solution Database Mirroring and failover Cluster combination .Net coding with Database Mirror
  • 5. Key Terms-1 Principal: Source of the mirroring. Can mirror one or more databases on a single SQL Server instance to another SQL Server instance. You mirror a database, not a subset of the database Mirror: The recipient of the mirroring from the principal DB server. Kept in hot standby mode cannot be used directly in any way. In continuous “restore” mode. Physical transaction records are continuously applied to this mirror database. Not available for direct DB usage - exception is creating DB snapshots
  • 6. Key Terms- 2 Witness Optional Server that monitor the principal and mirror servers to provide a quorum Partner Opposite server when referring to the principal and mirror servers Endpoint Bound to a network protocol Allows SQL servers to communicate across the network.
  • 7. Key Terms - 3 Session Active relationship between the servers involved in DB mirroring Allows them to maintain server state information about one another Roles Possible roles: Witness role—Can be any edition of a SQL Server (even SQL Server Express). Principal role Mirror role After a failure, the mirror server takes over the principal role, and the roles reverse.  
  • 8. Key Terms - 4 Role Switching Active relationship between the servers involved in DB mirroring Allows them to maintain server state information about one another The act of transferring the principal role to the mirror server. When a failure occurs : Principal role is switched to the mirror server DB is broughtonline as the principal DB
  • 9. Copy-on-Write Technology 2. Log record Copied to mirror server over Network I 1. Client transaction Principle Server Mirror Server Mirror DB 3.physical log record is written to the mirror DB Principle DB 2.transaction is written to principal server’s transaction log 4. acknowledgment to principal server of its write success Mirror DB is exactly the same as the Principal DB *
  • 10. Principle 1. Write the data to transaction log and commit the data DB Mirror High Performance 2. Send the transaction to mirror Mirror 3. Write the data to transaction log and commit the data 4. Send Acknowledgement to principle
  • 11. Principle 1. Write the data to transaction log DB Mirror High Safety with Witness 2. Send the transaction to mirror Mirror 3. Write the data to transaction log and commit the data 4. Send Acknowledgement to principle 5. Commit the data
  • 12. Database Mirroring Operating Modes: Sync/ Async Synchronous operations Committed transaction is committed on both partners of the database mirroring pair. Ensure Zero Data loss. Add some latency cost - it is across two servers. Possible performance issues on slower networks. Recovery is Faster – no uncommitted trans to be applied/undone Failover can be automatic. High-safety modes use synchronous operations. Enterprise/Standard Edition.
  • 13. Database Mirroring Operating Modes: Sync/ Async Asynchronous operations Transactions commit without waiting for the mirror server to write the log to disk. Can increase performance but chance of some data loss. Enterprise Edition Only . Manual failover only. High-performance mode uses asynchronous operations.
  • 14. Flow to determine the operating Mode for DB
  • 17. Database Mirroring Operating Modes: Sync/ Async Asyns / Sync depends on the transaction safety setting. Control this setting through SAFETY option when configuring with T-SQL. The default for SAFETY is FULL (synchronous operations). Set it to OFF for asynchronous operations. With mirroring wizard, this option is set for you automatically. ALTER DATABASE $(MirrorDatabaseName) SET SAFETY OFF /ON
  • 18. Failover variations 1 Automatic failover: high-availability mode Enabled with a three-server configuration: principal, mirror, witness server. Mirror DB must already be synchronized (Sync with the transactions as they are being written to the principal). Role switching is done automatically.
  • 19. Failover variations 2 Manual failover: high-protection mode No witness server & you are using synchronous operations. The principal and mirror are connected to each other Mirror DB is synchronized. Role switching is done manually. High safety without automatic failover mode. You are making the decision to start using the mirror server as the principal (no data loss).   ALTERDATABASE $(MirrorDatabaseName)SETSAFETYFULL ALTERDATABASE $(MirrorDatabaseName)SETPARTNERFAILOVER
  • 20. Failover variations 3Forced service Mirror server being available but possibly not synchronized. Mirror server can be forced to take over when the principal server has failed. Possibly means data loss because the transactions were not synchronized. For high safety without automatic failover mode (high-protection mode) or high-performance mode.
  • 21. Failover variations 3Forced service ---Run the ALTER DATABASE databaseName SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS SET @strSQL='ALTER DATABASE '+ @strDatabaseName+' SET PARTNER OFF' EXECsp_executesql@strSQL SET @strSQL='RESTORE DATABASE '+ @strDatabaseName+' WITH RECOVERY' EXECsp_executesql@strSQL PRINT'Bringing '+ @strDatabaseName+' ONLINE' OR ALTER DATABASE <DatabaseName> SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS
  • 22. Rafael Choice Asynchronous mirroring without automatic failover . Mirroring asynchronously (high-performance mode) Failover is performed manually. when you respond to a failure, you can make a decision as to whether to fail over all databases to the mirroring partners or simply try to resolve the failing database.
  • 23. Steps to Set Up DB mirroringIn General Create endpoints on all of the instances. Create a login for the service accounts of the other instances if they do not exist. Grant connect permissions to the service accounts of the other instances on the endpoint. Set the principal partner for the mirror database on the mirror partner.
  • 24. Steps to Set Up DB mirroring In General Set the mirror partner for the principal database on the principal partner. If using a witness server, set the witness partner on the principal partner to enable automatic failover. If not using a witness server, you may want to change the operating mode from “High safety (synchronous)” to “High performance (asynchronous).  
  • 25. Automating Setup – 3 options T-SQL with SPs and linked servers Alternatives - script creates a connection to each server T SQL with sqlcmd & CONNECT command . PowerShell . I will show option T SQL with sqlcmd
  • 26. T-SQL with SPs & linked servers disadvantage Create linked servers to allow MSSQL run commands against both partners and witness. SET @PrincipalServer=@@ServerName SET @CurrDBName=DB_NAME() SET @EPName='MirroringEndPoint' -- Make sure linked server to mirror exists EXEC @Results =dbo.dba_ManageLinkedServer @ServerName= @ MirrorServer, @Action ='create' IF @Results <> 0 BEGIN RETURN @Results; END
  • 27. Automating Setup – PowerShell 1 PowerShell has the ability to load and use .Net objects. Load the SMO objects into PowerShell and use them directly in the script. The SQL Team separated some of the SMO functions into separate DLLs in SQL Server 2008. The script checks the internal version of SMO and loads the SMOExtended object if you are using the SQL Server 2008 version of SMO. Disadvantage: SSMS support partially debugging Power Shell. Need editor.  
  • 28. Automating Setup – PowerShell 2
  • 29. Automating Setup – PowerShell 3
  • 30. Automating Setup – PowerShell 4
  • 31. Automating Setup - SQLCMD Command-line utility Next generation of the isql and osql utilities Can use variables within sqlcmd input files or scripts. Admins have a lot of scripts each performs its own functions on a specific server. Consolidate into a single script using the :CONNECT command.
  • 32. Sqlcmd- Example 1 with variables -- Set here Principal Server name :setvarPrincipalServer "userWXP.domain.local" --Set DBs names to DB mirroring (Principal databases) . :setvarMirrorDatabaseName "AdventureWorks" --Set backup directory on principal server . :setvarBackupDirectory "D:atabase_Mirroring“ --Make a connection to Principal Server using Windows Authentication :CONNECT $(PrincipalServer) GO BACKUPDATABASE [$(MirrorDatabaseName)] TO DISK='$(BackupDirectory)(MirrorDatabaseName).bak' WITHINIT; Go
  • 33. Sqlcmd - Example 2 with variables file /* Script variables */ :r "d:obsssqlb_env.sql" /* End Of Script variables */ :CONNECT $(PrincipalServer) GO BACKUPDATABASE [$(MirrorDatabaseName)] TODISK='$(BackupDirectory)(MirrorDatabaseName).bak‘ WITHINIT; Go
  • 34. Prepare the Database for MirroringSQLCMD Version Make sure the compatibility level is 90 - the min level required for database mirroring. If < 90, sets the compatibility level to the highest setting supported by the version of SQL Server. Make sure the database is using the Full Recovery model. If not changes the recovery model to Full .
  • 35. Prepare the Database for MirroringSQLCMD Version SELECT @Compatibility =D.compatibility_level, @RecoveryModel=D.recovery_model, @MirrState=DM.mirroring_state FROMsys.databases D INNERJOINsys.database_mirroring DM ONDM.database_id=D.database_id WHERED.database_id= @DBID IF @MirrStateISNOTNULL BEGIN RAISERROR('Database [%s] is already configured for mirroring on server [%s].', 16, 1, @DBName, @Server); RETURN; END IF @Compatibility < 90 … ELSEIF @MaxCompat>= 100 -- SQL Server 2008+ … IF @RecoveryModel<> 1 -- Full Recovery Model
  • 36. 11.1&11.2 Procedure to failover from/to Principal/mirror Server SQLCMD Version /* Script variables */ :r "D:obsssqlb_env.sql“ --Detects any DB that fit the criteria . --Issues the failback command one at a time for each DB . USE[master] GO SELECTDB_ID(N'$(MirrorDatabaseName)')AS [Database ID]; GO IFEXISTS(SELECT 1 FROMsys.database_mirroringWHEREdatabase_id=DB_ID(N'$(MirrorDatabaseName)')ANDmirroring_role_desc='PRINCIPAL') ALTERDATABASE $(MirrorDatabaseName)SETSAFETYFULL GO SELECTDB_ID(N'$(MirrorDatabaseName)')AS [Database ID]; GO IFEXISTS(SELECT 1 FROMsys.database_mirroringWHEREdatabase_id=DB_ID(N'$(MirrorDatabaseName)')ANDmirroring_role_desc='PRINCIPAL') ALTERDATABASE $(MirrorDatabaseName)SETPARTNERFAILOVER GO
  • 37.  Database mirroring status table : dbm_monitor_data table Undocumented table in msdb . sp_dbmmonitorupdate creates, updates, truncates the database mirroring status table. DB Mirroring Monitor Job creates this table - Automatically the first time a database mirroring status update occurs. DB Mirroring Monitor & DB Mirroring Monitor Job call sp_dbmmonitorupdate system sp Frequently of updates ? Depends on the method used and the configuration settings.
  • 38.  Database mirroring status table :  select * from msdb.dbo.dbm_monitor_data order by local_timedesc Query the db mirroring status table on both the principal server and the mirror server. redo_rate is always 0 on the principal server - does not redo transactions.
  • 39.   Database Mirroring Monitor Job 1 Update the DB mirroring monitor table (sp_dbmmonitorupdate system sp) Default schedule is to run once a minute Can change from 1 to 120 minutes. If SQL Server Agent is disabled, Job cannot run. Created automatically when you start a database mirroring session using SSMS or T SQL
  • 40.   Database Mirroring Monitor Job 2 sp_dbmmonitoraddmonitoring Creates the Job with a default schedule to run every minute. Example: Create a new Database Mirroring Monitor Job that runs every 10 minutes. EXEC sp_dbmmonitoraddmonitoring 10 sp_dbmmonitordropmonitoring Drop the job. No parameters Example: EXEC sp_dbmmonitordropmonitoring
  • 41.   Database Mirroring Monitor Job 3 sp_dbmmonitorchangemonitoring: update the interval in which an existing Database Mirroring Monitor Job will run. 2 parameters Parameter argument is 1, which means update period, followed by the new update interval for the value argument. Example: run every 15 minutes. EXEC sp_dbmmonitorchangemonitoring 1, 15  
  • 42.   Understanding Warning Thresholds 1 Events that are written to the Windows Event Log whenever the threshold exceeded. Can configure alerts to fire based on the error numbers for these events: Unsent log (error number 32042): Number of kilobytes in unsent logs that can accumulate on the principal server before this event is raised. Important Communication issue between partners ( high-performance mode ) In high-safety mode if DB mirroring has been paused.    
  • 43.   Understanding Warning Thresholds 2   Unrestored log (error number 32043): Configure the number of kilobytes in unrestored logs accumulated on the mirror server before this event is raised. Determine the amount of time it will take to roll forward the log on the mirror server in failover. Generally because the I/O subsystem on the mirror server cannot keep up with the logs coming from the principal server.
  • 44.   Understanding Warning Thresholds 3 Oldest Unsent transaction (error number 32040): Number of minutes worth of transactions that can accumulate in the send queue on the principal server before this event is raised. Communication issue between partners - high-performance mode In high-safety mode if DB mirroring has been paused.
  • 45.   Understanding Warning Thresholds 4 Mirror commit overhead (error number 32044): Configure the number of milliseconds in the average transaction delay that can be tolerated on the principal server before this event is raised. The time the principal server waits for the mirror server to write a transaction to the redo queue - only relevant in high-safety mode  
  • 46.    Using the Database Mirroring Monitor 1 Refreshes status every 30 sec (async connections to principal &mirror servers). Member of the dbm_monitor db role in MSDB (not sysadmin server role) have to wait for the data to be updated by the DB Mirroring Monitor Job Step 1: Registering Mirrored Databases Step 2: Performing Health Checks  
  • 47.    Using the Database Mirroring Monitor 2
  • 48.    Using the Database Mirroring Monitor 3 Principal log : status of principal server as of the time displayed Unsent log Num of kilobytes waiting in the send queue. Oldest unsent transaction Oldest transaction in the send queue waiting to be sent to the mirror server Amount of potential data loss (in time) in the event of a failure. Time to send log (estimated): Estimate for the amount of time for the principal server to transmit transactions in the send queue to the mirror server.
  • 49.
  • 50.
  • 51.    Using the Database Mirroring Monitor 6 Mirror commit overhead Only for high-safety mode. Num of milliseconds of average delay per transaction you can accept while the principal server waits for a transaction to write to the redo queue on the mirror server before a warning is generated on the principal server.   Time to send and restore all current log (estimated): Estimated time to send and restore all of the transactions that have currently been committed on the principal server to the mirror server. Can be less than “Time to send log (estimated)” + “Time to restore log (estimated)” Because these are parallel operations.
  • 52.     Monitoring using system SP sp_dbmmonitorresults Directly returning rows from DB mirroring status table. Parameters: @database name: limits the result set to a single database. @mode: Optional parameter that specifies the number of rows returned by the result set. The required input is an integer value between 0 and 9. • 0: Last row • 1: Last 2 hours ...... • 8: Last 1,000 rows • 9: Last 1,000,000 rows or essentially all rows   @update_table : Optional parameter 1 or 0 that determines whether the DB mirroring status table is updated before returning the result set.
  • 53.     Monitoring using system SP sp_dbmmonitorresults EXECsp_dbmmonitorresults @database_name=N'adventureWorks', @mode = 6, @update_table=
  • 54.     Managing Warning Thresholds using system SP 1 Instead of the Database Mirroring Monitor 3 SPs configure, view, and remove warning thresholds: sp_dbmmonitorchangealert, sp_dbmmonitorhelpalert sp_dbmmonitordropalert.
  • 55. = @average_delay, @enabled = 1;     Managing Warning Thresholds using system SP 2 --Warn if the unset log exceeds the the threshold in KB execsys.sp_dbmmonitorchangealert@database_name=N'$(MirrorDatabaseName)',@alert_id=2,@threshold = @enable_send_queue, @enabled = 1; --Warn if the unrestored log exceeds the the threshold in KB execsys.sp_dbmmonitorchangealert@database_name=N'$(MirrorDatabaseName)',@alert_id=3,@threshold = @redo_queue, @enabled = 1; --Warn if the age of the oldest unset transaction exceeds the threshold in minutes execsys.sp_dbmmonitorchangealert@database_name=N'$(MirrorDatabaseName)',@alert_id=1,@threshold = @time_behind, @enabled = 1; --Warn if the mirror commit overhead exceeds the threshold in milliseconds execsys.sp_dbmmonitorchangealert@database_name=N'$(MirrorDatabaseName)',@alert_id=4,@threshold
  • 56. = @average_delay, @enabled = 1; Top wait Events Checks Network Waits DB mirror
  • 57. = @average_delay, @enabled = 1; Top wait Events Checks Network Waits DB mirror 2
  • 58.
  • 59. Use fast backups on mirror DB
  • 60. More than 1 mirror DB destination to improve DRP What Next I Expect in DenaliOffload Processing– Improve Primary Performance! Real-time Queries Continuous redo shipping, validation & apply Mirror DB Principle DB
  • 61. Disasters happen every day...its a fact !  Disasters cost money so why suffer by being unprepared? Organizations that survive typically have: management foresight tested Processes & procedures back-up facilities A PLAN!!
  • 62.
  • 64. צמצום “Mean Time To Recovery” אחרי אירועDRP(redirect) X LAN/WAN Disaster Recovery Site Production Site (resync backwards after source restoration)
  • 67. ד"ר עמי הרי קורס T&E הנדסת מערכת טכניון
  • 68. מדדים (RTO) Recovery Time Objective הזמן המרבי עד לחזרתה של המערכת לתפקוד מלא עבור תהליכים עסקיים שונים (RPO) Recovery Point Objective הזמן המרבי שלגבי ניתן לאבד מידע . כמות המידע שהארגון מוכן לאבד ? יום שלם , מספר שעות /דקות משתנה באותה סקלה כמו RTO אבל לא תלוי בו (מערכות מסחר RPO אפס אבל RTO גדול יותר) . Service Level Agreement בהקשר לזה מדברים על זמינות , MTTF(Mean Time Between Failure) , MTTR (Mean time To recover) זמינות גבוהה (High availability) יכולת של המשתמש לגשת למערכת לצורך אחזור נתונים בכל עת חוסר זמינות= downtime
  • 69. מדדים : ניתוח סיכונים(Risk Analysis) תהליך לאיתור סיכונים צפויים ביישום תהליך או מוצר חדש. כולל הערכת ההסתברות וההשפעה הצפויה, ודרכי התגובה, של כל סיכון על מנת לגדר אותו ככל האפשר. רמת הסיכון נקבעת על בסיס המכפלה של "הסיכוי לתקלה "ו"עוצמת התקלה": Risk Level = Probability*Impact
  • 70. תעדוף כשבונים אתר DRP באתר חלופי – קובעים את סדר השחזור לפי רמת החשיבות של המערכות אילו מערכות לא ישוחזרו רמת השירות שתינתן במסגרת אילוצי מצב חירום
  • 73. שגרה האם אנו מוכנים לאירוע DRP ?
  • 74. אירוע DRP הוכרז מה עושים ?
  • 75.
  • 77.
  • 78. Resources Microsoft SQL Server 2008 R2 Unleashed (2010), Sams Pro SQL Server Disaster Recovery (2008) , Apress Accelerated SQL Server (2008) , Apress Professional Sql Server 2008 Internals And Troubleshooting (2010) ,Wiley Pro SQL Server 2008 Administration (2009), Apress. Microsoft SQL Server 2008 High Availability with Clustering & Database Mirroring , (2010) ,Wiley SQL Server 2008 Transact SQL Recipes 2008 , Apress.
  • 79. Resources Professional Association for SQL Server (www.sqlpass.org) SQL Server Central (www.sqlservercentral.com) Simple-Talk (www.simple-talk.com/sql) MSSQLTips.com (www.mssqltips.com) SQLTeam.com (www.sqlteam.com) SQL Server Community (www.sqlcommunity.com)