Adobe
Products

Top destinations

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • SiteCatalyst
  • Students
  • Elements family

Adobe Creative Cloud

  • What is Adobe Creative Cloud?
  • Design
  • Web
  • Photography
  • Video
  • Students
  • Teams
  • Enterprise
  • Educational institutions

Design and photography

  • Photoshop
  • Illustrator
  • InDesign
  • Adobe Muse
  • Lightroom

Video

  • Adobe Premiere
  • After Effects

Web development and HTML5

  • Edge Tools & Services [opens in a new window]
  • Dreamweaver
  • Gaming [opens in a new window]

Adobe Marketing Cloud

  • What is Adobe Marketing Cloud?
  • Digital analytics
  • Social marketing
  • Web experience management
  • Testing and targeting
  • Media optimization

Analytics

  • SiteCatalyst
  • Adobe Discover
  • Insight

Social

  • Adobe Social

Experience Manager

  • CQ
  • Scene7

Target

  • Test&Target
  • Recommendations
  • Search&Promote

Media Optimizer

  • AdLens
  • AudienceManager
  • AudienceResearch

Document services

  • Acrobat
  • EchoSign [opens in a new window]
  • FormsCentral [opens in a new window]
  • SendNow [opens in a new window]
  • Acrobat.com [opens in a new window]

Publishing

  • Digital Publishing Suite

  • See all products
Business solutions

By business need

  • Digital analytics
  • Digital publishing
  • Document management
  • Media optimization
  • Social marketing
  • Testing and targeting
  • Video editing and serving
  • Web development [opens in a new window]
  • Web experience management
  • See all business needs

By industry

  • Broadcast
  • Education
  • Financial services
  • Government
  • Publishing
  • Retail
  • See all industries
Support & Learning

I need help

  • Products
  • Adobe Creative Cloud
  • Adobe Marketing Cloud
  • Forums [opens in a new window]

I want to learn

  • Training and tutorials
  • Certification [opens in a new window]
  • Adobe Developer Connection
  • Adobe Design Center
  • Adobe TV [opens in a new window]
  • Adobe Marketing Center
  • Adobe Labs [opens in a new window]
Download
  • Product trials
  • Adobe Flash Player
  • Adobe Reader
  • Adobe AIR
  • See all downloads
Company
  • Careers at Adobe
  • Investor Relations
  • Newsroom
  • Privacy
  • Corporate Social Responsibility
  • Customer Showcase
  • Contact us
  • More company info
Buy
  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers
  • Adobe Marketing Cloud sales [opens in a new window]
Search
 
Info Sign in
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Welcome,
My Adobe
My orders
My information
My preferences
My products and services
Sign out
My cart
Privacy My Adobe
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out Privacy My Adobe
Date Date
Qty:
Subtotal
Promotions
Estimated Shipping
VAT
Calculated at checkout
Total
Checkout
LiveCycle Help / 

Microsoft SQL Server Backup and Recovery for LiveCycle ES

Adobe Community Help


Products Affected

  • LiveCycle

Contact support

 
By clicking Submit, you accept the Adobe Terms of Use.
 

Issue

This article outlines methods for performing backup and recovery of a Microsoft SQL Server database. This article is not intended as a comprehensive technical guide of specific database backup and recovery features, but is meant to be an outline of basic SQL Server commands needed for a database administrator to create a reliable database backup strategy for LiveCycle ES.



Caution: As with any other aspect of your LiveCycle ES implementation, your backup and recovery strategy needs to be developed and tested in a development or staging environment before being used in production in order to ensure that the entire solution is working as expected with no data loss.

SQL Server database documentation

The information provided in this article is a summary of the steps required to perform the tasks described. For detailed information, consult the manufacturers documentation provided with your database or visit www.msdn.microsoft.com.

SQL Server backup

Database back up should be performed on a regular basis and is required after a creating new database or index, or when executing certain non-logged operations.

  • Full database backup - backs up the entire database.

There are several backup methods, each with its own strength and weakness: You will need to weigh each aspect of the database system and decide the best method for your LiveCycle ES environment.

The size and frequency of data modification in the database will determine the time and resources required to implement a backup strategy. Once you have completed a full backup of the LiveCycle ES application data, you will need to decide which of the following backup methods you will use on a regular basis:

  • Differential backup - backs up the changes since the last (full or differential) backup only.
  • Transaction log backup - backs up transaction logs.
  • Tail log backup - backs up the tail (or active) log.
  • Mirrored backup - backs up the database to mirror sites.

