Showing posts with label sp1. Show all posts
Showing posts with label sp1. Show all posts

Sunday, March 11, 2012

Assigning the results of a table function to a table variable

SQL Server 2K SP1.
I'm trying to put the results of a Table function into a Table variable for
use in a Select. My code is:
DECLARE @.LoanTable table (LoanNo DECIMAL(10,0), PRIMARY KEY (LoanNo))
SET @.LoanTable = UDF_GetLoansInDeal (1, 8)
SELECT LoanNo
FROM UV_Tran016 AS t16
INNER JOIN @.LoanTable lt
ON t16.LoanNo = lt.LoanNo
The error I get is:
Server: Msg 195, Level 15, State 10, Line 4
'UDF_GetLoansInDeal' is not a recognized function name.
Line 4 is the SET statement.
SELECT TOP 10 *
FROM UDF_GetLoansInDeal (1, 8)
works just fine.
The function is defined as:
CREATE FUNCTION UDF_GetLoansInDeal
(
@.DealType int
, @.Id int
)
RETURNS @.LoansTable table
(
LoanNo DECIMAL(10,0)
)
AS
BEGIN
IF @.DealType = 1
BEGIN
INSERT @.LoansTable
SELECT Loan_No
FROM U_PledgeData
WHERE PledgeId = @.Id
ORDER BY PledgeId
END
ELSE
IF @.DealType = 2
BEGIN
INSERT @.LoansTable
SELECT Loan_No
FROM U_IntercompanyData
WHERE IntercompanyId = @.Id
ORDER BY IntercompanyId
END
RETURN
END
What am I doing wrong?
Thanks!I'm not positive, and obviously this is untested, but I think you just meant
to do this:
SELECT t16.LoanNo
FROM UV_Tran016 AS t16
INNER JOIN dbo.UDF_GetLoansInDeal(1,8) lt
ON t16.LoanNo = lt.LoanNo
"Bob" <notrainsley@.worldsavings.com> wrote in message
news:DD09EA8C-6F54-4086-BAF7-4DD2CC42879F@.microsoft.com...
> SQL Server 2K SP1.
> I'm trying to put the results of a Table function into a Table variable
> for
> use in a Select. My code is:
> DECLARE @.LoanTable table (LoanNo DECIMAL(10,0), PRIMARY KEY (LoanNo))
> SET @.LoanTable = UDF_GetLoansInDeal (1, 8)
> SELECT LoanNo
> FROM UV_Tran016 AS t16
> INNER JOIN @.LoanTable lt
> ON t16.LoanNo = lt.LoanNo
> The error I get is:
> Server: Msg 195, Level 15, State 10, Line 4
> 'UDF_GetLoansInDeal' is not a recognized function name.
> Line 4 is the SET statement.
> SELECT TOP 10 *
> FROM UDF_GetLoansInDeal (1, 8)
> works just fine.
> The function is defined as:
> CREATE FUNCTION UDF_GetLoansInDeal
> (
> @.DealType int
> , @.Id int
> )
> RETURNS @.LoansTable table
> (
> LoanNo DECIMAL(10,0)
> )
> AS
> BEGIN
> IF @.DealType = 1
> BEGIN
> INSERT @.LoansTable
> SELECT Loan_No
> FROM U_PledgeData
> WHERE PledgeId = @.Id
> ORDER BY PledgeId
> END
> ELSE
> IF @.DealType = 2
> BEGIN
> INSERT @.LoansTable
> SELECT Loan_No
> FROM U_IntercompanyData
> WHERE IntercompanyId = @.Id
> ORDER BY IntercompanyId
> END
> RETURN
> END
> What am I doing wrong?
> Thanks!
>|||SET @.LoanTable = UDF_GetLoansInDeal (1, 8)
should be
INSERT INTO @.LoanTable
SELECT * FROM dbo.UDF_GetLoansInDeal (1, 8)
Keith Kratochvil
"Bob" <notrainsley@.worldsavings.com> wrote in message
news:DD09EA8C-6F54-4086-BAF7-4DD2CC42879F@.microsoft.com...
> SQL Server 2K SP1.
> I'm trying to put the results of a Table function into a Table variable
> for
> use in a Select. My code is:
> DECLARE @.LoanTable table (LoanNo DECIMAL(10,0), PRIMARY KEY (LoanNo))
> SET @.LoanTable = UDF_GetLoansInDeal (1, 8)
> SELECT LoanNo
> FROM UV_Tran016 AS t16
> INNER JOIN @.LoanTable lt
> ON t16.LoanNo = lt.LoanNo
> The error I get is:
> Server: Msg 195, Level 15, State 10, Line 4
> 'UDF_GetLoansInDeal' is not a recognized function name.
> Line 4 is the SET statement.
> SELECT TOP 10 *
> FROM UDF_GetLoansInDeal (1, 8)
> works just fine.
> The function is defined as:
> CREATE FUNCTION UDF_GetLoansInDeal
> (
> @.DealType int
> , @.Id int
> )
> RETURNS @.LoansTable table
> (
> LoanNo DECIMAL(10,0)
> )
> AS
> BEGIN
> IF @.DealType = 1
> BEGIN
> INSERT @.LoansTable
> SELECT Loan_No
> FROM U_PledgeData
> WHERE PledgeId = @.Id
> ORDER BY PledgeId
> END
> ELSE
> IF @.DealType = 2
> BEGIN
> INSERT @.LoansTable
> SELECT Loan_No
> FROM U_IntercompanyData
> WHERE IntercompanyId = @.Id
> ORDER BY IntercompanyId
> END
> RETURN
> END
> What am I doing wrong?
> Thanks!
>|||Aaron,
Ah, I see. Since the function returns a table, I can use the function in the
place of a table name in the join.
That makes sense, but I wanted to assign the table to a table variable
because I'm really going to do a delete on multiple tables and didn't want t
o
execute the function on each delete. For example,
DELETE UV_Tran016 AS t16
INNER JOIN dbo.UDF_GetLoansInDeal(1,8) lt
ON t16.LoanNo = lt.LoanNo
DELETE UV_Tran022 AS t22
INNER JOIN dbo.UDF_GetLoansInDeal(1,8) lt
ON t22.LoanNo = lt.LoanNo
DELETE UV_Tran025 AS t25
INNER JOIN dbo.UDF_GetLoansInDeal(1,8) lt
ON t25.LoanNo = lt.LoanNo
etc.
I believe the next reply shows me how to do that.
Thanks for the help,
Bob
"Aaron Bertrand [SQL Server MVP]" wrote:

> I'm not positive, and obviously this is untested, but I think you just mea
nt
> to do this:
> SELECT t16.LoanNo
> FROM UV_Tran016 AS t16
> INNER JOIN dbo.UDF_GetLoansInDeal(1,8) lt
> ON t16.LoanNo = lt.LoanNo|||Keith,
Ah, this is another place where SET is not used to assign a value to a local
variable. I get it.
Thanks,
Bob
"Keith Kratochvil" wrote:

> SET @.LoanTable = UDF_GetLoansInDeal (1, 8)
> should be
> INSERT INTO @.LoanTable
> SELECT * FROM dbo.UDF_GetLoansInDeal (1, 8)
> --
> Keith Kratochvil|||"Bob" <notrainsley@.worldsavings.com> wrote in message
news:DD09EA8C-6F54-4086-BAF7-4DD2CC42879F@.microsoft.com...
> SQL Server 2K SP1.
> I'm trying to put the results of a Table function into a Table variable
> for
> use in a Select. My code is:
> DECLARE @.LoanTable table (LoanNo DECIMAL(10,0), PRIMARY KEY (LoanNo))
> SET @.LoanTable = UDF_GetLoansInDeal (1, 8)
> SELECT LoanNo
> FROM UV_Tran016 AS t16
> INNER JOIN @.LoanTable lt
> ON t16.LoanNo = lt.LoanNo
> The error I get is:
> Server: Msg 195, Level 15, State 10, Line 4
> 'UDF_GetLoansInDeal' is not a recognized function name.
> Line 4 is the SET statement.
> SELECT TOP 10 *
> FROM UDF_GetLoansInDeal (1, 8)
> works just fine.
> The function is defined as:
> CREATE FUNCTION UDF_GetLoansInDeal
> (
> @.DealType int
> , @.Id int
> )
> RETURNS @.LoansTable table
> (
> LoanNo DECIMAL(10,0)
> )
> AS
> BEGIN
> IF @.DealType = 1
> BEGIN
> INSERT @.LoansTable
> SELECT Loan_No
> FROM U_PledgeData
> WHERE PledgeId = @.Id
> ORDER BY PledgeId
> END
> ELSE
> IF @.DealType = 2
> BEGIN
> INSERT @.LoansTable
> SELECT Loan_No
> FROM U_IntercompanyData
> WHERE IntercompanyId = @.Id
> ORDER BY IntercompanyId
> END
> RETURN
> END
> What am I doing wrong?
> Thanks!
>
The result of a table-valued function is a result set. It can't be assigned
directly to a variable. Replace the SET with an INSERT:
INSERT INTO @.LoanTable (LoanNo)
SELECT LoanNo FROM UDF_GetLoansInDeal (1, 8);
Another change you should make is to remove the ORDER BYs in your function.
They do nothing except maybe slow down the query.
Usually it's better to use in-line table-valued functions in preference to
multi-statement ones where you can. For example your function could be
rewritten as follows, which may yield a better query plan and faster
results.
CREATE FUNCTION UDF_GetLoansInDeal
(
@.DealType int
, @.Id int
)
RETURNS TABLE
AS
RETURN
(
SELECT Loan_No AS LoanNo
FROM U_PledgeData
WHERE PledgeId = @.Id
AND @.DealType = 1
UNION ALL
SELECT Loan_No AS LoanNo
FROM U_IntercompanyData
WHERE IntercompanyId = @.Id
AND @.DealType = 2
)
GO
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx

Wednesday, March 7, 2012

Assertion failed on subscription email send

Hello, I have installed a fresh new Reporting Service sp1, on a Windows 2003
Server, SQL 2000 sp3, IIS 6.0 and am getting an error when trying to send out
emails via subscriptions. Cannot decipher the error. Log file is below:
--
<Header>
<Product>Microsoft SQL Server Reporting Services Version
8.00.878.00</Product>
<Locale>en-US</Locale>
<TimeZone>Pacific Daylight Time</TimeZone>
<Path>D:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\LogFiles\ReportServerService__10_26_2004_18_45_47.log</Path>
<SystemName>XXX</SystemName>
<OSName>Microsoft Windows NT 5.2.3790.0</OSName>
<OSVersion>5.2.3790.0</OSVersion>
</Header>
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing ConnectionType to '1' as specified in Configuration file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing IsSchedulingService to 'True' as specified in Configuration
file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing IsNotificationService to 'True' as specified in Configuration
file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing IsEventService to 'True' as specified in Configuration file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing PollingInterval to '10' second(s) as specified in Configuration
file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing MemoryLimit to '60' percent as specified in Configuration file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing RecycleTime to '720' minute(s) as specified in Configuration
file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing MaximumMemoryLimit to '80' percent as specified in Configuration
file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing MaxAppDomainUnloadTime to '30' minute(s) as specified in
Configuration file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing MaxQueueThreads to '0' thread(s) as specified in Configuration
file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing MaxActiveReqForOneUser to '20' requests(s) as specified in
Configuration file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing MaxScheduleWait to '5' second(s) as specified in Configuration
file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing DatabaseQueryTimeout to '120' second(s) as specified in
Configuration file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing InstanceName to 'MSSQLSERVER' as specified in Configuration
file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing ProcessRecycleOptions to '0' as specified in Configuration file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing RunningRequestsScavengerCycle to '60' second(s) as specified in
Configuration file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing RunningRequestsDbCycle to '60' second(s) as specified in
Configuration file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing RunningRequestsAge to '30' second(s) as specified in
Configuration file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing CleanupCycleMinutes to '10' minute(s) as specified in
Configuration file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing SecureConnectionLevel to '0' as specified in Configuration file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing DisplayErrorLink to 'True' as specified in Configuration file.
ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
Initializing WebServiceUseFileShareStorage to default value of 'False'
because it was not specified in Configuration file.
ReportingServicesService!resourceutilities!ea4!10/26/2004-18:45:47:: i INFO:
Running on 2 physical processors, 4 logical processors
ReportingServicesService!resourceutilities!ea4!10/26/2004-18:45:47:: i INFO:
Reporting Services starting SKU: Standard
ReportingServicesService!runningjobs!ea4!10/26/2004-18:45:47:: i INFO:
Database Cleanup (NT Service) timer enabled: Cycle: 600 seconds
ReportingServicesService!runningjobs!ea4!10/26/2004-18:45:47:: i INFO:
Running Requests Scavenger timer enabled: Cycle: 60 seconds
ReportingServicesService!runningjobs!ea4!10/26/2004-18:45:47:: i INFO:
Running Requests DB timer enabled: Cycle: 60 seconds
ReportingServicesService!runningjobs!ea4!10/26/2004-18:45:47:: i INFO:
Execution Log Entry Expiration timer enabled: Cycle: 26052 seconds
ReportingServicesService!runningjobs!ea4!10/26/2004-18:45:47:: i INFO:
Memory stats update timer enabled: Cycle: 60 seconds
ReportingServicesService!crypto!d4c!10/26/2004-18:45:47:: i INFO:
Initializing crypto as user: NT AUTHORITY\NETWORK SERVICE
ReportingServicesService!crypto!d4c!10/26/2004-18:45:47:: i INFO: Exporting
public key
ReportingServicesService!crypto!d4c!10/26/2004-18:45:47:: i INFO: Performing
sku validation
ReportingServicesService!crypto!d4c!10/26/2004-18:45:47:: i INFO: Importing
existing encryption key
ReportingServicesService!dbpolling!d4c!10/26/2004-18:45:47:: EventPolling
polling service started
ReportingServicesService!dbpolling!d4c!10/26/2004-18:45:47::
NotificationPolling polling service started
ReportingServicesService!dbpolling!d4c!10/26/2004-18:45:47:: SchedulePolling
polling service started
ReportingServicesService!dbpolling!c2c!10/26/2004-18:45:47::
NotificationPolling heartbeat thread started.
ReportingServicesService!dbpolling!1464!10/26/2004-18:45:47:: EventPolling
heartbeat thread started.
ReportingServicesService!dbpolling!1254!10/26/2004-18:45:47:: Polling started
ReportingServicesService!library!1590!10/26/2004-18:55:47:: Using folder
D:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\RSTempFiles
for temporary files.
ReportingServicesService!library!1590!10/26/2004-18:55:47:: i INFO: Cleaned
0 batch records, 0 policies, 0 sessions, 0 cache entries, 3 snapshots, 10
chunks, 0 running jobs
ReportingServicesService!dbpolling!1254!10/26/2004-19:04:09:: EventPolling
processing 1 more items. 1 Total items in internal queue.
ReportingServicesService!dbpolling!13c!10/26/2004-19:04:09:: EventPolling
processing item 91cd2565-e05c-4157-accf-8ac92b1b24c8
ReportingServicesService!library!13c!10/26/2004-19:04:09:: Schedule
23b76016-934c-4b5c-bcb1-4ebe8d981694 executed at 10/26/2004 7:04:09 PM.
ReportingServicesService!schedule!13c!10/26/2004-19:04:09:: Creating Time
based subscription notification for subscription:
d680d144-e89e-4dd2-8be7-3f365310eb4f
ReportingServicesService!library!13c!10/26/2004-19:04:09:: Schedule
23b76016-934c-4b5c-bcb1-4ebe8d981694 execution completed at 10/26/2004
7:04:09 PM.
ReportingServicesService!dbpolling!13c!10/26/2004-19:04:09:: EventPolling
finished processing item 91cd2565-e05c-4157-accf-8ac92b1b24c8
ReportingServicesService!dbpolling!1254!10/26/2004-19:04:09::
NotificationPolling processing 1 more items. 1 Total items in internal queue.
ReportingServicesService!dbpolling!13c!10/26/2004-19:04:09::
NotificationPolling processing item af68ce86-9586-4feb-b332-3019e012eda7
ReportingServicesService!library!13c!10/26/2004-19:04:09:: i INFO:
Initializing EnableIntegratedSecurity to 'True' as specified in Server
system properties.
ReportingServicesService!library!13c!10/26/2004-19:04:10:: i INFO: Call to
RenderFirst( '/Ahl Reports/QualityOfImages' )
ReportingServicesService!library!13c!10/26/2004-19:04:10:: i INFO:
Initializing SessionTimeout to '600' second(s) as specified in Server system
properties.
ReportingServicesService!library!13c!10/26/2004-19:04:10:: i INFO:
Initializing EnableExecutionLogging to 'True' as specified in Server system
properties.
ReportingServicesService!library!fe8!10/26/2004-19:04:10:: i INFO:
Initializing SqlStreamingBufferSize to default value of '64640' Bytes because
it was not specified in Server system properties.
ReportingServicesService!library!fe8!10/26/2004-19:04:10:: i INFO:
Initializing SnapshotCompression to 'SQL' as specified in Server system
properties.
ReportingServicesService!library!13c!10/26/2004-19:04:10:: i INFO:
Initializing SessionAccessTimeout to default value of '600' seconds because
it was not specified in Server system properties.
ReportingServicesService!session!13c!10/26/2004-19:04:10:: i INFO:
LoadSnapshot: Item with session: d5x5c355p2lstn45rxfewd55, reportPath: /Ahl
Reports/QualityOfImages, userName: AHLCENTRAL\XXX not found in the database
ReportingServicesService!chunks!13c!10/26/2004-19:04:10:: i INFO: ###
GetReportChunk('QualityOfImages_style', 1), chunk was not found!
this=0b55a7a3-80b8-4761-b0c7-22bb5f291c0b
ReportingServicesService!chunks!13c!10/26/2004-19:04:10:: i INFO: ###
GetReportChunk('Main', 0), chunk was not found!
this=0b55a7a3-80b8-4761-b0c7-22bb5f291c0b
ReportingServicesService!processing!13c!10/26/2004-19:04:10:: a ASSERT:
Assertion failed! Call stack:
Microsoft.ReportingServices.ReportProcessing.Persistence.f.b(Boolean A_0)
Microsoft.ReportingServices.ReportProcessing.Persistence.f.a(Stream A_0)
Microsoft.ReportingServices.ReportProcessing.Persistence.f..ctor(Stream
A_0)
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.a(GetReportChunk A_0, CreateReportChunk A_1, Hashtable& A_2, a& A_3, Boolean& A_4)
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshotStream(CreateReportChunk
createChunkCallback, String streamName, RenderingContext rc, GetResource
getResourceCallback)
Microsoft.ReportingServices.Library.RSService.InternalGetReportImageLive(ClientRequest session, CatalogItemContext itemContext, String imageId)
Microsoft.ReportingServices.Library.RSService.InternalGetReportImage(ClientRequest session, CatalogItemContext itemContext)
Microsoft.ReportingServices.Library.RSService.GetReportImage(ClientRequest
session, CatalogItemContext itemContext)
Microsoft.ReportingServices.Library.RenderedOutputFileImpl.GetRsStream()
Microsoft.ReportingServices.Library.RenderedOutputFileImpl.get_FileName()
Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.EmbedReport(IMessage
message, RenderedOutputFile[] reportData, Notification notification,
SubscriptionData data)
Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.ConstructMessageBody(IMessage message, Notification notification, SubscriptionData data)
Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.CreateMessage(Notification notification)
Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification notification)
Microsoft.ReportingServices.Library.NotificationQueueWorker.HandleNotification(QueueItem item)
Microsoft.ReportingServices.Library.NotificationQueueWorker.QueueWorker(QueueItem item)
Microsoft.ReportingServices.Library.QueuePollWorker.WorkItemStart(Object
state)
ReportingServicesService!processing!13c!10/26/2004-19:04:10:: e ERROR:
Throwing
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An
unexpected error occurred in Report Processing., ;
Info:
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An
unexpected error occurred in Report Processing.
ReportingServicesService!emailextension!13c!10/26/2004-19:04:10:: Error
sending email.
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An
unexpected error occurred in Report Processing.
at Microsoft.ReportingServices.ReportProcessing.Persistence.f.b(Boolean
A_0)
at Microsoft.ReportingServices.ReportProcessing.Persistence.f.a(Stream A_0)
at
Microsoft.ReportingServices.ReportProcessing.Persistence.f..ctor(Stream A_0)
at
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.a(GetReportChunk A_0, CreateReportChunk A_1, Hashtable& A_2, a& A_3, Boolean& A_4)
at
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshotStream(CreateReportChunk
createChunkCallback, String streamName, RenderingContext rc, GetResource
getResourceCallback)
at
Microsoft.ReportingServices.Library.RSService.InternalGetReportImageLive(ClientRequest session, CatalogItemContext itemContext, String imageId)
at
Microsoft.ReportingServices.Library.RSService.InternalGetReportImage(ClientRequest session, CatalogItemContext itemContext)
at
Microsoft.ReportingServices.Library.RSService.GetReportImage(ClientRequest
session, CatalogItemContext itemContext)
at Microsoft.ReportingServices.Library.RenderedOutputFileImpl.GetRsStream()
at
Microsoft.ReportingServices.Library.RenderedOutputFileImpl.get_FileName()
at
Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.EmbedReport(IMessage
message, RenderedOutputFile[] reportData, Notification notification,
SubscriptionData data)
at
Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.ConstructMessageBody(IMessage message, Notification notification, SubscriptionData data)
at
Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.CreateMessage(Notification notification)
at
Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification notification)
ReportingServicesService!notification!13c!10/26/2004-19:04:10:: Notification
af68ce86-9586-4feb-b332-3019e012eda7 completed. Success: False, Status:
Failure sending mail: An unexpected error occurred in Report Processing.,
DeliveryExtension: Report Server Email, Report: QualityOfImages, Attempt 0
ReportingServicesService!dbpolling!13c!10/26/2004-19:04:10::
NotificationPolling finished processing item
af68ce86-9586-4feb-b332-3019e012eda7
ReportingServicesService!library!13c!10/26/2004-19:05:47:: i INFO: Cleaned 0
batch records, 0 policies, 0 sessions, 0 cache entries, 1 snapshots, 2
chunks, 0 running jobs
ReportingServicesService!library!13c4!10/26/2004-19:15:47:: i INFO: Cleaned
0 batch records, 0 policies, 0 sessions, 0 cache entries, 2 snapshots, 8
chunks, 0 running jobs
ReportingServicesService!library!168!10/26/2004-19:25:47:: i INFO: Cleaned 0
batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0
chunks, 0 running jobs
ReportingServicesService!library!11f8!10/26/2004-19:35:47:: i INFO: Cleaned
0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0
chunks, 0 running jobsI had it installed on D:\. I uninstalled, reinstalled on C:\ and now it
works. Must have been some permission thing.
"Bhavin" wrote:
> Hello, I have installed a fresh new Reporting Service sp1, on a Windows 2003
> Server, SQL 2000 sp3, IIS 6.0 and am getting an error when trying to send out
> emails via subscriptions. Cannot decipher the error. Log file is below:
> --
> <Header>
> <Product>Microsoft SQL Server Reporting Services Version
> 8.00.878.00</Product>
> <Locale>en-US</Locale>
> <TimeZone>Pacific Daylight Time</TimeZone>
> <Path>D:\Program Files\Microsoft SQL Server\MSSQL\Reporting
> Services\LogFiles\ReportServerService__10_26_2004_18_45_47.log</Path>
> <SystemName>XXX</SystemName>
> <OSName>Microsoft Windows NT 5.2.3790.0</OSName>
> <OSVersion>5.2.3790.0</OSVersion>
> </Header>
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing ConnectionType to '1' as specified in Configuration file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing IsSchedulingService to 'True' as specified in Configuration
> file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing IsNotificationService to 'True' as specified in Configuration
> file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing IsEventService to 'True' as specified in Configuration file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing PollingInterval to '10' second(s) as specified in Configuration
> file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing MemoryLimit to '60' percent as specified in Configuration file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing RecycleTime to '720' minute(s) as specified in Configuration
> file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing MaximumMemoryLimit to '80' percent as specified in Configuration
> file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing MaxAppDomainUnloadTime to '30' minute(s) as specified in
> Configuration file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing MaxQueueThreads to '0' thread(s) as specified in Configuration
> file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing MaxActiveReqForOneUser to '20' requests(s) as specified in
> Configuration file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing MaxScheduleWait to '5' second(s) as specified in Configuration
> file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing DatabaseQueryTimeout to '120' second(s) as specified in
> Configuration file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing InstanceName to 'MSSQLSERVER' as specified in Configuration
> file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing ProcessRecycleOptions to '0' as specified in Configuration file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing RunningRequestsScavengerCycle to '60' second(s) as specified in
> Configuration file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing RunningRequestsDbCycle to '60' second(s) as specified in
> Configuration file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing RunningRequestsAge to '30' second(s) as specified in
> Configuration file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing CleanupCycleMinutes to '10' minute(s) as specified in
> Configuration file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing SecureConnectionLevel to '0' as specified in Configuration file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing DisplayErrorLink to 'True' as specified in Configuration file.
> ReportingServicesService!library!ea4!10/26/2004-18:45:47:: i INFO:
> Initializing WebServiceUseFileShareStorage to default value of 'False'
> because it was not specified in Configuration file.
> ReportingServicesService!resourceutilities!ea4!10/26/2004-18:45:47:: i INFO:
> Running on 2 physical processors, 4 logical processors
> ReportingServicesService!resourceutilities!ea4!10/26/2004-18:45:47:: i INFO:
> Reporting Services starting SKU: Standard
> ReportingServicesService!runningjobs!ea4!10/26/2004-18:45:47:: i INFO:
> Database Cleanup (NT Service) timer enabled: Cycle: 600 seconds
> ReportingServicesService!runningjobs!ea4!10/26/2004-18:45:47:: i INFO:
> Running Requests Scavenger timer enabled: Cycle: 60 seconds
> ReportingServicesService!runningjobs!ea4!10/26/2004-18:45:47:: i INFO:
> Running Requests DB timer enabled: Cycle: 60 seconds
> ReportingServicesService!runningjobs!ea4!10/26/2004-18:45:47:: i INFO:
> Execution Log Entry Expiration timer enabled: Cycle: 26052 seconds
> ReportingServicesService!runningjobs!ea4!10/26/2004-18:45:47:: i INFO:
> Memory stats update timer enabled: Cycle: 60 seconds
> ReportingServicesService!crypto!d4c!10/26/2004-18:45:47:: i INFO:
> Initializing crypto as user: NT AUTHORITY\NETWORK SERVICE
> ReportingServicesService!crypto!d4c!10/26/2004-18:45:47:: i INFO: Exporting
> public key
> ReportingServicesService!crypto!d4c!10/26/2004-18:45:47:: i INFO: Performing
> sku validation
> ReportingServicesService!crypto!d4c!10/26/2004-18:45:47:: i INFO: Importing
> existing encryption key
> ReportingServicesService!dbpolling!d4c!10/26/2004-18:45:47:: EventPolling
> polling service started
> ReportingServicesService!dbpolling!d4c!10/26/2004-18:45:47::
> NotificationPolling polling service started
> ReportingServicesService!dbpolling!d4c!10/26/2004-18:45:47:: SchedulePolling
> polling service started
> ReportingServicesService!dbpolling!c2c!10/26/2004-18:45:47::
> NotificationPolling heartbeat thread started.
> ReportingServicesService!dbpolling!1464!10/26/2004-18:45:47:: EventPolling
> heartbeat thread started.
> ReportingServicesService!dbpolling!1254!10/26/2004-18:45:47:: Polling started
> ReportingServicesService!library!1590!10/26/2004-18:55:47:: Using folder
> D:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\RSTempFiles
> for temporary files.
> ReportingServicesService!library!1590!10/26/2004-18:55:47:: i INFO: Cleaned
> 0 batch records, 0 policies, 0 sessions, 0 cache entries, 3 snapshots, 10
> chunks, 0 running jobs
> ReportingServicesService!dbpolling!1254!10/26/2004-19:04:09:: EventPolling
> processing 1 more items. 1 Total items in internal queue.
> ReportingServicesService!dbpolling!13c!10/26/2004-19:04:09:: EventPolling
> processing item 91cd2565-e05c-4157-accf-8ac92b1b24c8
> ReportingServicesService!library!13c!10/26/2004-19:04:09:: Schedule
> 23b76016-934c-4b5c-bcb1-4ebe8d981694 executed at 10/26/2004 7:04:09 PM.
> ReportingServicesService!schedule!13c!10/26/2004-19:04:09:: Creating Time
> based subscription notification for subscription:
> d680d144-e89e-4dd2-8be7-3f365310eb4f
> ReportingServicesService!library!13c!10/26/2004-19:04:09:: Schedule
> 23b76016-934c-4b5c-bcb1-4ebe8d981694 execution completed at 10/26/2004
> 7:04:09 PM.
> ReportingServicesService!dbpolling!13c!10/26/2004-19:04:09:: EventPolling
> finished processing item 91cd2565-e05c-4157-accf-8ac92b1b24c8
> ReportingServicesService!dbpolling!1254!10/26/2004-19:04:09::
> NotificationPolling processing 1 more items. 1 Total items in internal queue.
> ReportingServicesService!dbpolling!13c!10/26/2004-19:04:09::
> NotificationPolling processing item af68ce86-9586-4feb-b332-3019e012eda7
> ReportingServicesService!library!13c!10/26/2004-19:04:09:: i INFO:
> Initializing EnableIntegratedSecurity to 'True' as specified in Server
> system properties.
> ReportingServicesService!library!13c!10/26/2004-19:04:10:: i INFO: Call to
> RenderFirst( '/Ahl Reports/QualityOfImages' )
> ReportingServicesService!library!13c!10/26/2004-19:04:10:: i INFO:
> Initializing SessionTimeout to '600' second(s) as specified in Server system
> properties.
> ReportingServicesService!library!13c!10/26/2004-19:04:10:: i INFO:
> Initializing EnableExecutionLogging to 'True' as specified in Server system
> properties.
> ReportingServicesService!library!fe8!10/26/2004-19:04:10:: i INFO:
> Initializing SqlStreamingBufferSize to default value of '64640' Bytes because
> it was not specified in Server system properties.
> ReportingServicesService!library!fe8!10/26/2004-19:04:10:: i INFO:
> Initializing SnapshotCompression to 'SQL' as specified in Server system
> properties.
> ReportingServicesService!library!13c!10/26/2004-19:04:10:: i INFO:
> Initializing SessionAccessTimeout to default value of '600' seconds because
> it was not specified in Server system properties.
> ReportingServicesService!session!13c!10/26/2004-19:04:10:: i INFO:
> LoadSnapshot: Item with session: d5x5c355p2lstn45rxfewd55, reportPath: /Ahl
> Reports/QualityOfImages, userName: AHLCENTRAL\XXX not found in the database
> ReportingServicesService!chunks!13c!10/26/2004-19:04:10:: i INFO: ###
> GetReportChunk('QualityOfImages_style', 1), chunk was not found!
> this=0b55a7a3-80b8-4761-b0c7-22bb5f291c0b
> ReportingServicesService!chunks!13c!10/26/2004-19:04:10:: i INFO: ###
> GetReportChunk('Main', 0), chunk was not found!
> this=0b55a7a3-80b8-4761-b0c7-22bb5f291c0b
> ReportingServicesService!processing!13c!10/26/2004-19:04:10:: a ASSERT:
> Assertion failed! Call stack:
> Microsoft.ReportingServices.ReportProcessing.Persistence.f.b(Boolean A_0)
> Microsoft.ReportingServices.ReportProcessing.Persistence.f.a(Stream A_0)
> Microsoft.ReportingServices.ReportProcessing.Persistence.f..ctor(Stream
> A_0)
> Microsoft.ReportingServices.ReportProcessing.ReportProcessing.a(GetReportChunk A_0, CreateReportChunk A_1, Hashtable& A_2, a& A_3, Boolean& A_4)
> Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshotStream(CreateReportChunk
> createChunkCallback, String streamName, RenderingContext rc, GetResource
> getResourceCallback)
> Microsoft.ReportingServices.Library.RSService.InternalGetReportImageLive(ClientRequest session, CatalogItemContext itemContext, String imageId)
> Microsoft.ReportingServices.Library.RSService.InternalGetReportImage(ClientRequest session, CatalogItemContext itemContext)
> Microsoft.ReportingServices.Library.RSService.GetReportImage(ClientRequest
> session, CatalogItemContext itemContext)
> Microsoft.ReportingServices.Library.RenderedOutputFileImpl.GetRsStream()
> Microsoft.ReportingServices.Library.RenderedOutputFileImpl.get_FileName()
> Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.EmbedReport(IMessage
> message, RenderedOutputFile[] reportData, Notification notification,
> SubscriptionData data)
> Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.ConstructMessageBody(IMessage message, Notification notification, SubscriptionData data)
> Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.CreateMessage(Notification notification)
> Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification notification)
> Microsoft.ReportingServices.Library.NotificationQueueWorker.HandleNotification(QueueItem item)
> Microsoft.ReportingServices.Library.NotificationQueueWorker.QueueWorker(QueueItem item)
> Microsoft.ReportingServices.Library.QueuePollWorker.WorkItemStart(Object
> state)
> ReportingServicesService!processing!13c!10/26/2004-19:04:10:: e ERROR:
> Throwing
> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An
> unexpected error occurred in Report Processing., ;
> Info:
> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An
> unexpected error occurred in Report Processing.
> ReportingServicesService!emailextension!13c!10/26/2004-19:04:10:: Error
> sending email.
> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An
> unexpected error occurred in Report Processing.
> at Microsoft.ReportingServices.ReportProcessing.Persistence.f.b(Boolean
> A_0)
> at Microsoft.ReportingServices.ReportProcessing.Persistence.f.a(Stream A_0)
> at
> Microsoft.ReportingServices.ReportProcessing.Persistence.f..ctor(Stream A_0)
> at
> Microsoft.ReportingServices.ReportProcessing.ReportProcessing.a(GetReportChunk A_0, CreateReportChunk A_1, Hashtable& A_2, a& A_3, Boolean& A_4)
> at
> Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderSnapshotStream(CreateReportChunk
> createChunkCallback, String streamName, RenderingContext rc, GetResource
> getResourceCallback)
> at
> Microsoft.ReportingServices.Library.RSService.InternalGetReportImageLive(ClientRequest session, CatalogItemContext itemContext, String imageId)
> at
> Microsoft.ReportingServices.Library.RSService.InternalGetReportImage(ClientRequest session, CatalogItemContext itemContext)
> at
> Microsoft.ReportingServices.Library.RSService.GetReportImage(ClientRequest
> session, CatalogItemContext itemContext)
> at Microsoft.ReportingServices.Library.RenderedOutputFileImpl.GetRsStream()
> at
> Microsoft.ReportingServices.Library.RenderedOutputFileImpl.get_FileName()
> at
> Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.EmbedReport(IMessage
> message, RenderedOutputFile[] reportData, Notification notification,
> SubscriptionData data)
> at
> Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.ConstructMessageBody(IMessage message, Notification notification, SubscriptionData data)
> at
> Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.CreateMessage(Notification notification)
> at
> Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification notification)
> ReportingServicesService!notification!13c!10/26/2004-19:04:10:: Notification
> af68ce86-9586-4feb-b332-3019e012eda7 completed. Success: False, Status:
> Failure sending mail: An unexpected error occurred in Report Processing.,
> DeliveryExtension: Report Server Email, Report: QualityOfImages, Attempt 0
> ReportingServicesService!dbpolling!13c!10/26/2004-19:04:10::
> NotificationPolling finished processing item
> af68ce86-9586-4feb-b332-3019e012eda7
> ReportingServicesService!library!13c!10/26/2004-19:05:47:: i INFO: Cleaned 0
> batch records, 0 policies, 0 sessions, 0 cache entries, 1 snapshots, 2
> chunks, 0 running jobs
> ReportingServicesService!library!13c4!10/26/2004-19:15:47:: i INFO: Cleaned
> 0 batch records, 0 policies, 0 sessions, 0 cache entries, 2 snapshots, 8
> chunks, 0 running jobs
> ReportingServicesService!library!168!10/26/2004-19:25:47:: i INFO: Cleaned 0
> batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0
> chunks, 0 running jobs
> ReportingServicesService!library!11f8!10/26/2004-19:35:47:: i INFO: Cleaned
> 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0
> chunks, 0 running jobs
>