Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Tuesday, March 27, 2012

customized error output?

I am using SSIS to load a lot of Excel, csv files. Some of the files will fail for various formating/validation reason. Is it a good way to capture the error and generate a nice error report so the provider can read it easily and correct the data files?

The error log of the package is difficult to read.

I have one suggestion:

1. instead of failing the component whenever there is an error during DataConversion on Lookup etc, redirect that row and then do a multicast.

2. Now you have two identical sets.

3.As you are aware each column has a lineage ID now generate a collection of column names and Lineage ID.

4. Perform an Inner join with the other replica on Lineage ID.

5. Retrieve the Erroneous Column name, Value and Row number.

6. Finally once you are done with all transformations, join the input obtained as mentioned above, on Rownumber and write out records as Erroneous and Non-Erroneous Data.

Customized Error Message

Hi,
I have a table like this:
CREATE TABLE Table1 (
[ID] int NOT NULL Primary Key)
After inserting some records, obviously when I try to update all records to
a particular value, SQL server raises an error (number 2627) that indicates
the "Violation of PRIMARY KEY constraint" has happened.
What I need to do is to return an error message instead of SQL server's.
Suppose that I have this SP:
CREATE PROCEDURE UpdateTable1 AS
BEGIN TRAN
UPDATE table1 set id=1
IF @.@.Error = 2627
begin
print 'Duplicate Value'
raiserror('Duplicate Value',16,1)
rollback tran
end
else
begin
print 'Update was ok'
commit tran
end
GO
SQL server returns two error descriptions when I execute this SP: One from
its original messages and the other one from my raiserror statement.
I want to display my own error description to the client without writing
extra code for error handling in my client app(and also for centralizing my
own error descriptions those are returned instead of SQL server's error
messages).
Any help would be greatly appreciated.
Amin
See my reply in .programming. Please don't multipost.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Amin Sobati" <amins@.morva.net> wrote in message news:uy1qx39FEHA.1368@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I have a table like this:
>
> CREATE TABLE Table1 (
> [ID] int NOT NULL Primary Key)
>
> After inserting some records, obviously when I try to update all records to
> a particular value, SQL server raises an error (number 2627) that indicates
> the "Violation of PRIMARY KEY constraint" has happened.
> What I need to do is to return an error message instead of SQL server's.
> Suppose that I have this SP:
>
> CREATE PROCEDURE UpdateTable1 AS
> BEGIN TRAN
> UPDATE table1 set id=1
> IF @.@.Error = 2627
> begin
> print 'Duplicate Value'
> raiserror('Duplicate Value',16,1)
> rollback tran
> end
> else
> begin
> print 'Update was ok'
> commit tran
> end
> GO
> SQL server returns two error descriptions when I execute this SP: One from
> its original messages and the other one from my raiserror statement.
> I want to display my own error description to the client without writing
> extra code for error handling in my client app(and also for centralizing my
> own error descriptions those are returned instead of SQL server's error
> messages).
> Any help would be greatly appreciated.
> Amin
>
>
>

Customize Error Messages

Is there a way to customize the error messages returned from SSRS2005?

I do not want error messages like

"Access deined for <computername>\<username>'

But a more user friendly message returned.

How can that be done?

Thanks.

Have you looked at Books Online under the error handling (Reporting Services) section?|||

Yes. It does not have anything to actually customize the errors returned from the SQL Server Reporting Server. DO you have a specific link I can look at?

|||

Try this...

http://msdn2.microsoft.com/en-us/library/ms153616.aspx

The solution may lie in the ASP.NET programming. Another thing to try is to modify the error pages in the IIS Management Console and see if these get displayed upon the specific error.

Customize Error Messages

Is there a way to customize the error messages returned from SSRS2005?

I do not want error messages like

"Access deined for <computername>\<username>'

But a more user friendly message returned.

How can that be done?

Thanks.

Have you looked at Books Online under the error handling (Reporting Services) section?|||

Yes. It does not have anything to actually customize the errors returned from the SQL Server Reporting Server. DO you have a specific link I can look at?

|||

Try this...

http://msdn2.microsoft.com/en-us/library/ms153616.aspx

The solution may lie in the ASP.NET programming. Another thing to try is to modify the error pages in the IIS Management Console and see if these get displayed upon the specific error.

Thursday, March 22, 2012

Custom Task deployment

Hi all,

I'm having a nightmare trying to test my custom task.

I get the following error message when trying to add the task from the toolbox...

Cannot create a task with the name "myTask, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b8e53511af163eb7". Verify that the name is correct.
(Package)


Program Location:

at Microsoft.SqlServer.Dts.Runtime.Executables.Add(String moniker)
at Microsoft.DataTransformationServices.Design.DtsBasePackageDesigner.CreateExecutable(String moniker, IDTSSequence container, String name)

Any ideas?

Cheers.

Is the task registered in the GAC? Also, it has to be copied to your Program Files\Microsoft SQL Server\90\DTS\Tasks folder (sounds like you have already done that).

Have you signed the component? Again, sounds like you have already done this, just covering the bases.

|||

Hi,

thanks for your response, but yeah it turns up in the toolbox so I had to sign it and GAC it to get to that stage.

I've done everything that is supposed to be required to get it working so I'm just out of ideas now.

Cheers.

|||

Sorted it now, turns out you have to GAC all assemblies referenced by the task not just the task itself.

Silly me.

Custom task database connection

I'm developing a custom error task for SSIS. I've got a couple of existing OLE DB connections that exist in the Connection Manager. I want a drop down to be displayed in the Custom Task dialogue properties where the user can select one of the databases from the Connection manager.

2 questions:
1. How can i get the list of OLE DB databases in the properties dialogue?
2. Does anyone have a code sample on accessing a database like that within the custom component?Try this post http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=122993&SiteID=1

I don't think you can use an OLE-DB connection directly in managed code. You may (I haven't tried) be able to read off the connection string and use that to create your own ADO.net connection. I have been using ADO.Net connections myself, normally SQL, which gives you a SqlClient.SqlConnection object.

|||Hi Darren,

I don't understand how the IDtsTaskUI.Initialize one ties in here? Also, do you have to tie in the connections within the Acquire Connection method?|||If you have a custom UI for your task then you will have implemented IDtsTaskUI.Initialize in the class that implements IDtsTaskUI.

You call AcquireConnection on the connection you want to get the real connection object. For a file connection that is just a string of the filename, for an ADO.NET connection type SQL, that is a SqlConnection. You would call this in your UI, and also at run-time in the Execute method.

Tuesday, March 20, 2012

Custom Security works but i get this error sometimes...