System database backup

In addition to the user databases, the system databases need to be backed up. This allows the system to be rebuilt in the event of system or database failure (if a hard disk fails, for example). Best practice suggests creating a separate maintenance plan for backing up the system databases that does not mix it with the user databases. Within that too, backup the master separately from the other system databases. This is because only full backups of master database are allowed.

The system databases in SQL Server are master, msdb, model, tempdb, and distribution. It is important to have regular backups of these system databases, however, it is not necessary to back up the tempdb system database because it is rebuilt each time SQL Server is started. When SQL Server is shut down, any data in tempdb is permanently deleted. For this reason, do not store any application-specific data in the tempdb database, leave it exclusively for use by SQL Server.

The model database needs to be backed up only if it is customized. Similarly the distribution database comes into picture only if the server is configured as a Replication Distributor.

Assumptions

The instructions in following sections assume that the database name is adobe and the target backup storage disk location is C:\LCBackup\MSSQL. If your environment is different, modify the commands as required.

The following command line scripts are used to back up the LiveCycle ES SQL Server database to the target backup storage disk. All commands are run from the SQL Server install directory (for example, C:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqlcmd).

Configuring the SQL Server database

A LiveCycle ES database must be configured for FULL recovery so that in the event of system failure, a point in time recovery can be performed. The following script sets the recovery to full recovery mode.

USE master GO ALTER DATABASE adobe SET RECOVERY FULL WITH NO_WAIT GO

If you do not require point in time recovery and want to set the database to simple or bulk_logged mode then use one of the following commands:

-- to set to simple -- USE master GO ALTER DATABASE adobe SET RECOVERY SIMPLE WITH NO_WAIT GO -- to set to bulk_logged -- USE master GO ALTER DATABASE adobe SET RECOVERY BULK_LOGGED WITH NO_WAIT GO

Full database backup

This method backs up the entire database and is required before you can perform differential or transaction log backups.

-- run this only once to set the recovery mode to FULL and allow for point in time recovery -- USE master GO ALTER DATABASE adobe SET RECOVERY FULL WITH NO_WAIT GO -- run this daily to take the complete database backup -- BACKUP DATABASE adobe TO DISK=N'c:\LCBackup\MSSQL\adobe_full.bak' WITH NOFORMAT, INIT, NAME=N'adobe-Full Database Backup', CHECKSUM GO -- run this daily to verify the backup -- RESTORE VERIFYONLY FROM DISK=N'C:\LCBackup\MSSQL\adobe_full.bak' GO

The following result is returned:

Changed database context to 'master'. Processed 456 pages for database 'adobe', file 'adobe' on file 1. Processed 1 pages for database 'adobe', file 'adobe_log' on file 1. BACKUP DATABASE successfully processed 457 pages in 0.436 seconds (8.586 MB/sec). The backup set on file 1 is valid.

Differential backup

Differential database backups are cumulative backing up all the changes from the last full database backup;not the last differential backup.

-- Back up adobe as differential backup BACKUP DATABASE adobe TO DISK = N'c:\LCBackup\MSSQL\adobe_diff.bak' WITH DIFFERENTIAL GO

Transaction log backup

Note: Transaction log backups cannot be run under the simple recovery model discussed in Configuring the SQL Server database.

Two transaction logs cannot contain the same transactions, therefore you must restore each backup in the order they were performed.

-- Back up the adobe transaction log BACKUP LOG adobe TO DISK = N'c:\LCBackup\MSSQL\adobeLog.bak' GO

Tail log backup

A tail log backup is the last transaction log backup made prior to restoring a database. This method is required for point in time recovery. If your data file (MDF) is unavailable, you need to use the WITH NO_TRUNCATE option, as shown below.

-- Back up the adobe tail-log BACKUP LOG adobe TO DISK = N'c:\LCBackup\MSSQL\adobeTailLog.bak' WITH NO_TRUNCATE GO

If your database is in either OFFLINE or EMERGENCY state, then a tail log backup cannot be performed.

Mirrored backup

A mirrored backup simply writes the backup to more than one destination thereby increasing the possibility of a successful recovery if a backup media gets corrupted. You can write up to four mirrors per media set. The following script backs up to two destinations:

