Backups from earlier versionsįor information about support for backups from earlier versions of SQL Server, see the "Compatibility Support" section of RESTORE (Transact-SQL).
#Adventureworks2012 full database backup code
Also, examine the user-written code in the database, such as stored procedures or other user-defined code.
Before you use a database from an unknown or untrusted source, run DBCC CHECKDB on the database on a non-production server. These databases could contain malicious code that might execute unintended Transact-SQL code or cause errors by modifying the schema or the physical database structure. We recommend that you do not attach or restore databases from unknown or untrusted sources. A restore sequence consists of one or more restore operations that move data through one or more of the phases of restore. When restoring a database, particularly under the full recovery model or bulk-logged recovery model, you should use a single restore sequence. The recovery point can be a specific date and time, a marked transaction, or a log sequence number (LSN). You can restore a database to a specific recovery point within one of these log backups. Under the full recovery model, after you restore your data backup or backups, you must restore all subsequent transaction log backups and then recover the database. Before any part of the database can come online, all data is recovered to a consistent point in which all parts of the database are at the same point in time and no uncommitted transactions exist. The whole database is offline for the duration of the restore. In a complete database restore, the goal is to restore the whole database. Applies to: SQL Server (all supported versions)