I installed custom security the same way I did on SRS 2000. I've been running
srs2000 for a little over a year with custom security.
I used the 2005 Custom Security project and installed it on a dev box.
Everything seems to work (i get login screen when i try to access report
manager) but when i try to access report server I get a wacky error:
c:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting
Services\reportserver\Logon.aspx(28): error CS0012: The type
'System.Drawing.Color' is defined in an assembly that is not referenced. You
must add a reference to assembly 'System.Drawing, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
----
The strange thing about this is that I am referencing this module in my
project both within the "References" and in code using the "using" statement.
I can't figure out what I'm missing...
Has anyone else encountered this issue? Any help would be greatly appreciated.
Thanks,
NunoBy the way, I'm referencing this post to SRS 2005.
Nuno
"Nuno" wrote:
> I installed custom security the same way I did on SRS 2000. I've been running
> srs2000 for a little over a year with custom security.
> I used the 2005 Custom Security project and installed it on a dev box.
> Everything seems to work (i get login screen when i try to access report
> manager) but when i try to access report server I get a wacky error:
> c:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting
> Services\reportserver\Logon.aspx(28): error CS0012: The type
> 'System.Drawing.Color' is defined in an assembly that is not referenced. You
> must add a reference to assembly 'System.Drawing, Version=2.0.0.0,
> Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
> ----
> The strange thing about this is that I am referencing this module in my
> project both within the "References" and in code using the "using" statement.
> I can't figure out what I'm missing...
> Has anyone else encountered this issue? Any help would be greatly appreciated.
> Thanks,
> Nuno
>|||I figured out why this happens... I added ForeColor="Red" to the one of the
labels called lblMessage in the Logon.aspx page. I changed it to
Style="Color:Red;" and it now works fine. I have no clue as to why this would
cause an error in the Custom Security Sample solution but I suspect it has
something to do with its connection to a resource(.resx) file.
Nuno
"Nuno" wrote:
> By the way, I'm referencing this post to SRS 2005.
> Nuno
> "Nuno" wrote:
> > I installed custom security the same way I did on SRS 2000. I've been running
> > srs2000 for a little over a year with custom security.
> >
> > I used the 2005 Custom Security project and installed it on a dev box.
> > Everything seems to work (i get login screen when i try to access report
> > manager) but when i try to access report server I get a wacky error:
> >
> > c:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting
> > Services\reportserver\Logon.aspx(28): error CS0012: The type
> > 'System.Drawing.Color' is defined in an assembly that is not referenced. You
> > must add a reference to assembly 'System.Drawing, Version=2.0.0.0,
> > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
> >
> > ----
> >
> > The strange thing about this is that I am referencing this module in my
> > project both within the "References" and in code using the "using" statement.
> > I can't figure out what I'm missing...
> >
> > Has anyone else encountered this issue? Any help would be greatly appreciated.
> >
> > Thanks,
> >
> > Nuno
> >

custom security extension

Hi Everyone,
After implementing the custom security for Report server I am getting
this error when I try to login to the Reporting Services through SQL
Management Studio.
Error: Client found response content type of '', but expected
'text/xml'.
The request failed with an empty response.
Does anyone have any solution for this. Please let me know if you do.
Thanks in Advance,
BharathHi All,
I found the cause and resolution for this error. I thought of sharing
it here.
After implementing the forms authentication, you will have to login to
the Reporting services in the Management Studio using forms
authentication itself. Otherwise the user is likely to get the error
mentioned below.
Bharath
bharath.mp@.gmail.com wrote:
> Hi Everyone,
> After implementing the custom security for Report server I am getting
> this error when I try to login to the Reporting Services through SQL
> Management Studio.
> Error: Client found response content type of '', but expected
> 'text/xml'.
> The request failed with an empty response.
> Does anyone have any solution for this. Please let me know if you do.
> Thanks in Advance,
> Bharath

Monday, March 19, 2012

Custom Security and RS Standard Edition