-- make one backup on d: disk and a mirror on e: disk BACKUP DATABASE adobe -- media family 1 TO DISK = 'd:\LCBackup\MSSQL\adobeMirror_1.bak' MIRROR -- media family 1 TO DISK = 'e:\LCBackup\MSSQL\adobeMirror_2.bak' -- create a new mirrored backup set WITH FORMAT; GO

SQL Server database recovery

Depending on the method used to back up the database, there can be two different approaches to the recovery process:

  • Simple recovery - restores the last full database backup only.
  • Full recovery - restores all backups including full, differential, and transaction logs.

Simple recovery

The following command shows how to restore the database to the time the last full database backup command was executed.

RESTORE DATABASE adobe FROM DISK = N'C:\LCBackup\MSSQL\adobe_full.bak' WITH FILE=1, RECOVERY GO

Note: Using RECOVERY in the script above assumes that the database no longer exists. If the database exists, REPLACE should be used instead. (See the SQL Server documentation.)

Full recovery

If you have multiple backups, you need to restore each of them in the same sequence as they were taken. You will perform the tasks in the following order:

Note: To apply multiple transaction logs, use the NORECOVERY option on all restore operations except the last.

  1. Restore the database from a full backup with NORECOVERY.

  2. Restore the database from the differential backup with NORECOVERY.

  3. Restore the transaction logs with NORECOVERY. (Repeated for each additional log backup.)

  4. Restore the database with RECOVERY.

Example

RESTORE DATABASE adobe FROM DISK = N'C:\LCBackup\MSSQL\adobe_full.bak' WITH FILE=1, NORECOVERY RESTORE DATABASE adobe FROM DISK = N'C:\LCBackup\MSSQL\adobe_diff.bak WITH FILE=1, NORECOVERY RESTORE LOG adobe FROM DISK = N'C:\LCBackup\MSSQL\adobe_log.bak WITH FILE=1, RECOVERY GO

Restore Database to a specific point in time

To restore and recover a database to a particular point in time, mark, or log sequence number (LSN) before the point of a failure. For example, if a transaction changed some data incorrectly, you might want to restore the database to a recovery point just before the incorrect data entry. Any restore that specifies the recovery point for the database is known as a point-in-time restore.

The recovery point for a point-in-time restore is usually within a transaction log backup. This is the last backup used in the point-in-time restore sequence. When you apply this log backup, you can recover only transactions that come before that point by specifying the target recovery point in a STOPAT, STOPATMARK, or STOPBEFOREMARK clause. When recovery finishes, the time of the database is determined by the recovery point to which you recovered the primary file. Subsequent restores, if any, must have recovery points that are consistent with the database at that time.

The target recovery point is specified by using one of the following:

  • A specific point in time within a transaction log (discussed here)
  • A named mark that has been inserted into a transaction log record.
  • A log sequence number (LSN).

Example

RESTORE DATABASE adobe FROM DISK = N'C:\LCBackup\MSSQL\adobe.bak' WITH FILE=1, NORECOVERY GO RESTORE LOG adobe FROM DISK = N'C:\LCBackup\MSSQL\adobe_log.bak WITH FILE=1, RECOVERY, STOPAT = N'01/14/2008 10:07:53' GO

Additional resources

This section provides references to articles relevant to database administration and back up tasks.

Note: The external web sites referenced here were valid at the time this article was published.

SQL Server documentation

There are several good reference guides available from Microsofts web site located at Microsoft Developer Network. You can search for the following documents or articles from this site:

  • SQL Server 2005 Documentation
  • Introducing SQL Server Management Studio
  • Considerations for the "autogrow" and "autoshrink" settings in SQL Server (article number 315512)
  • A transaction log grows unexpectedly or becomes full on a computer that is running SQL Server (article number 317375)

Reference articles

  • SQL Server administration best practices
  • BACKUP and RESTORE in SQL Server -- Full Backups at www.sqlteam.com
  • Selecting a SQL Server recovery model at http://searchsqlserver.com

Ntbackup for Windows Server references

  • Ntbackup command reference for Windows Server
  • Utilizing the Built-in Windows Backup (ntbackup.exe) for Windows at www.fishbrains.com
Keywords: kb403623

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy

Products

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • Digital Publishing Suite
  • Elements family
  • SiteCatalyst
  • For education

Download

  • Product trials
  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR

Support & Learning

  • Product help
  • Forums

Buy

  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2013 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy | Cookies

Ad Choices

Reviewed by TRUSTe: site privacy statement