No, you cannot do this.
You can create a snapshot database of a log shipped database that is in STANDBY
mode. However, in order to restore additional logs, you will need to drop the snapshot.
Here's a quick test you can do to simulate this on a development machine:
Step 1: Create a database & make sure it's in full recovery.
CREATE DATABASE Northwind;
ALTER DATABASE Northwind SET RECOVERY FULL;
Step 2: Take a full backup & TWO log backup
BACKUP DATABASE Northwind TO DISK = 'C:\MSSQL\Backup\Northwind.full.bak' WITH INIT;
BACKUP LOG Northwind TO DISK = 'C:\MSSQL\Backup\Northwind.log1.bak' WITH INIT;
BACKUP LOG Northwind TO DISK = 'C:\MSSQL\Backup\Northwind.log2.bak' WITH INIT;
Step 3: Restore the full and first log backup. Put the log shipped copy into STANDBY
so it's read-only
RESTORE DATABASE Northwind_Standby
FROM DISK = 'C:\MSSQL\Backup\Northwind.full.bak'
WITH
MOVE 'Northwind' TO 'C:\MSSQL\Data\Northwind_standby.mdf',
MOVE 'Northwind_log' TO 'C:\MSSQL\Data\Northwind_standby_log.ldf',
NORECOVERY;
RESTORE LOG Northwind_Standby
FROM DISK = 'C:\MSSQL\Backup\Northwind.log1.bak'
WITH NORECOVERY;
RESTORE DATABASE Northwind_Standby
WITH STANDBY = 'C:\MSSQL\Data\Northwind_standby.standby';
Step 4: Create a snapshot of the restored/standby database
CREATE DATABASE Northwind_Snapshot
ON (NAME = 'Northwind',
FILENAME = 'C:\MSSQL\Data\Northwind_standby.snapshot' )
AS SNAPSHOT OF Northwind_Standby;
Step 5: now try to restore the second log
RESTORE LOG Northwind_Standby
FROM DISK = 'C:\MSSQL\Backup\Northwind.log2.bak'
WITH NORECOVERY;
When you try to restore another log, you'll get this error:
Msg 5094, Level 16, State 2, Line 32
The operation cannot be performed on a database with database snapshots or active DBCC replicas.
Msg 3013, Level 16, State 1, Line 32
RESTORE LOG is terminating abnormally.
The only way you'll be able to continue restoring logs is to drop all existing snapshots. So you cannot query a snapshot while log backups are being restored.