My report service is Standard Edition and I implement custom security. When
I start the reporting server, the following error are shown in the log.
ERROR: Throwing
Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
An internal error occurred on the report server. See the error log for more
details., CryptUnprotectData: Win32 error:-2146893813;
Info:
Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
An internal error occurred on the report server. See the error log for more
details.
ReportingServicesService!library!11f0!12/16/2004-14:46:03:: e ERROR:
Throwing
Microsoft.ReportingServices.Diagnostics.Utilities.FailedToDecryptConfigInformationException:
The encrypted value for configuration setting Dsn cannot be decrypted., ;
Info:
Microsoft.ReportingServices.Diagnostics.Utilities.FailedToDecryptConfigInformationException:
The encrypted value for configuration setting Dsn cannot be decrypted. -->
Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
An internal error occurred on the report server. See the error log for more
details.
at
Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.UnprotectData(Byte[] data, Int32 dwFlags)
at
Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.LocalUnprotectData(Byte[] data)
at
Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.LocalUnprotectData(String data)
at
Microsoft.ReportingServices.Diagnostics.RSConfiguration.DecryptCatalogData(String encryptedData, String element)
-- End of inner exception stack trace --
ReportingServicesService!servicecontroller!11f0!12/16/2004-14:46:03:: e
ERROR: Exception caught starting RPC server:
Microsoft.ReportingServices.Diagnostics.Utilities.FailedToDecryptConfigInformationException:
The encrypted value for configuration setting Dsn cannot be decrypted. -->
Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
An internal error occurred on the report server. See the error log for more
details.
at
Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.UnprotectData(Byte[] data, Int32 dwFlags)
at
Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.LocalUnprotectData(Byte[] data)
at
Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.LocalUnprotectData(String data)
at
Microsoft.ReportingServices.Diagnostics.RSConfiguration.DecryptCatalogData(String encryptedData, String element)
-- End of inner exception stack trace --
at
Microsoft.ReportingServices.Diagnostics.RSConfiguration.DecryptCatalogData(String encryptedData, String element)
at
Microsoft.ReportingServices.Diagnostics.RSConfiguration.get_ConnectionString()
at
Microsoft.ReportingServices.Library.ServiceAppDomainController.StartRPCServer()
ReportingServicesService!configmanager!11f0!12/16/2004-14:46:03:: Error
occured with a config file change. New config file will not be used. Error:
The encrypted value for configuration setting Dsn cannot be decrypted.
ReportingServicesService!servicecontroller!efc!12/16/2004-15:08:30:: i INFO:
RPC Server stopped
ReportingServicesService!servicecontroller!efc!12/16/2004-15:08:31:: Service
shutting down.Custom Security extensions are not supported with RS Standard Edition. They
require Enterprise edition (or developer edition for development).
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"May Liu" <MayLiu@.discussions.microsoft.com> wrote in message
news:6B887742-D891-45CB-8B42-30A3EBA1E7A4@.microsoft.com...
> My report service is Standard Edition and I implement custom security.
> When
> I start the reporting server, the following error are shown in the log.
> ERROR: Throwing
> Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
> An internal error occurred on the report server. See the error log for
> more
> details., CryptUnprotectData: Win32 error:-2146893813;
> Info:
> Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
> An internal error occurred on the report server. See the error log for
> more
> details.
> ReportingServicesService!library!11f0!12/16/2004-14:46:03:: e ERROR:
> Throwing
> Microsoft.ReportingServices.Diagnostics.Utilities.FailedToDecryptConfigInformationException:
> The encrypted value for configuration setting Dsn cannot be decrypted., ;
> Info:
> Microsoft.ReportingServices.Diagnostics.Utilities.FailedToDecryptConfigInformationException:
> The encrypted value for configuration setting Dsn cannot be
> decrypted. -->
> Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
> An internal error occurred on the report server. See the error log for
> more
> details.
> at
> Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.UnprotectData(Byte[]
> data, Int32 dwFlags)
> at
> Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.LocalUnprotectData(Byte[]
> data)
> at
> Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.LocalUnprotectData(String
> data)
> at
> Microsoft.ReportingServices.Diagnostics.RSConfiguration.DecryptCatalogData(String
> encryptedData, String element)
> -- End of inner exception stack trace --
> ReportingServicesService!servicecontroller!11f0!12/16/2004-14:46:03:: e
> ERROR: Exception caught starting RPC server:
> Microsoft.ReportingServices.Diagnostics.Utilities.FailedToDecryptConfigInformationException:
> The encrypted value for configuration setting Dsn cannot be
> decrypted. -->
> Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
> An internal error occurred on the report server. See the error log for
> more
> details.
> at
> Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.UnprotectData(Byte[]
> data, Int32 dwFlags)
> at
> Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.LocalUnprotectData(Byte[]
> data)
> at
> Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.LocalUnprotectData(String
> data)
> at
> Microsoft.ReportingServices.Diagnostics.RSConfiguration.DecryptCatalogData(String
> encryptedData, String element)
> -- End of inner exception stack trace --
> at
> Microsoft.ReportingServices.Diagnostics.RSConfiguration.DecryptCatalogData(String
> encryptedData, String element)
> at
> Microsoft.ReportingServices.Diagnostics.RSConfiguration.get_ConnectionString()
> at
> Microsoft.ReportingServices.Library.ServiceAppDomainController.StartRPCServer()
> ReportingServicesService!configmanager!11f0!12/16/2004-14:46:03:: Error
> occured with a config file change. New config file will not be used.
> Error:
> The encrypted value for configuration setting Dsn cannot be decrypted.
> ReportingServicesService!servicecontroller!efc!12/16/2004-15:08:30:: i
> INFO:
> RPC Server stopped
> ReportingServicesService!servicecontroller!efc!12/16/2004-15:08:31::
> Service
> shutting down.|||Actually, we don't need any features of Enterprise version but we need to
spend $20,000 US dollar to buy this product just because of Custom Security
Extensions and Data Driven Subscriptions. I don't think it is worth. How
about SQL server 2005 version ?
"Jeff A. Stucker" wrote:
> Custom Security extensions are not supported with RS Standard Edition. They
> require Enterprise edition (or developer edition for development).
> --
> Cheers,
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "May Liu" <MayLiu@.discussions.microsoft.com> wrote in message
> news:6B887742-D891-45CB-8B42-30A3EBA1E7A4@.microsoft.com...
> > My report service is Standard Edition and I implement custom security.
> > When
> > I start the reporting server, the following error are shown in the log.
> >
> > ERROR: Throwing
> > Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
> > An internal error occurred on the report server. See the error log for
> > more
> > details., CryptUnprotectData: Win32 error:-2146893813;
> > Info:
> > Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
> > An internal error occurred on the report server. See the error log for
> > more
> > details.
> > ReportingServicesService!library!11f0!12/16/2004-14:46:03:: e ERROR:
> > Throwing
> > Microsoft.ReportingServices.Diagnostics.Utilities.FailedToDecryptConfigInformationException:
> > The encrypted value for configuration setting Dsn cannot be decrypted., ;
> > Info:
> > Microsoft.ReportingServices.Diagnostics.Utilities.FailedToDecryptConfigInformationException:
> > The encrypted value for configuration setting Dsn cannot be
> > decrypted. -->
> > Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
> > An internal error occurred on the report server. See the error log for
> > more
> > details.
> > at
> > Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.UnprotectData(Byte[]
> > data, Int32 dwFlags)
> > at
> > Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.LocalUnprotectData(Byte[]
> > data)
> > at
> > Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.LocalUnprotectData(String
> > data)
> > at
> > Microsoft.ReportingServices.Diagnostics.RSConfiguration.DecryptCatalogData(String
> > encryptedData, String element)
> > -- End of inner exception stack trace --
> > ReportingServicesService!servicecontroller!11f0!12/16/2004-14:46:03:: e
> > ERROR: Exception caught starting RPC server:
> > Microsoft.ReportingServices.Diagnostics.Utilities.FailedToDecryptConfigInformationException:
> > The encrypted value for configuration setting Dsn cannot be
> > decrypted. -->
> > Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
> > An internal error occurred on the report server. See the error log for
> > more
> > details.
> > at
> > Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.UnprotectData(Byte[]
> > data, Int32 dwFlags)
> > at
> > Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.LocalUnprotectData(Byte[]
> > data)
> > at
> > Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.LocalUnprotectData(String
> > data)
> > at
> > Microsoft.ReportingServices.Diagnostics.RSConfiguration.DecryptCatalogData(String
> > encryptedData, String element)
> > -- End of inner exception stack trace --
> > at
> > Microsoft.ReportingServices.Diagnostics.RSConfiguration.DecryptCatalogData(String
> > encryptedData, String element)
> > at
> > Microsoft.ReportingServices.Diagnostics.RSConfiguration.get_ConnectionString()
> > at
> > Microsoft.ReportingServices.Library.ServiceAppDomainController.StartRPCServer()
> > ReportingServicesService!configmanager!11f0!12/16/2004-14:46:03:: Error
> > occured with a config file change. New config file will not be used.
> > Error:
> > The encrypted value for configuration setting Dsn cannot be decrypted.
> > ReportingServicesService!servicecontroller!efc!12/16/2004-15:08:30:: i
> > INFO:
> > RPC Server stopped
> > ReportingServicesService!servicecontroller!efc!12/16/2004-15:08:31::
> > Service
> > shutting down.
>
>|||No announcement has been made on features per version (there was a
presentation on improvements with 2005 but no mention of how things will be
packaged and what the costs would be). You say you don't need enterprise but
then you say you do, because data driven subscriptions and custom security
extensions are two major features of enterprise. There are not that many
things different. About the only other major difference other than those two
is support for web farms. I bet if you price versus Crystal that RS will
still come out ahead or at least even.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"May Liu" <MayLiu@.discussions.microsoft.com> wrote in message
news:73E4DC66-CC5D-4DB2-86BD-C0554280806B@.microsoft.com...
> Actually, we don't need any features of Enterprise version but we need to
> spend $20,000 US dollar to buy this product just because of Custom
> Security
> Extensions and Data Driven Subscriptions. I don't think it is worth. How
> about SQL server 2005 version ?
> "Jeff A. Stucker" wrote:
>> Custom Security extensions are not supported with RS Standard Edition.
>> They
>> require Enterprise edition (or developer edition for development).
>> --
>> Cheers,
>> '(' Jeff A. Stucker
>> \
>> Business Intelligence
>> www.criadvantage.com
>> ---
>> "May Liu" <MayLiu@.discussions.microsoft.com> wrote in message
>> news:6B887742-D891-45CB-8B42-30A3EBA1E7A4@.microsoft.com...
>> > My report service is Standard Edition and I implement custom security.
>> > When
>> > I start the reporting server, the following error are shown in the log.
>> >
>> > ERROR: Throwing
>> > Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
>> > An internal error occurred on the report server. See the error log for
>> > more
>> > details., CryptUnprotectData: Win32 error:-2146893813;
>> > Info:
>> > Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
>> > An internal error occurred on the report server. See the error log for
>> > more
>> > details.
>> > ReportingServicesService!library!11f0!12/16/2004-14:46:03:: e ERROR:
>> > Throwing
>> > Microsoft.ReportingServices.Diagnostics.Utilities.FailedToDecryptConfigInformationException:
>> > The encrypted value for configuration setting Dsn cannot be decrypted.,
>> > ;
>> > Info:
>> > Microsoft.ReportingServices.Diagnostics.Utilities.FailedToDecryptConfigInformationException:
>> > The encrypted value for configuration setting Dsn cannot be
>> > decrypted. -->
>> > Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
>> > An internal error occurred on the report server. See the error log for
>> > more
>> > details.
>> > at
>> > Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.UnprotectData(Byte[]
>> > data, Int32 dwFlags)
>> > at
>> > Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.LocalUnprotectData(Byte[]
>> > data)
>> > at
>> > Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.LocalUnprotectData(String
>> > data)
>> > at
>> > Microsoft.ReportingServices.Diagnostics.RSConfiguration.DecryptCatalogData(String
>> > encryptedData, String element)
>> > -- End of inner exception stack trace --
>> > ReportingServicesService!servicecontroller!11f0!12/16/2004-14:46:03:: e
>> > ERROR: Exception caught starting RPC server:
>> > Microsoft.ReportingServices.Diagnostics.Utilities.FailedToDecryptConfigInformationException:
>> > The encrypted value for configuration setting Dsn cannot be
>> > decrypted. -->
>> > Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
>> > An internal error occurred on the report server. See the error log for
>> > more
>> > details.
>> > at
>> > Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.UnprotectData(Byte[]
>> > data, Int32 dwFlags)
>> > at
>> > Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.LocalUnprotectData(Byte[]
>> > data)
>> > at
>> > Microsoft.ReportingServices.Diagnostics.DataProtectionLocal.LocalUnprotectData(String
>> > data)
>> > at
>> > Microsoft.ReportingServices.Diagnostics.RSConfiguration.DecryptCatalogData(String
>> > encryptedData, String element)
>> > -- End of inner exception stack trace --
>> > at
>> > Microsoft.ReportingServices.Diagnostics.RSConfiguration.DecryptCatalogData(String
>> > encryptedData, String element)
>> > at
>> > Microsoft.ReportingServices.Diagnostics.RSConfiguration.get_ConnectionString()
>> > at
>> > Microsoft.ReportingServices.Library.ServiceAppDomainController.StartRPCServer()
>> > ReportingServicesService!configmanager!11f0!12/16/2004-14:46:03:: Error
>> > occured with a config file change. New config file will not be used.
>> > Error:
>> > The encrypted value for configuration setting Dsn cannot be decrypted.
>> > ReportingServicesService!servicecontroller!efc!12/16/2004-15:08:30:: i
>> > INFO:
>> > RPC Server stopped
>> > ReportingServicesService!servicecontroller!efc!12/16/2004-15:08:31::
>> > Service
>> > shutting down.
>>

