Database Backups and Restore - 2
1) What are the Best Practices recommendations related to SQL Server Database backups?
Backup is an important component of a sound disaster recovery strategy. Here are some best practices you can follow to ensure you have a good backup in place:
- Make sure you are not storing your backups in the same physical location as the database files. When your physical drive goes bad, you should be able to use the other drive or remote location that stored the backups in order to perform a restore. Keep in mind that you could create several logical volumes or partitions from a same physical disk drive. Carefully study the disk partition and logical column layouts before choosing a storage location for the backups.
- Make sure you have a proper backup schedule established according to the needs of the application and business requirements. As the backups get old, the risk of data loss is higher unless you have a way to regenerate all the data till the point of failure.
- Make sure to actually restore the backups on a test server and verify that you can restore with all the options and conditions you need to use during a planned or un-planned downtime.
- Use the verification options provided by the backup utilities [BACKUP TSQL command, SQL Server Maintenance Plans, your backup software or solution, etc].
- Use advanced features like BACKUP CHECKSUM to detect problems with the backup media itself.
2) Can we have multiple copies of the database backup is a single file?
Yes we can save multiple copies of database backup in a single file.
3) Name any 2-3 Third party SQL Server database backup tools?
There are many tools available in the market for SQL server backups like
- SQL Litespeed (Dell)
- SQL Backup Pro (Redgate)
- SQL Safe Backup (Idera)
4) How many copies are allowed when taking a backup using MIRROR Backup option?
Three copies are allowed in a Mirror backup apart from the original copy.
5) What are the common issues you faced in Database backup?
There could be multiple reasons like:
- Permissions issues if the backups are configured to be taken on a share location
- Backup file used by the tape backups due to which backup process is not able to overwrite the backup file.
- Full backup is not taken before initiating a Diff. of Transaction log backup
- Not enough space available on the target location
6) What is RTO?
Recovery Time Objective (RTO) is the amount of time which data or hardware is desired to be restored after a data corruption or hardware failure.
7) What is RPO?
Recovery Point Objective (RPO) describes a point in time that data can be restored from. For instance, if there is data corruption, Data loss or unavailability, at what point in time can a valid copy of the data be restored from? RPO is usually measured as minutes, hours, days, weeks, etc…
8) What is TDE (Transparent Data Encryption) method in SQL Server?
TDE provides the ability to encrypt an entire database and to have the encryption be completely transparent to the applications that access the database. TDE encrypts the data stored in both the database’s data file (.mdf) and log file (.ldf) using either Advanced Encryption Standard (AES) or Triple DES (3DES) encryption. In addition, any backups of the database are encrypted. This protects the data while it’s at rest as well as provides protection against losing sensitive information if the backup media were lost or stolen.
9) Which versions of SQL Server support TDE?
TDE requires SQL Server 2012 Enterprise edition. It’s not available in SQL Server 2012 Standard or Business Intelligence editions. TDE is also available in SQL Server 2008 and SQL Server 2008 R2 Datacenter and Enterprise editions.
10) Is there a performance impact for using TDE?
Yes, some performance overhead is involved in using TDE. The encryption and decryption process do require additional CPU cycles. The overhead for using TDE ranges from about 3 percent to 30 percent, depending on the type of workload.
SQL Server instances with low I/O and low CPU usage will have the least performance impact. Servers with high CPU usage will have the most performance impact.
11) How can you enable TDE in SQL server?
TDE can be enabled on the database using below steps:
- Create a master key for the database.
- Create a certificate that’s protected by the master key.
- Create a special key that’s used to protect the database. This key is called the database encryption key (DEK) and you secure it using the certificate.
- Enable encryption.
-- The master key must be in the master database.
USE master;
GO
-- Create the master key.
CREATE MASTER KEY ENCRYPTION
BY PASSWORD='YourPassword';
GO
-- Create a certificate.
CREATE CERTIFICATE MySQLCert
WITH SUBJECT='MyDatabase DEK';
GO
-- Use the database to enable TDE.
USE MyDatabase
GO
-- Associate the certificate to MyDatabase.
CREATE DATABASE ENCRYPTION KEY
WITH ALGORITHM = AES_128
ENCRYPTION BY SERVER CERTIFICATE MySQLCert;
GO
-- Encrypt the database.
ALTER DATABASE MyDatabase
SET ENCRYPTION ON;
GO
12) What is a MASTER KEY?
A master key is a symmetric key that is used to create certificates and asymmetric keys.
13) What is the below error?
Msg 33111, Level 16, State 3, Line 2
Cannot find server certificate with thumbprint..
Msg 3013, Level 16, State 3, Line 2
RESTORE DATABASE is terminating abnormally
This issue occurs when somebody try to restore the database backup of TDE database on a different SQL Server instance.
14) What are the Advantages of using TDE?
- Performs real-time I/O encryption and decryption of the data and log files
- Encrypts the Entire Database in rest
- No architectural changes needed
- No application code changes are required and the user experience is the same
- Easy to implement
- DBAs can still see the data
15) What are the Disadvantages of using TDE?
- Not granular – Cannot just encrypt specific tables/columns
- Not good for high CPU bottleneck servers
- Not protected through communication/networks
16) What is MAXTRANSFERSIZE option in Backup database command?
MAXTRANSFERSIZE: specifies the largest unit of transfer in bytes to be used between SQL Server and the backup media. The possible values are multiples of 64 KB ranging up to 4194304 bytes (4 MB). The default is 1 MB.
17) What is BUFFERCOUNT option in Backup database command?
BUFFERCOUNT specifies the total number of I/O buffers to be used for the backup operation. The total space that will be used by the buffers is determined by: buffercount * maxtransfersize.
18) What is a log chain?
A continuous sequence of log backups is called a log chain. A log chain starts with a full backup of the database. Usually, a new log chain is only started when the database is backed up for the first time or after the recovery model is switched from simple recovery to full or bulk-logged recovery.
Unless you choose to overwrite existing backup sets when creating a full database backup, the existing log chain remains intact. With the log chain intact, you can restore your database from any full database backup in the media set, followed by all subsequent log backups up through your recovery point. The recovery point could be the end of the last log backup or a specific recovery point in any of the log backups.
19) Whether Full or Differential backups clear the Transaction Log or not?
No, Full or Differential backup do not clear Transaction logs.
20) Is it possible in any situation when differential backup grows more than the Full backup?
Yes, it is possible in case when you do not take Full backup of the database for months and change in the databases grow more than the size of the Full backup.
21) Is it mandatory to take a Full backup if we switch the recovery model of a database?
Yes, It is mandatory to take a Full backup of the database after switching the recovery model of the database to initiate the log chain. Otherwise Diff. or Transaction logs will fail.
22) What are the options to deal with Over Growing transaction log file?
We have below options to deal with the over growing transaction log file:
Freeing disk space so that the log can automatically grow.
- Backing up the log.
- Adding a log file on a separate disk drive.
- Increasing the size of a log file
- killing a long-running transaction
23) How does the database recovery model impact database backups?
Database recovery model deals with the retention of the transaction log entries. Database recovery model decides if transaction log backups need to be triggered on a regular basis in order to keep the transaction log small or the Transaction logs will be truncated automatically.
- Simple – Committed transactions are removed from the log when the check point process occurs.
- Bulk Logged – Committed transactions are only removed when the transaction log backup process occurs.
- Full – Committed transactions are only removed when the transaction log backup process occurs.
24) What is Windows Azure Blob storage service Database backups?
SQL Server 2012 SP1 CU2, enables SQL Server backup and restore directly to the Windows Azure Blob service. Backup to cloud offers benefits such as availability, limitless geo-replicated off-site storage, and ease of migration of data to and from the cloud. In this release, you can issue BACKUP or RESTORE statements by using tsql or SMO. Back up to or restore from the Windows Azure Blob storage service by using SQL Server Management Studio Backup or Restore Wizard is not available in this release.
25) What is a SQL Server Credential?
A SQL Server credential is an object that is used to store authentication information required to connect to a resource outside of SQL Server. Here, SQL Server backup and restore processes use credential to authenticate to the Windows Azure Blob storage service. The Credential stores the name of the storage account and the storage account access key values. Once the credential is created, it must be specified in the WITH CREDENTIAL option when issuing the BACKUP/RESTORE statements.
26) What is SQL command to create SQL Server Credential?
CREATE CREDENTIAL mycredential
WITH IDENTITY= 'mystorageaccount'
--this is the name of the storage account you specified when creating a storage account, SECRET = '<storage account access key>'
-- this should be either the Primary or Secondary Access Key for the storage account to access cloud --account
27) What is the command to place the database backup on a Windows Azure Blob storage service?
BACKUP DATABASE AdventureWorks2012
TO URL = 'https://mystorageaccount.blob.core.windows.net/mycontainer/AdventureWorks2012_1.bak'
URL = 'https://mystorageaccount.blob.core.windows.net/mycontainer/AdventureWorks2012_2.bak'
WITH CREDENTIAL = 'mycredential' ,
STATS = 5
GO
28) What are the Benefits with Windows Azure Blob storage service?
- Flexible, reliable, and limitless off-site storage: Storing your backups on Windows Azure Blob service can be a convenient, flexible, and easy to access off-site option.
- No overhead of hardware management
- Cost Benefits: Pay only for the service that is used. Can be cost-effective as an off-site and backup archive option.
29) Suppose I have a Database maintenance plan which runs every 15 minutes to take the Transaction Logs backup of all user defined databases. One of the members of DBA team created a new database in the morning at 09:10 AM and the DB maintenance job started failing. What could be the reason?
This job is failing because the we did not take a full database backup of the newly created database. We need to a full backup of a database to initiate the log chain.
30) What is the below error related to Differential backup?
Msg 3035, Level 16, State 1, Line 1Cannot perform a differential backup for database "backup_test", because a current database backup does not exist.
Differential Backup is failing because we did not take a full backup of the database after creation of the database or switching the Recovery model of the database.
31) How will check the content of a backup file?
RESTORE HEADERONLY
FROM DISK = N'C:\AdventureWorks-FullBackup.bak'
GO
Thank you for this brief explanation.. it's so useful for me
ReplyDeleteremote dba support
ARINET DBA Services is a Chicago, IL based organization established in 2013. Uniting more than 100+ years of combined involvement in giving quality Oracle database Support administrations to American organizations, we've given the diverse options about remote dba masters, remote dba services, remote dba reinforce, remote database, prophet remote, dba remote, database association, prophet dba reinforce, Oracle sponsorship and Oracle Consultants.
ReplyDeleteGet 24*7 SQL Server DB Recovery with Cognegic’s Exchange Database Recovery
ReplyDeleteAre you looking for restoring your SQL server with full back up? Or need to make any changes in backup plan? If yes, then pull your shocks up and get connected with world-class RIM Support provides i.e. Cognegic’s DB Recovery Support or DB Recovery Services. We take guaranteed best Backup Recovery and full support. You can contact to our professional experts through this number 1-800-450-8670 anytime and any day. Our Database Configuration Support is very affordable.
For More Info: https://cognegicsystems.com/
Contact Number: 1-800-450-8670
Email Address- info@cognegicsystems.com
Company’s Address- 507 Copper Square Drive Bethel Connecticut (USA) 06801
The most effective method to Solve Common SQL Server Restore Issue through DB Recovery Support
ReplyDeleteThe Database reinforcement and reestablish is an exceptionally basic and fundamental assignment for any engineer. You have the capacity and ability to reestablish the lost information and data which by erroneously erased by you. Truly, this issue reclamation process takes long time or requires heaps of specialized aptitudes yet in the event that you are not ready to recuperate your information then most likely you will be let go from the activity. In any case, let us reveal to you that we at Cognegic give DB Recovery Services or Online Database Management Support for those engineers who can't perform reinforcement and recuperation. Thus, you can pick our Exchange Database Recovery procedure to get back your basic information.
For More Info: https://cognegicsystems.com/
Contact Number: 1-800-450-8670
Email Address- info@cognegicsystems.com
Company’s Address- 507 Copper Square Drive Bethel Connecticut (USA) 06801
Going up against Backup and Recovery Issue in your Database with Cognegic's Backup Recovery
ReplyDeleteReinforcement and recuperation of any database is a basic assignment. In the event that you have great specialized aptitudes then you can undoubtedly take the reinforcement and recuperation of your database yet without having great abilities you can't. Cognegic's expert database specialists are proficient to take the reinforcement of your whole database including MySQL, Oracle, MongoDB, Cassandra, and MS SQL Server et cetera. You can contact Cognegic's Exchange Database Recovery or DB Recovery Services whenever and settle your issues on the spot.
For More Info: https://cognegicsystems.com/
Contact Number: 1-800-450-8670
Email Address- info@cognegicsystems.com
Company’s Address- 507 Copper Square Drive Bethel Connecticut (USA) 06801
Ensure and Secure your Data through DB Recovery Support
ReplyDeleteGuarantee, if there is system dissatisfaction, by then fix charge isn't just an enough to settle that foul up. Here you will require a fortification copy of your database. Regardless, review that, without a fortification copy, you are not prepared to restore corrupted or missing things or some different changes to database design. If you contemplate about how you would reinforcement have the capacity to and recover your database then with no dithering you can particularly contact to Cognegic's DB Recovery Services or Exchange Database Recovery. Our affirmed capable experts remaining up with the most recent and give splendid help concerning your databases.
For More Info: https://cognegicsystems.com/
Contact Number: 1-800-450-8670
Email Address- info@cognegicsystems.com
Company’s Address- 507 Copper Square Drive Bethel Connecticut (USA) 06801
Pretty good I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Very informative post regarding data backup services..
ReplyDeleteThanks for sharing such a valuable information..
Data Backup Solutions
Thanks for sharing such an amazing article, really informative
ReplyDeleteVery useful information.Thankyou so much for this wonderful blog…Great work keep going. Looking for the best database services in Hyderabad hire Cyanous software solutions now.
ReplyDeleteBest Database services in Hyderabad
Best software & web development company in Hyderabad
Thanks you and I admire you to have the courage the talk about this, This was a very meaningful post for me. Thank for sharing about database backups and restore.
ReplyDeleteWe are offering 1-month free trial of backup on cloud and assuring the lowest price guarantee. Contact us: +91-9971329945
Please visit us our website:
web hosting
backup on cloud
best linux web hosting services
best windows hosting
android cloud backup solutions
vCloud Tech Provides secure IT services & Solutions and is considered by many organizations to be the best IT Software Reseller..
ReplyDeleteDisaster Recovery Database
ReplyDeleteGenex DBS proves that data loss is only temporary every day with the highest data recovery success rate in the industry. Our recovery rates speak for themselves.Disaster Recovery
With over 17 years of experience, Data Storage Solutions performs professional data recovery for every type of storage device including desktop hard drives, laptop hard drives, external/USB hard drives, RAID arrays, NASs, SANs, DASs, SSDs, encryption storage devices, CCTV data recovery, and flash cards. Enterprise-level devices, such as RAIDs, are also available. Data loss situations on any server can be handled using our proprietary tools, which can handle physical and mechanical failure, backup failure, water and fire damage, data corruption, file deletion, system failure, and more. We use software and solutions that won't further damage your device when we perform data recovery.