Stored Procedures [dbo].[DeleteOneChunk]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@SnapshotIDuniqueidentifier16
@IsPermanentSnapshotbit1
@ChunkNamenvarchar(260)520
@ChunkTypeint4
Permissions
TypeActionOwning Principal
GrantExecuteRSExecRole
SQL Script
CREATE PROCEDURE [dbo].[DeleteOneChunk]
@SnapshotID uniqueidentifier,
@IsPermanentSnapshot bit,
@ChunkName nvarchar(260),
@ChunkType int
AS
IF @IsPermanentSnapshot != 0 BEGIN
DELETE ChunkData
WHERE   
    SnapshotDataID = @SnapshotID AND
    ChunkName = @ChunkName AND
    ChunkType = @ChunkType
    
END ELSE BEGIN
DELETE [ReportServerTempDB].dbo.ChunkData
WHERE   
    SnapshotDataID = @SnapshotID AND
    ChunkName = @ChunkName AND
    ChunkType = @ChunkType
END    
    

GO
GRANT EXECUTE ON  [dbo].[DeleteOneChunk] TO [RSExecRole]
GO
Uses