Sunday, March 11, 2012

Custom Procedure Replication Error with Oracle Subscriber

The custom procedure was created successfully on Oracle.
The following is the error message that is recieved. What is really odd is
why SQL Server is sending a select of a stored procedure name? Any ideas
as to what is going on here?
SQL> select * from sp_upd_crms_repl where 0 = 1;
select * from sp_upd_crms_repl where 0 = 1
*
ERROR at line 1:
ORA-04044: procedure, function, package, or type is not allowed here
Oracle publishers only replicate tables. It looks like here Oracle is
treating the stored procedure as a table, and is trying to return all the
data as opposed to only the columns (where 1=1).
Oracle publications do add the following objects on the Oracle server:
http://msdn2.microsoft.com/en-us/library/ms152557.aspx
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Michael Meyer" <michael_meyer@.csgsystems.com> wrote in message
news:uoQ%232bjwHHA.4800@.TK2MSFTNGP05.phx.gbl...
> The custom procedure was created successfully on Oracle.
> The following is the error message that is recieved. What is really odd
> is why SQL Server is sending a select of a stored procedure name? Any
> ideas as to what is going on here?
> SQL> select * from sp_upd_crms_repl where 0 = 1;
> select * from sp_upd_crms_repl where 0 = 1
> *
> ERROR at line 1:
> ORA-04044: procedure, function, package, or type is not allowed here
>
>
|||The Oracle side is actually the subscriber. It does appear that it is
treating this as a table instead of a stored procedure. I can't see
anything wrong with the article. The article has the insert and update
commands defined as CALL stored procedures and the actual command names are
the correct stored procedure names.
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:uIyD82kwHHA.600@.TK2MSFTNGP05.phx.gbl...
> Oracle publishers only replicate tables. It looks like here Oracle is
> treating the stored procedure as a table, and is trying to return all the
> data as opposed to only the columns (where 1=1).
> Oracle publications do add the following objects on the Oracle server:
> http://msdn2.microsoft.com/en-us/library/ms152557.aspx
>
> --
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Michael Meyer" <michael_meyer@.csgsystems.com> wrote in message
> news:uoQ%232bjwHHA.4800@.TK2MSFTNGP05.phx.gbl...
>
|||Configure the publication to use SQL Statements instead of the stored
procedures. In the Publication Properties, Articles tab, Select the
properties of the article and Insert, Update and delete deliver formats
select insert statements.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Michael Meyer" <michael_meyer@.csgsystems.com> wrote in message
news:OSxakFlwHHA.484@.TK2MSFTNGP06.phx.gbl...
> The Oracle side is actually the subscriber. It does appear that it is
> treating this as a table instead of a stored procedure. I can't see
> anything wrong with the article. The article has the insert and update
> commands defined as CALL stored procedures and the actual command names
> are the correct stored procedure names.
>
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:uIyD82kwHHA.600@.TK2MSFTNGP05.phx.gbl...
>
|||The reason we were drawn to the custom procedure is that we have long column
names > 30 characters in SQL Server and Oracle can only handle up to 30.
We are trying to handle the mapping in the custom stored procedure in Oracle
since there is no way to do this in SQL Server that we could come up with.
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:O$MTbRmwHHA.4076@.TK2MSFTNGP06.phx.gbl...
> Configure the publication to use SQL Statements instead of the stored
> procedures. In the Publication Properties, Articles tab, Select the
> properties of the article and Insert, Update and delete deliver formats
> select insert statements.
> --
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Michael Meyer" <michael_meyer@.csgsystems.com> wrote in message
> news:OSxakFlwHHA.484@.TK2MSFTNGP06.phx.gbl...
>

custom plugin error: how to pass information to Mining Model Viewer?

Good morning,

Well... As I said in other topics, I'm doing a clustering plugin for text mining. I'm facing many problems and, with your help, solving them one by one.

First of all, thanks a lot again.

Well... I've made a clustering function that is actually working very well. But I'm exporting its results to a log file I use as an algorithm trace for debugging.

My clustering method returns a vector containing information of what cluster each register belongs. For instance:

vector[0] = 1 -> The register of index 0 belongs to cluster 1.

vector[1] = 9 -> The register of index 1 belongs to cluster 9.

vector[2] = 2 -> The register of index 2 belongs to cluster 2.

...

And so on.

