SQL Server Questions and Answers – Log Shipping

This set of SQL Server Multiple Choice Questions & Answers (MCQs) focuses on “Log Shipping”.

1. Which of the following is the instance of SQL Server that is your production server in log shipping?
a) secondary database
b) primary database
c) secondary server
d) primary server
View Answer

Answer: d
Explanation: Once the monitor server has been configured, it cannot be changed without removing log shipping first.

2. Point out the correct statement.
a) The restore job can be delayed until all users disconnect themselves
b) Log shipping cannot be combined with other disaster recovery options such as AlwaysOn Availability Groups
c) SQL Server log shipping has high cost in human
d) None of the mentioned
View Answer

Answer: a
Explanation: The database is not available only while the restore process is running.

3. In which of the following modes, the database is read-only?
a) Stand by
b) Read only
c) Restore mode
d) All of the mentioned
View Answer

Answer: a
Explanation: There are two available modes and they are related to the state in which the secondary, log shipped.

4. Which of the following script can check the database recovery model by querying sys.databases for log shipping?
a)

advertisement
advertisement
SELECT name, recovery_model_desc FROM sys.databases WHERE name = 'jugal'
 
USE [master]
GO
UPDATE DATABASE [jugal] SET RECOVERY FULL WITH NO_WAIT
GO

b)

SELECT name, recovery_model_desc FROM sys.databases WHERE name = 'jugal'
 
USE [master]
GO
ALTER DATABASE [jugal] SET RECOVERY FULL WITH NO_WAIT
GO

c)

advertisement
SELECT name, recovery_model_desc FROM sys.databases WHERE name = 'jugal'
 
USE [master]
GO
DROP DATABASE [jugal] SET RECOVERY FULL WITH NO_WAIT
GO

d) None of the mentioned
View Answer

Answer: b
Explanation: Make sure your database is in full or bulk-logged recovery model.

advertisement

5. Point out the wrong statement.
a) The principal database in a mirroring session can also act as the primary database in a log shipping
b) Log Shipping is comparatively tougher than database mirroring for setup
c) The database log shipping setup needs to be initiated from the principal server using the SQL Server Management Studio wizard
d) A given database can be mirrored or log shipped; it can also be simultaneously mirrored and log shipped
View Answer

Answer: b
Explanation: Log Shipping is a pretty simple process to setup.

6. Which of the following stored procedure is used to add a primary database on primary server?
a) sp_add_log_shipping_primary_database
b) sp_add_primary_database
c) sp_add_log_shipping
d) sp_add_log_shipping_primary
View Answer

Answer: a
Explanation: sp_add_log_shipping_primary_database stored procedure returns the backup job ID and primary ID.

7. Execute sp_add_jobschedule to add a schedule for the backup job on _________ server.
a) primary
b) secondary
c) primary and secondary
d) none of the mentioned
View Answer

Answer: a
Explanation: sp_add_jobschedule creates a schedule for a job.

8. Which of the following is correct syntax for sp_add_log_shipping_secondary_primary?
a)

 sp_add_log_shipping_secondary_primary
 [ @secondary_server = ] 'primary_server',

b)

 sp_add_log_shipping_secondary_primary
 [ @primary_server = ] 'primary_server',

c)

 xp_add_log_shipping_secondary_primary
 [ @primary_server = ] 'primary_server',

d) All of the mentioned
View Answer

Answer: b
Explanation: sp_add_log_shipping_secondary_primary sets up the primary information, adds local and remote monitor links, and creates copy and restore jobs on the secondary server for the specified primary database.

9. Which of the following table stores history detail for log shipping jobs?
a) log_shipping_monitor_alert
b) log_shipping_monitor_primary
c) log_shipping_monitor_history_detail
d) none of the mentioned
View Answer

Answer: c
Explanation: log_shipping_monitor_alert stores alert job ID.

10. _____________ maps primary databases to secondary databases in log shipping.
a) sp_change_log_shipping_primary_database
b) log_shipping_primary_databases
c) log_shipping_primary_secondaries
d) sp_help_log_shipping_primary_database
View Answer

Answer: c
Explanation: sp_help_log_shipping_primary_database retrieves primary database settings and displays the values from the log_shipping_primary_databases.

Sanfoundry Global Education & Learning Series – SQL Server.

To practice all areas of SQL Server, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.