Sunday, November 2, 2014

Log Shipping (SQL SERVER 2012)

/*******************************************
      Log Shipping (SQL SERVER 2012)
********************************************/

Database must be using Full Recovery model / Bulk-logged model.
All the configurations for log shipping are in database [Properties] --> [Transaction Log Shipping] Tab.


1. Enable this as a primary database in a log shipping configuration

  First, check it to enable Log shipping.


2. Transaction log backups 
  
  [Backup Settings...]

  a. "Network path to backup folder" 
     Log files will be copied to this folder. It must be a network address (like "\\M78\AUTOMAN").
  
  b. "Local path to the backup folder" 
     This will replace above setting!! (Equal to above folder if empty)
  
  ** Configure the permission for all folders so that "SQL Agent" has the permission to read/write them!!!

  c. [Schedule...]
     set the schedule of log shipping.
     **If the job is already running, it will become [Edit Job...]. More detailed properties are in it.


3. Secondary Database
  
  Connect to a secondary database (usually on another server).
  The SQL Agent on the secondary database will copy the transactional log 
  from the backup address (like "\\M78\AUTOMAN") to another destination folder.
  Then, it will use the log files to restore a secondary database that is equal to the original one.

  [Add]

  a. Secondary database:
     The name of secondary database. You can create a database or choose an existing database.
  
  b. [Initialize Secondary Database] Tab
     If you choose "Yes, generate a full backup ...", it will full backup the original database.
  
  c. [Copy Files] Tab
     Copy log file from backup address. So don't use the same folder!! You can [Schedule] this job.
  
  d. [Restore Transaction Log] Tab
     If you use "Standby mode", you can read secondary database. You can [Schedule] this job.


4. Use a monitor server instance

  A monitor server stores the same information in a central place for easy reporting.
  To access this report:
  [SQL Server] instance context --> [Reports] --> [Standard Reports] --> [Transaction Log Shipping Status] 




***** Since log backup is automatically done, do NOT make any BACKUP LOG manually! 
***** Otherwise, log files are easily messed up.

**** The default interval for SQL Agent is 30 seconds...? 
**** So even if you set interval of any schedule to lest than 30 seconds...

1 comment:

  1. Titanium Cost Guide: How To Make Spinning Rings - Tioga
    The titanium dive watch idea behind titanium-cost schemes is that how strong is titanium a spinning ring will be able to be made winnerwell titanium stove as a spin or ceramic vs titanium curling iron spin. This makes for titanium uses an incredible

    ReplyDelete