But... I know that none of the Navigation methods receives a structure like this one discribed above. I only use it to log the results to debug the algorithm.

But how to pass this information (what register (or test case) belongs to what cluster) to the Navigation ?

Thanks a lot again, and any help will be very appreciated.

Actually, you can use the GetNodeDistribution method of the navigator, then use the ATTRIBUTE_NAME and ATTRIBUTE_VALUE properties of a distribution row to present, say, the register index and the cluster. Effectively, NODE_DISTRIBUTION is a table inside a content node.

The tutorial for managed plug-in algorithms (as well as the sample) detail how to add custom rows to a NODE_DISTRIBUTION (nodes that are not attribute/value pairs). The information is useful even if you use the C++ infrastructure

Custom Paging on Stored Procedure

Hello,

I receive this error "Incorrect syntax near 'GetGalleryPaged'." I'm trying to use custom paging on a stored procedure.

......
Dim mySqlConn As New SqlConnection(ConnStr)
Dim objDA As New SqlDataAdapter("GetGalleryPaged", mySqlConn)
objDA.SelectCommand.Parameters.Add("@.startRowIndex", SqlDbType.Int, 1)
objDA.SelectCommand.Parameters.Add("@.@.maximumRows", SqlDbType.Int, 9)
Dim objDS As New DataSet()
Dim objPds As PagedDataSource = New PagedDataSource
objDA.Fill(objDS, "Gallery") <<--error here
mySqlConn.Close()

objPds.DataSource = objDS.Tables(0).DefaultView
objPds.AllowPaging = True

......

ALTER PROCEDURE dbo.GetGalleryPaged
(
@.startRowIndex int,
@.maximumRows int
)
AS
SELECT idgallery, g_picpath
FROM
( SELECT idgallery, g_picpath, ROW_NUMBER() OVER (ORDER BY idgallery DESC) AS RowRank
FROM Gallery
) AS GalleryWithRowNumber
WHERE RowRank > @.startRowIndex AND RowRank <= (@.startRowIndex + @.maximumRows)
ORDER BY idgallery DESC

cheers,

imperialx

First problem is here

@.@.maximumRows in following line
objDA.SelectCommand.Parameters.Add("@.@.maximumRows", SqlDbType.Int, 9)

and second is you are adding parameter but not setting their value, try this

objDA.SelectCommand.Parameters.Add("@.startRowIndex", SqlDbType.Int)
objDA.SelectCommand.Parameters("@.startRowIndex").Value = 1

objDA.SelectCommand.Parameters.Add("@.maximumRows", SqlDbType.Int)
objDA.SelectCommand.Parameters("@.maximumRows").Value = 9

|||

Hi Vish4forum,

I still got the same errorSad.

...
Dim mySqlConn As New SqlConnection(ConnStr)
Dim objDA As New SqlDataAdapter("GetGalleryPaged", mySqlConn)

objDA.SelectCommand.Parameters.Add("@.startRowIndex", SqlDbType.Int)
objDA.SelectCommand.Parameters("@.startRowIndex").Value = 1

objDA.SelectCommand.Parameters.Add("@.maximumRows", SqlDbType.Int)
objDA.SelectCommand.Parameters("@.maximumRows").Value = 9

Dim objDS As New DataSet()
Dim objPds As PagedDataSource = New PagedDataSource
objDA.Fill(objDS, "Gallery")
mySqlConn.Close()

objPds.DataSource = objDS.Tables(0).DefaultView
objPds.AllowPaging = True
...

|||

Hi Vish4forum,

I got it, I add this line Smile

...
Dim mySqlConn As New SqlConnection(ConnStr)
Dim objDA As New SqlDataAdapter("GetGalleryPaged", mySqlConn)
objDA.SelectCommand.CommandType = CommandType.StoredProcedure


objDA.SelectCommand.Parameters.Add("@.startRowIndex", SqlDbType.Int)
objDA.SelectCommand.Parameters("@.startRowIndex").Value = 1

objDA.SelectCommand.Parameters.Add("@.maximumRows", SqlDbType.Int)
objDA.SelectCommand.Parameters("@.maximumRows").Value = 9

Dim objDS As New DataSet()
Dim objPds As PagedDataSource = New PagedDataSource
objDA.Fill(objDS, "Gallery")
mySqlConn.Close()

objPds.DataSource = objDS.Tables(0).DefaultView
objPds.AllowPaging = True
...


One thing is, have I set the stored procedure for a custom paging right?

|||

Hi Guys,

If I use the stored procedure that uses custom paging, the paging link controls doesn't work as intended (visible property is always set to false)Sad

ALTER PROCEDURE dbo.GetGalleryPaged
(
@.startRowIndex int,
@.maximumRows int
)
AS
SELECT idgallery, g_picpath
FROM
( SELECT idgallery, g_picpath, ROW_NUMBER() OVER (ORDER BY idgallery DESC) AS RowRank
FROM Gallery
) AS GalleryWithRowNumber
WHERE RowRank > @.startRowIndex AND RowRank <= (@.startRowIndex + @.maximumRows)
ORDER BY idgallery DESC

....

Imports DataSet1TableAdapters
Imports System.Data.SqlClient
Imports System.Data

Partial Class gallery
Inherits System.Web.UI.Page
Dim TotalRowCount As Integer
Dim isLastPage As Boolean

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
DataGalleryList()
End If
End Sub

Protected Sub DataGalleryList()
Dim cs As ClientScriptManager = Page.ClientScript 'just to initialize Ajax ScriptManager
Dim ConnStr = System.Configuration.ConfigurationManager.ConnectionStrings("smsdataConnectionString1").ConnectionString
Dim mySqlConn As New SqlConnection(ConnStr)
Dim objPds As PagedDataSource = New PagedDataSource
Dim objDA As New SqlDataAdapter("GetGalleryPaged", mySqlConn)
objDA.SelectCommand.CommandType = CommandType.StoredProcedure

If isLastPage Then
CurrentPage = objPds.PageCount - 1
objPds.CurrentPageIndex = objPds.PageCount - 1
Else
objPds.CurrentPageIndex = CurrentPage
End If

objDA.SelectCommand.Parameters.Add("@.startRowIndex", SqlDbType.Int)
objDA.SelectCommand.Parameters("@.startRowIndex").Value = objPds.CurrentPageIndex
objDA.SelectCommand.Parameters.Add("@.maximumRows", SqlDbType.Int)
objDA.SelectCommand.Parameters("@.maximumRows").Value = 9

Dim objDS As New DataSet()
objDA.Fill(objDS, "Gallery")
mySqlConn.Close()

objPds.DataSource = objDS.Tables(0).DefaultView
objPds.AllowPaging = True
''''''objPds.PageSize = 9

Dim gallery As New DataSet1TableAdapters.galleryTableAdapter
Dim galleryGetPaged As DataSet1.galleryDataTable = gallery.GetDataGallery
TotalRowCount = gallery.TotalNumGallery

lblTotalImage.Text = ("Total Image: " + TotalRowCount.ToString)
lblTotalImage_dview.Text = ("Total Image: " + TotalRowCount.ToString)
lblCurrentPage.Text = ("Page: " + ((CurrentPage + 1).ToString + (" of " + objPds.PageCount.ToString)))

