Stored Procedures [dbo].[AddPersistedStream]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@SessionIDvarchar(32)32
@Indexint4
Permissions
TypeActionOwning Principal
GrantExecuteRSExecRole
SQL Script
CREATE PROCEDURE [dbo].[AddPersistedStream]
@SessionID varchar(32),
@Index int
AS
DECLARE @RefCount int
DECLARE @id varchar(32)
DECLARE @ExpirationDate datetime
set @RefCount = 0
set @ExpirationDate = DATEADD(day, 2, GETDATE())
set @id = (select SessionID from [ReportServerTempDB].dbo.SessionData where SessionID = @SessionID)
if @id is not null
begin
set @RefCount = 1
end
INSERT INTO [ReportServerTempDB].dbo.PersistedStream (SessionID, [Index], [RefCount], [ExpirationDate]) VALUES (@SessionID, @Index, @RefCount, @ExpirationDate)
    

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