PrevPage.Visible = Not objPds.IsFirstPage
NextPage.Visible = Not objPds.IsLastPage
FirstPage.Visible = Not objPds.IsFirstPage
LastPage.Visible = Not objPds.IsLastPage

DataList1.DataSource = objPds
DataList1.DataBind()

ViewState("currentItemIndex") = currentItemIndex
End Sub

Protected Sub FirstPage_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles FirstPage.Click
CurrentPage = 0
DataGalleryList()
End Sub
Protected Sub PrevPage_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles PrevPage.Click
CurrentPage -= 1
DataGalleryList()
End Sub
Protected Sub NextPage_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles NextPage.Click
CurrentPage += 1
DataGalleryList()
End Sub
Protected Sub LastPage_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles LastPage.Click
isLastPage = True
DataGalleryList()
End Sub
Public Property CurrentPage() As Integer
Get
Dim o As Object = ViewState("_CurrentPage")
If (o = Nothing) Then
Return 0
End If
Return CType(o, Integer)
End Get
Set(ByVal value As Integer)
ViewState("_CurrentPage") = value
End Set
End Property

...

<DIV class="totalimage">
<asp:Label id="lblTotalImage" runat="server" CssClass="tot_img"></asp:Label>
<asp:Label id="lblCurrentPage" runat="server" CssClass="crntpnum" Text="Label"></asp:Label>
</DIV>
<BR /><BR />
<DIV style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FLOAT: left; PADDING-BOTTOM: 0px; MARGIN: 0px 0px 0px 25px; WIDTH: 500px; PADDING-TOP: 0px; TEXT-ALIGN: center">
<asp:DataList id="DataList1" runat="server" Width="480px" HorizontalAlign="Center" RepeatDirection="Horizontal" RepeatColumns="3" DataKeyField="idGallery">
<ItemTemplate>
<asp:ImageButton CommandName="Select" CssClass="g_thumbs" ImageUrl='<%#Eval("g_picpath") %>' ID="ImageButton2" runat="server" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" Wrap="True" />
</asp:DataList>
</DIV>
<DIV style="WIDTH: 347px" class="g_paginglink">
<UL>
<LI><asp:LinkButton id="FirstPage" runat="server">First</asp:LinkButton></LI>
<LI><asp:LinkButton id="PrevPage" runat="server">Previous</asp:LinkButton></LI>
<LI><asp:LinkButton id="NextPage" runat="server">Next</asp:LinkButton></LI>
<LI><asp:LinkButton id="LastPage" runat="server">Last</asp:LinkButton></LI>
</UL>
</DIV>


|||

Hello,

I got it nowBig Smile.

The Stored Procedure parameter values must be called first before the PagedDataSource values.


Protected Sub DataGalleryList()
Dim cs As ClientScriptManager = Page.ClientScript 'just to initialize Ajax ScriptManager
Dim ConnStr = System.Configuration.ConfigurationManager.ConnectionStrings("smsdataConnectionString1").ConnectionString
Dim mySqlConn As New SqlConnection(ConnStr)
Dim objPds As PagedDataSource = New PagedDataSource
Dim objDA As New SqlDataAdapter("GetGalleryPaged", mySqlConn)
Dim objDS As New DataSet()
Dim gallery As New DataSet1TableAdapters.galleryTableAdapter
Dim galleryGetPaged As DataSet1.galleryDataTable = gallery.GetDataGallery
TotalRowCount = gallery.TotalNumGallery

objDA.SelectCommand.CommandType = CommandType.StoredProcedure
objDA.SelectCommand.Parameters.Add("@.startRowIndex", SqlDbType.Int)
objDA.SelectCommand.Parameters("@.startRowIndex").Value = objPds.CurrentPageIndex
objDA.SelectCommand.Parameters.Add("@.maximumRows", SqlDbType.Int)
objDA.SelectCommand.Parameters("@.maximumRows").Value = TotalRowCount

objDA.Fill(objDS, "Gallery")
mySqlConn.Close()

objPds.DataSource = objDS.Tables(0).DefaultView
objPds.AllowPaging = True
objPds.PageSize = 9

If isLastPage Then
CurrentPage = objPds.PageCount - 1
objPds.CurrentPageIndex = CurrentPage
Else
objPds.CurrentPageIndex = CurrentPage
End If

currentItemIndex = objPds.FirstIndexInPage 'indexing datailview control

lblTotalImage.Text = ("Total Image: " + TotalRowCount.ToString)
lblTotalImage_dview.Text = ("Total Image: " + TotalRowCount.ToString)
lblCurrentPage.Text = ("Page: " + ((CurrentPage + 1).ToString + (" of " + objPds.PageCount.ToString)))

PrevPage.Visible = Not objPds.IsFirstPage
NextPage.Visible = Not objPds.IsLastPage
FirstPage.Visible = Not objPds.IsFirstPage
LastPage.Visible = Not objPds.IsLastPage

DataList1.DataSource = objPds
DataList1.DataBind()

ViewState("currentItemIndex") = currentItemIndex
End Sub



Thursday, March 8, 2012

Custom labels for DTS steps

Hi,
we have DTS packages which call other DTS packages, sometimes a few levels
deep.
In our error logs out DTS steps are labelled like
"DTSStep_DTSExecutePackageTask_4"
Is there a way to give our DTS steps custom labels so that it'll be easier
to work out which dts and which step has failed?
Server 2K
ThanksYes you can, and should do this...
Open your package and right click in the white space, go to Disconnected
Edit... There you can change the names of the Tasks and Steps... Be careful
tho,,, Change the Task name, then you have to go to the step which calls the
task, and change the taskname there to match... While there, you can also
change the Step name...
Save a copy before messing with this... It's easy to mess up..
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"Joe Gass" wrote:

> Hi,
> we have DTS packages which call other DTS packages, sometimes a few levels
> deep.
> In our error logs out DTS steps are labelled like
> "DTSStep_DTSExecutePackageTask_4"
> Is there a way to give our DTS steps custom labels so that it'll be easier
> to work out which dts and which step has failed?
> Server 2K
> Thanks
>
>|||well I had no idea that was there.
Many thanks for you help.
Cheers
Joe
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:324ED758-4CC5-4DB1-A01A-D041548013CD@.microsoft.com...
> Yes you can, and should do this...
> Open your package and right click in the white space, go to Disconnected
> Edit... There you can change the names of the Tasks and Steps... Be
> careful
> tho,,, Change the Task name, then you have to go to the step which calls
> the
> task, and change the taskname there to match... While there, you can also
> change the Step name...
> Save a copy before messing with this... It's easy to mess up..
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> I support the Professional Association for SQL Server ( PASS) and it''s
> community of SQL Professionals.
>
> "Joe Gass" wrote:
>|||Use "Disconnected Edit" and name your steps...

Wednesday, March 7, 2012

Custom Error Pages

Hi,
I have created an asp.net application in which I use the report viewer
control to display my report. My problem is that if the report server
displays an error message then I want to trap that error and display my own
custom error page my company logo with the error message,
Is it possible to do this using Reporting Services ? I am not using the
render method but url access because I have the report viewer control on my
page
ThanksWhat you are trying to perform is not supported in RS 2000.
The RS Winforms/Webforms control available in Visual Studio 2005 will enable
handling certain error conditions in your application code.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"HelpSal" <HelpSal@.discussions.microsoft.com> wrote in message
news:477C457E-7407-480D-9F1C-7F9B9A18CBDB@.microsoft.com...
> Hi,
> I have created an asp.net application in which I use the report viewer
> control to display my report. My problem is that if the report server
> displays an error message then I want to trap that error and display my
> own
> custom error page my company logo with the error message,
> Is it possible to do this using Reporting Services ? I am not using the
> render method but url access because I have the report viewer control on
> my
> page
>
> Thanks

custom error page

Hello,
Is there a a way to catch general errors on ssrs and display a custom error page to the user?

The goal is that if a user try to access a report when the ssrs is down, He won't see the RS general error but a custom notice from me.

Thanks.

If you are using report manager (which is an ASP.NET web application), I guess you can do that by configuring your custom error page in web.config file available in Program Files\Microsoft SQL Server\MSSQL.X\Reporting Services\ReportManager folder. Set mode="on" for customErrors tag and define the custom error page as you do for any other ASP.NET web application.

Shyam

|||

More details on how to use custom error pages in a web application:

You can use defaultRedirect attribute of customErrors tag to tell the application to go to another custom web page by default if any error occurs. Also you can define error pages for specific types of errors like 401, 402 etc. and add them as error tags inside this customErrors tag. En example would look like this:

<customErrors mode="on" defaultRedirect="/error.html">
<error statusCode="403" redirect="/accessdenied.html" />
<error statusCode="404" redirect="/pagenotfound.html" />
</customErrors>

where error.html, accessdenied.html and pagenotfound.html are the files that you create and place in the appropriate folder on report manager virtual directory.

Shyam

|||Hi Sundar,

Thats exctly what I did after I read your previus post Smile

Hope it will work fine. I now have to do some tasting.

Thanks for the solution!

custom error page

Hello,
Is there a a way to catch general errors on ssrs and display a custom
error page to the user?
The goal is that if a user try to access a report when the ssrs is
down, He won't see the RS general error but a custom notice from me.
Thanks.Absolutely possible as we have it implemented.
Absolutely no idea how it was achieved as I'm not a developer :(
Sorry
"nicknack" <roezohar@.gmail.com> wrote in message
news:1174999816.602638.279850@.y80g2000hsf.googlegroups.com...
> Hello,
> Is there a a way to catch general errors on ssrs and display a custom
> error page to the user?
> The goal is that if a user try to access a report when the ssrs is
> down, He won't see the RS general error but a custom notice from me.
> Thanks.
>

Custom error msg breaks my error handler

Hi,

I added this line of code to my error handler script, in red.

User:Tongue TiedcriptError is a package-level string variable

User:Tongue TiedcriptError has a value assigned to it when another script encounters an error condition (which I define)

I added "User:Tongue TiedcriptError" as a read-only variable to the error handler script task.

Public Sub Main()

Dim messages As Collections.ArrayList

Try

messages = CType(Dts.Variables("errorMessages").Value, Collections.ArrayList)

Catch ex As Exception

messages = New Collections.ArrayList()

End Try

messages.Add(Dts.Variables("SourceName").Value.ToString)

messages.Add(Dts.Variables("ErrorDescription").Value.ToString())

messages.Add(Dts.Variables("scriptError").Value.ToString)

Dts.Variables("errorMessages").Value = messages

Dts.TaskResult = Dts.Results.Success

End Sub

Now, when I run the package, and an it encounters an error, it task just hangs, that is, it stays yellow instead of turning red... if I remove the line in red above, it works ok again.

Why would this line cause a problem?

Thanks

Make sure you are unlocking the scriptError variable in the first task. It might help if you post the script from that task.|||

Hi,

What do you mean by "unlocking the scriptError variable"?

Thanks

|||Dts.Variables.Unlock()|||

I will try that. Why is unlocking necessary? I've never run into this before.

Thanks

|||If the first task is raising an error, the error handling task can be fired before the variable is unlocked in the first task. Make sure that you unlock it in the error handler in the first script.|||

This is the part of my code that seems to be causing the problem. I am trying to set the "scriptError" variable to the error message below. As you can see, I am setting the Dts.TaskResult to "failure" BEFORE assigning the value to my variable. The "failure" causes execution to go to my Error Handler script task. That's where it hangs.

Perhaps I should put the the "failure" AFTER the variable assignment.

I don't understand all this "unlocking" stuff quite yet. What do you mean by "unlock it in the error handler"? Perhaps that doesn't apply here, I don't know.

Thanks

Else

Dts.TaskResult = Dts.Results.Failure

Dts.Variables("scriptError").Value = "The extracts in " & CStr(Dts.Variables("Folder").Value) & " are not current! Data NOT loaded."

End If

|||Adding

Dts.Variables.Unlock()

right after the variable is written to (but not before) works!

Custom error msg breaks my error handler

Hi,

I added this line of code to my error handler script, in red.

User:Tongue TiedcriptError is a package-level string variable

User:Tongue TiedcriptError has a value assigned to it when another script encounters an error condition (which I define)

I added "User:Tongue TiedcriptError" as a read-only variable to the error handler script task.

Public Sub Main()

Dim messages As Collections.ArrayList

Try

messages = CType(Dts.Variables("errorMessages").Value, Collections.ArrayList)

Catch ex As Exception

messages = New Collections.ArrayList()

End Try

messages.Add(Dts.Variables("SourceName").Value.ToString)

messages.Add(Dts.Variables("ErrorDescription").Value.ToString())

messages.Add(Dts.Variables("scriptError").Value.ToString)

Dts.Variables("errorMessages").Value = messages

Dts.TaskResult = Dts.Results.Success

End Sub

Now, when I run the package, and an it encounters an error, it task just hangs, that is, it stays yellow instead of turning red... if I remove the line in red above, it works ok again.

Why would this line cause a problem?

Thanks

Make sure you are unlocking the scriptError variable in the first task. It might help if you post the script from that task.|||

Hi,

What do you mean by "unlocking the scriptError variable"?

Thanks

|||Dts.Variables.Unlock()|||

I will try that. Why is unlocking necessary? I've never run into this before.

Thanks

|||If the first task is raising an error, the error handling task can be fired before the variable is unlocked in the first task. Make sure that you unlock it in the error handler in the first script.|||

This is the part of my code that seems to be causing the problem. I am trying to set the "scriptError" variable to the error message below. As you can see, I am setting the Dts.TaskResult to "failure" BEFORE assigning the value to my variable. The "failure" causes execution to go to my Error Handler script task. That's where it hangs.

Perhaps I should put the the "failure" AFTER the variable assignment.

I don't understand all this "unlocking" stuff quite yet. What do you mean by "unlock it in the error handler"? Perhaps that doesn't apply here, I don't know.

Thanks

Else

Dts.TaskResult = Dts.Results.Failure

Dts.Variables("scriptError").Value = "The extracts in " & CStr(Dts.Variables("Folder").Value) & " are not current! Data NOT loaded."

End If

|||Adding

Dts.Variables.Unlock()

right after the variable is written to (but not before) works!

Custom error msg breaks my error handler

Hi,

I added this line of code to my error handler script, in red.

User:Tongue TiedcriptError is a package-level string variable

User:Tongue TiedcriptError has a value assigned to it when another script encounters an error condition (which I define)

I added "User:Tongue TiedcriptError" as a read-only variable to the error handler script task.

Public Sub Main()

Dim messages As Collections.ArrayList

Try

messages = CType(Dts.Variables("errorMessages").Value, Collections.ArrayList)

Catch ex As Exception

messages = New Collections.ArrayList()

End Try

messages.Add(Dts.Variables("SourceName").Value.ToString)

messages.Add(Dts.Variables("ErrorDescription").Value.ToString())

messages.Add(Dts.Variables("scriptError").Value.ToString)

Dts.Variables("errorMessages").Value = messages

Dts.TaskResult = Dts.Results.Success

End Sub

Now, when I run the package, and an it encounters an error, it task just hangs, that is, it stays yellow instead of turning red... if I remove the line in red above, it works ok again.

Why would this line cause a problem?

Thanks

Make sure you are unlocking the scriptError variable in the first task. It might help if you post the script from that task.|||

Hi,

What do you mean by "unlocking the scriptError variable"?

Thanks

|||Dts.Variables.Unlock()|||

I will try that. Why is unlocking necessary? I've never run into this before.

Thanks

|||If the first task is raising an error, the error handling task can be fired before the variable is unlocked in the first task. Make sure that you unlock it in the error handler in the first script.|||

This is the part of my code that seems to be causing the problem. I am trying to set the "scriptError" variable to the error message below. As you can see, I am setting the Dts.TaskResult to "failure" BEFORE assigning the value to my variable. The "failure" causes execution to go to my Error Handler script task. That's where it hangs.

Perhaps I should put the the "failure" AFTER the variable assignment.

I don't understand all this "unlocking" stuff quite yet. What do you mean by "unlock it in the error handler"? Perhaps that doesn't apply here, I don't know.

Thanks

Else

Dts.TaskResult = Dts.Results.Failure

Dts.Variables("scriptError").Value = "The extracts in " & CStr(Dts.Variables("Folder").Value) & " are not current! Data NOT loaded."

End If

|||Adding

Dts.Variables.Unlock()

right after the variable is written to (but not before) works!

Custom Error Messages

My understanding is that in a stored procedure (or any code for that
matter) if an error occurs you can detect it by checking @.@.error
variable and raise your own error with raiserror statement.

The problem is that the original error is not suppressed. For example
I received the following output from a stored procedure from the same
error:

Server: Msg 547, Level 16, State 1, Procedure spUpdateSecurityMaster,
Line 49
INSERT statement conflicted with COLUMN FOREIGN KEY constraint
'FK_SM_mm_Exchange_Exchanges'. The conflict occurred in database
'Trading', table 'Exchanges', column 'IsoCode'.
Server: Msg 50000, Level 14, State 1, Procedure
spUpdateSecurityMaster, Line 57
Unable to insert into "SM_mm_Exchange" table
The statement has been terminated.

So why should we bother to use raiseerror if the orginal error is
going to be given to the client anyways? The end result is two error
messages.On 1 Oct 2003 06:41:42 -0700, JayCallas@.hotmail.com (Jason) wrote:

>My understanding is that in a stored procedure (or any code for that
>matter) if an error occurs you can detect it by checking @.@.error
>variable and raise your own error with raiserror statement.
>The problem is that the original error is not suppressed. For example
>I received the following output from a stored procedure from the same
>error:
>Server: Msg 547, Level 16, State 1, Procedure spUpdateSecurityMaster,
>Line 49
>INSERT statement conflicted with COLUMN FOREIGN KEY constraint
>'FK_SM_mm_Exchange_Exchanges'. The conflict occurred in database
>'Trading', table 'Exchanges', column 'IsoCode'.
>Server: Msg 50000, Level 14, State 1, Procedure
>spUpdateSecurityMaster, Line 57
>Unable to insert into "SM_mm_Exchange" table
>The statement has been terminated.
>So why should we bother to use raiseerror if the orginal error is
>going to be given to the client anyways? The end result is two error
>messages.
The reason is that SQL Server will not allow you to trap errors of a
certain severity.

If the error was less severe then what you want to happen will work.|||Jason (JayCallas@.hotmail.com) writes:
> My understanding is that in a stored procedure (or any code for that
> matter) if an error occurs you can detect it by checking @.@.error
> variable and raise your own error with raiserror statement.
> The problem is that the original error is not suppressed. For example
> I received the following output from a stored procedure from the same
> error:
> Server: Msg 547, Level 16, State 1, Procedure spUpdateSecurityMaster,
> Line 49
> INSERT statement conflicted with COLUMN FOREIGN KEY constraint
> 'FK_SM_mm_Exchange_Exchanges'. The conflict occurred in database
> 'Trading', table 'Exchanges', column 'IsoCode'.
> Server: Msg 50000, Level 14, State 1, Procedure
> spUpdateSecurityMaster, Line 57
> Unable to insert into "SM_mm_Exchange" table
> The statement has been terminated.
> So why should we bother to use raiseerror if the orginal error is
> going to be given to the client anyways? The end result is two error
> messages.

It's actually even three. That last "The statement has been terminated"
is a separate message.

No, there is not much with a RAISERROR here. But there might be
occasions where RAISERROR is your sole choice. Say that you have a
procedure that has an parameter that controls the logic, and it
have have the values A, B and C. You procedure would look like:

IF @.action = 'A'
BEGIN
...
END
ELSE IF @.action = 'B'
BEGIN
...
END
ELSE IF @.action = 'C'
BEGIN
...
END
ELSE
BEGIN
RAISERROR ('Illegal action "%s" passed!', 16, 1, @.action)
RETURN 1
END

And, no there is no way to suppress the error message from SQL. You
need a client to do that.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Erland Sommarskog <sommar@.algonet.se> wrote in message news:<Xns9408F0145FFYazorman@.127.0.0.1>...
> It's actually even three. That last "The statement has been terminated"
> is a separate message.
> No, there is not much with a RAISERROR here. But there might be
> occasions where RAISERROR is your sole choice. Say that you have a
> procedure that has an parameter that controls the logic, and it
> have have the values A, B and C. You procedure would look like:
> IF @.action = 'A'
> BEGIN
> ...
> END
> ELSE IF @.action = 'B'
> BEGIN
> ...
> END
> ELSE IF @.action = 'C'
> BEGIN
> ...
> END
> ELSE
> BEGIN
> RAISERROR ('Illegal action "%s" passed!', 16, 1, @.action)
> RETURN 1
> END
> And, no there is no way to suppress the error message from SQL. You
> need a client to do that.

I figured that. So basically it makes no sense to use raiserror when a
database statement (delete, insert, update) is used since one will
already be thrown.|||Jason (JayCallas@.hotmail.com) writes:
> I figured that. So basically it makes no sense to use raiserror when a
> database statement (delete, insert, update) is used since one will
> already be thrown.

Yes, it would be fairly redundant. I guess there might be occassions
where it could make sense, for instance convey information about what
was going on, like "Error when adding account 98989". But as a matter
of routine, it would be pointless.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp