Showing posts with label run. Show all posts
Showing posts with label run. Show all posts

Monday, March 26, 2012

Number of transactions processed by a server?

Is there any way to get the number of transactions a server has
processed? I'd like to run that and then see how many transactions
where processed over the next 5 minutes. Is there a way to do that?
-JohnYou can start Profiler and profile the Commited Transactions, another
possibility would be he log Exlorer from Lumigent.
HTH, Jens Smeyer.
http://www.sqlserver2005.de
--
"John Baima" <john@.nospam.com> schrieb im Newsbeitrag
news:8t2261h1udi4tlqo3sbd1mr1thctg7dl66@.
4ax.com...
> Is there any way to get the number of transactions a server has
> processed? I'd like to run that and then see how many transactions
> where processed over the next 5 minutes. Is there a way to do that?
> -John|||There is a perfmon counter for Sql Server under each database for
transactions per second.
Andrew J. Kelly SQL MVP
"John Baima" <john@.nospam.com> wrote in message
news:8t2261h1udi4tlqo3sbd1mr1thctg7dl66@.
4ax.com...
> Is there any way to get the number of transactions a server has
> processed? I'd like to run that and then see how many transactions
> where processed over the next 5 minutes. Is there a way to do that?
> -John|||I'm not aware of a readily-available counter somewhere, but one option might
be to run a trace for the SQLTransaction event and filter on 'Begin' for the
EventSubClass. If you run the trace during the five-minute period, counting
the number of rows in the trace table at the end will give you the count of
transactions that occurred. In my tests, this count appears to be
equivalent to the counts returned by the Total Transactions/sec performance
counter.
Adam Machanic
SQL Server MVP
http://www.datamanipulation.net
--
"John Baima" <john@.nospam.com> wrote in message
news:8t2261h1udi4tlqo3sbd1mr1thctg7dl66@.
4ax.com...
> Is there any way to get the number of transactions a server has
> processed? I'd like to run that and then see how many transactions
> where processed over the next 5 minutes. Is there a way to do that?
> -John

number of times procedure executes per second

hello all,

i have run into this problems a few times and don't really have a quick solution.

management wants to know how many times a procedure will execute in a second. i only have one procedure in mind and all it does is do a few different select and then returns a record set. so i am looking for a tool which will report how many times my "return customer profile" procedure can run. I have a tool which will execute a single procedure on multiple threads, but it has no reporting. If I have something to execute the procedure how can I report back on it's performance?

In perfmon there is a "transaction per second" however this does not count selects. so it is always 0.

Is there any native sql 2000 2005 tool to do this?

Is there any inexpensive 3 party tool which people use?

thanks in advance.

In SQL 2005 if you run the SP then one of the standard reports in management studio should tell you how many times it has run. You know how long the test was and thus how many times the SP can run /s.

You can also look at the SQL Batches/sec in perfmon, this should give you the figure you are after as long as that is the only thing you will be doing on the server.

Friday, March 23, 2012

Number of Nodes and Instance on Windows 2003 Cluster

How many Ressource group or Virtual SQL server may I run on on Windows 2003
cluster node ?
How many nodes can I have for an SQL Cluster architecture ? Apparently Four
? May someone confirm this number ? and is it four active instances or 3
active/ 1 passive ?
What happend if I have four SQL resource group with a eight nodes Windows
2003 cluter ?
answers inline below...
Cheers,
Rod
MVP - Windows Server - Clustering
http://www.nw-america.com - Clustering
"Jean-Michel Remiche" <jmr@.visionitgroup.com> wrote in message
news:B59BD2B2-E7DF-4642-9613-78722FA27374@.microsoft.com...
> How many Ressource group or Virtual SQL server may I run on on Windows
> 2003
> cluster node ?
>
SQL supports a 4 node cluster on a 32-bit OS. Each SQL supports 16
instances. Given that you have monster machines and an A/A/A/A cluster you
could have 64 databases in the cluster.
I am not aware of a limit to resource groups in clustering. Files shares
have been limited in the past
(http://support.microsoft.com/default...NoWebContent=1)
but I have not seen anything on Groups.

> How many nodes can I have for an SQL Cluster architecture ?
Windows 2000 = 2
Windows 2003 32 bit = 4
Windows 2003 64 bit = 8

>Apparently Four
> ?
With the 32-bit OS, yes.
May someone confirm this number ?
I just did

>and is it four active instances or 3
> active/ 1 passive ?
>
You can do all 4 Active, though I would never do this.

> What happend if I have four SQL resource group with a eight nodes Windows
> 2003 cluter ?
SQL will only install on any 4, though I have not tested this.
Source of information:
http://www.microsoft.com/usa/webcasts/ondemand/1751.asp
|||Under Windows 2003 and SQL 2000 here are the rules.
Each cluster can have 8 host nodes.
Each cluster can have 16 instances. (Note that this is a Cluster-wide limit,
not a host node limit.
Each SQL instance can be installed on up to 4 nodes. (8 for 64-bit, it is an
installer limitation)
Each SQL Resource group = 1 instance.
Each SQL instance = 1 Resource group.
You can have non-SQL resource groups in the cluster, but it is generally a
bad idea except for the MSDTC resource group.
Forget you ever heard of 'active/active' or 'active/passive' or any
variation of those. Those terms referred to some technical limitations of
SQL 7.0 clustering and have no real meaning for SQL 2000 clustering.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
message news:%23ojM6JOkEHA.644@.tk2msftngp13.phx.gbl...
> answers inline below...
> Cheers,
> Rod
> MVP - Windows Server - Clustering
> http://www.nw-america.com - Clustering
> "Jean-Michel Remiche" <jmr@.visionitgroup.com> wrote in message
> news:B59BD2B2-E7DF-4642-9613-78722FA27374@.microsoft.com...
> SQL supports a 4 node cluster on a 32-bit OS. Each SQL supports 16
> instances. Given that you have monster machines and an A/A/A/A cluster you
> could have 64 databases in the cluster.
> I am not aware of a limit to resource groups in clustering. Files shares
> have been limited in the past
>
(http://support.microsoft.com/default...microsoft.com
:80/support/kb/articles/Q185/2/12.ASP&NoWebContent=1)[vbcol=seagreen]
> but I have not seen anything on Groups.
>
> Windows 2000 = 2
> Windows 2003 32 bit = 4
> Windows 2003 64 bit = 8
>
> With the 32-bit OS, yes.
> May someone confirm this number ?
> I just did
>
> You can do all 4 Active, though I would never do this.
Windows
> SQL will only install on any 4, though I have not tested this.
> Source of information:
> http://www.microsoft.com/usa/webcasts/ondemand/1751.asp
>
sql

Wednesday, March 21, 2012

Number Of Hits

Hey folks,
I want to run through a large C# application we built to ensure it is
properly optimized.
Is there a way I can tell in SQL server how many times it's been hit/queried
in the last 20 seconds? In other words, I want to load a form on the
application and ensure that there is a minimal number of queries called
(Stored Procedures or simple Select statements).
How would I find out how many times it was queried within a certain
timespan?
Thanks!
Try using the profiler - it can show all (well most) iteractions with
the database.
Nigel Rivett
www.nigelrivett.net
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||Perfect. Thx!
"Nigel Rivett" <sqlnr@.hotmail.com> wrote in message
news:ukP5V0e8EHA.3828@.TK2MSFTNGP09.phx.gbl...
> Try using the profiler - it can show all (well most) iteractions with
> the database.
> Nigel Rivett
> www.nigelrivett.net
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
|||Perfect. Thx!
"Nigel Rivett" <sqlnr@.hotmail.com> wrote in message
news:ukP5V0e8EHA.3828@.TK2MSFTNGP09.phx.gbl...
> Try using the profiler - it can show all (well most) iteractions with
> the database.
> Nigel Rivett
> www.nigelrivett.net
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!

Number Of Hits

Hey folks,
I want to run through a large C# application we built to ensure it is
properly optimized.
Is there a way I can tell in SQL server how many times it's been hit/queried
in the last 20 seconds? In other words, I want to load a form on the
application and ensure that there is a minimal number of queries called
(Stored Procedures or simple Select statements).
How would I find out how many times it was queried within a certain
timespan?
Thanks!Try using the profiler - it can show all (well most) iteractions with
the database.
Nigel Rivett
www.nigelrivett.net
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!|||Perfect. Thx!
"Nigel Rivett" <sqlnr@.hotmail.com> wrote in message
news:ukP5V0e8EHA.3828@.TK2MSFTNGP09.phx.gbl...
> Try using the profiler - it can show all (well most) iteractions with
> the database.
> Nigel Rivett
> www.nigelrivett.net
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!|||Perfect. Thx!
"Nigel Rivett" <sqlnr@.hotmail.com> wrote in message
news:ukP5V0e8EHA.3828@.TK2MSFTNGP09.phx.gbl...
> Try using the profiler - it can show all (well most) iteractions with
> the database.
> Nigel Rivett
> www.nigelrivett.net
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!sql

Number Of Hits

Hey folks,
I want to run through a large C# application we built to ensure it is
properly optimized.
Is there a way I can tell in SQL server how many times it's been hit/queried
in the last 20 seconds? In other words, I want to load a form on the
application and ensure that there is a minimal number of queries called
(Stored Procedures or simple Select statements).
How would I find out how many times it was queried within a certain
timespan?
Thanks!Try using the profiler - it can show all (well most) iteractions with
the database.
Nigel Rivett
www.nigelrivett.net
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||Perfect. Thx!
"Nigel Rivett" <sqlnr@.hotmail.com> wrote in message
news:ukP5V0e8EHA.3828@.TK2MSFTNGP09.phx.gbl...
> Try using the profiler - it can show all (well most) iteractions with
> the database.
> Nigel Rivett
> www.nigelrivett.net
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!|||Perfect. Thx!
"Nigel Rivett" <sqlnr@.hotmail.com> wrote in message
news:ukP5V0e8EHA.3828@.TK2MSFTNGP09.phx.gbl...
> Try using the profiler - it can show all (well most) iteractions with
> the database.
> Nigel Rivett
> www.nigelrivett.net
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

Monday, March 12, 2012

Number format do not work when exported to excel?

I have a report where I have formated the numbers with #.#. When I run this
repot this works well and give me the decimal only when it is needed.
However, when I export to excel, I get te decimal point even when it is not
needed. For example the when I have the whole number 100 it displays as 100.
in excel.
I could use the N1, but I do not want 100.0 to display either.
Any help would be appreciated.
p.s. I am using a matrix if that makes a difference. I have not noticed
this when exporting a table, although I don't know it doesn't happen.On Mar 22, 8:58 am, bugfish69 <bugfis...@.discussions.microsoft.com>
wrote:
> I have a report where I have formated the numbers with #.#. When I run this
> repot this works well and give me the decimal only when it is needed.
> However, when I export to excel, I get te decimal point even when it is not
> needed. For example the when I have the whole number 100 it displays as 100.
> in excel.
> I could use the N1, but I do not want 100.0 to display either.
> Any help would be appreciated.
> p.s. I am using a matrix if that makes a difference. I have not noticed
> this when exporting a table, although I don't know it doesn't happen.
It sounds like this is a defect in the export to Excel functionality.
Sorry I could not be of more assistance.
Regards,
Enrique Martinez
Sr. SQL Server Developer|||How about using a conditional formating expression to supress the trailing
zero:
=iif(Fields!.<FieldName>.Value - Fix(Fields!.<FieldName>.Value = 0, "#",
"#.0")
"EMartinez" wrote:
> On Mar 22, 8:58 am, bugfish69 <bugfis...@.discussions.microsoft.com>
> wrote:
> > I have a report where I have formated the numbers with #.#. When I run this
> > repot this works well and give me the decimal only when it is needed.
> > However, when I export to excel, I get te decimal point even when it is not
> > needed. For example the when I have the whole number 100 it displays as 100.
> > in excel.
> >
> > I could use the N1, but I do not want 100.0 to display either.
> >
> > Any help would be appreciated.
> >
> > p.s. I am using a matrix if that makes a difference. I have not noticed
> > this when exporting a table, although I don't know it doesn't happen.
> It sounds like this is a defect in the export to Excel functionality.
> Sorry I could not be of more assistance.
> Regards,
> Enrique Martinez
> Sr. SQL Server Developer
>|||Thanks for the tip. It solved the problem in this instance, however it does
get messy when the filed is a calculated field and not just a field name.
"Bruce Johnson [MSFT]" wrote:
> How about using a conditional formating expression to supress the trailing
> zero:
> =iif(Fields!.<FieldName>.Value - Fix(Fields!.<FieldName>.Value = 0, "#",
> "#.0")
>
> "EMartinez" wrote:
> > On Mar 22, 8:58 am, bugfish69 <bugfis...@.discussions.microsoft.com>
> > wrote:
> > > I have a report where I have formated the numbers with #.#. When I run this
> > > repot this works well and give me the decimal only when it is needed.
> > > However, when I export to excel, I get te decimal point even when it is not
> > > needed. For example the when I have the whole number 100 it displays as 100.
> > > in excel.
> > >
> > > I could use the N1, but I do not want 100.0 to display either.
> > >
> > > Any help would be appreciated.
> > >
> > > p.s. I am using a matrix if that makes a difference. I have not noticed
> > > this when exporting a table, although I don't know it doesn't happen.
> >
> > It sounds like this is a defect in the export to Excel functionality.
> > Sorry I could not be of more assistance.
> >
> > Regards,
> >
> > Enrique Martinez
> > Sr. SQL Server Developer
> >
> >

Friday, March 9, 2012

NullReferenceException when using data-driven subscription with custom data extension

Hello,
I am trying to set up a data-driven subscription, where the command
that returns the list of recipients is run against a custom data
provider extension. However, when I validate the query (on step 3 of
the wizard), I always get the error rsCannotPrepareQuery, with the
message "Object reference not set to an instance of an object." When I
step into the code, the exception is being thrown inside the following
stack trace:
Microsoft.ReportingServices.Library.SubscriptionManager.PrepareQuery()
Microsoft.ReportingServices.Library.RSService.PrepareQuery()
Microsoft.ReportingServices.WebServer.ReportingService.PrepareQuery()
System.Web.Services.Protocols.LogicalMethodInfo.Invoke()
...
The exception is thrown right after IDbConnection.Open() returns, which
is immediately before IDbConnection.CreateCommand() is called.
Everywhere else, my custom data provider extension works great. And it
doesn't matter what query or credentials I type it - the problem always
exists.
I am running MS RS 2000 SP1.
Thanks in advance.Which interfaces do you implement: RS.IDbConnection, etc or
System.Data.IDbConnection?
--
Alex Mineev
Software Design Engineer. Report expressions; Code Access Security; Xml;
SQE.
This posting is provided "AS IS" with no warranties, and confers no rights
<bigredgum1@.excite.com> wrote in message
news:1107886911.665093.180630@.c13g2000cwb.googlegroups.com...
> Hello,
> I am trying to set up a data-driven subscription, where the command
> that returns the list of recipients is run against a custom data
> provider extension. However, when I validate the query (on step 3 of
> the wizard), I always get the error rsCannotPrepareQuery, with the
> message "Object reference not set to an instance of an object." When I
> step into the code, the exception is being thrown inside the following
> stack trace:
> Microsoft.ReportingServices.Library.SubscriptionManager.PrepareQuery()
> Microsoft.ReportingServices.Library.RSService.PrepareQuery()
> Microsoft.ReportingServices.WebServer.ReportingService.PrepareQuery()
> System.Web.Services.Protocols.LogicalMethodInfo.Invoke()
> ...
> The exception is thrown right after IDbConnection.Open() returns, which
> is immediately before IDbConnection.CreateCommand() is called.
> Everywhere else, my custom data provider extension works great. And it
> doesn't matter what query or credentials I type it - the problem always
> exists.
> I am running MS RS 2000 SP1.
> Thanks in advance.
>|||My connection class implements
Microsoft.ReportingServices.DataProcessing.IDbConnection.
I am basically just using the code provided in the Microsoft article
"Using an ADO.NET DataSet as a Reporting Services Data Source."
Thanks for your help.|||I need more info. Could you please repro it once again and send me recent rs
logs?
thanks
--
Alex Mineev
Software Design Engineer. Report expressions; Code Access Security; Xml;
SQE.
This posting is provided "AS IS" with no warranties, and confers no rights
<bigredgum1@.excite.com> wrote in message
news:1108048910.737444.302770@.f14g2000cwb.googlegroups.com...
> My connection class implements
> Microsoft.ReportingServices.DataProcessing.IDbConnection.
> I am basically just using the code provided in the Microsoft article
> "Using an ADO.NET DataSet as a Reporting Services Data Source."
> Thanks for your help.
>|||Sure. To reproduce, follow these steps:
- Set up the custom data extension as described in the article "Using
an ADO.NET DataSet as a Reporting Services Data Source".
- Go to the Report Manager web site and view any report.
- Click on the Subscriptions tab.
- Click the New Data-driven Subscription button.
- On page 1, enter any description and delivery provider. Select
"Specify for this subscription only". Click Next.
- On page 2, select your custom data extension. Enter any connection
string. Select "Credentials stored securely in the report server" and
enter any user name and password. Click Next.
- On page 3, enter any text and click Validate. The error
rsCannotPrepareQuery and text "Object reference not set to an instance
of an object" is displayed.
(Incidentally, if you choose "Credentials are not required" on page 2,
then on page 3 when you attempt to validate your query, you will get
error rsInvalidDataSourceCredentialSetting. This appears to be another
bug or design mistake. If my custom data extension does not require
credentials (e.g. it obtains them from a configuration file), then
there is no reason I should have to enter them in the UI. This just
ends up being confusing for end users to enter meaningless
credentials.)
When I click the Validate button on step 3 of the data-driven
subscription wizard, the following is appended to the ReportServer log
(I cranked up logging to Verbose):
aspnet_wp!runningrequests!15c4!02/10/2005-14:42:53:: v VERBOSE: User
map'<Users><User><Name>Person
1</Name><Paths><Path>http://mymachine/ReportServer/reportservice.asmx</Path><NrReq>1</NrReq></Paths></User></Users>'
aspnet_wp!runningrequests!15c4!02/10/2005-14:42:53:: v VERBOSE:
SoapAction:
"http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/GetSystemProperties"
aspnet_wp!library!15c4!02/10/2005-14:42:53:: v VERBOSE: Call to
GetSystemProperties()
aspnet_wp!library!15c4!02/10/2005-14:42:53:: v VERBOSE: Call to
GetSystemProperties completed.
aspnet_wp!runningrequests!17fc!02/10/2005-14:45:07:: v VERBOSE: User
map'<Users><User><Name>Person
1</Name><Paths><Path>http://mymachine/ReportServer/reportservice.asmx</Path><NrReq>1</NrReq></Paths></User></Users>'
aspnet_wp!runningrequests!17fc!02/10/2005-14:45:07:: v VERBOSE:
SoapAction:
"http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/ListSecureMethods"
aspnet_wp!runningrequests!17fc!02/10/2005-14:45:07:: v VERBOSE: User
map'<Users><User><Name>Person
1</Name><Paths><Path>http://mymachine/ReportServer/reportservice.asmx</Path><NrReq>1</NrReq></Paths></User></Users>'
aspnet_wp!runningrequests!17fc!02/10/2005-14:45:07:: v VERBOSE:
SoapAction:
"http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/GetSystemPermissions"
aspnet_wp!library!17fc!02/10/2005-14:45:07:: i INFO: Call to
GetSystemPermissions
aspnet_wp!runningrequests!17fc!02/10/2005-14:45:07:: v VERBOSE: User
map'<Users><User><Name>Person
1</Name><Paths><Path>http://mymachine/ReportServer/reportservice.asmx</Path><NrReq>1</NrReq></Paths></User></Users>'
aspnet_wp!runningrequests!17fc!02/10/2005-14:45:07:: v VERBOSE:
SoapAction:
"http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/ListChildren"
aspnet_wp!library!17fc!02/10/2005-14:45:07:: v VERBOSE: Call to
ListChildren( '/', False )
aspnet_wp!library!17fc!02/10/2005-14:45:07:: v VERBOSE: Call to
ListChildren completed
aspnet_wp!runningrequests!17fc!02/10/2005-14:45:07:: v VERBOSE: User
map'<Users><User><Name>Person
1</Name><Paths><Path>http://mymachine/ReportServer/reportservice.asmx</Path><NrReq>1</NrReq></Paths></User></Users>'
aspnet_wp!runningrequests!17fc!02/10/2005-14:45:07:: v VERBOSE:
SoapAction:
"http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/ListExtensions"
aspnet_wp!library!17fc!02/10/2005-14:45:07:: v VERBOSE: Call to
ListProviders: type (Data).
aspnet_wp!library!17fc!02/10/2005-14:45:07:: v VERBOSE: Call to
ListProviders completed.
aspnet_wp!runningrequests!17fc!02/10/2005-14:45:07:: v VERBOSE: User
map'<Users><User><Name>Person
1</Name><Paths><Path>http://mymachine/ReportServer/reportservice.asmx</Path><NrReq>1</NrReq></Paths></User></Users>'
aspnet_wp!runningrequests!17fc!02/10/2005-14:45:07:: v VERBOSE:
SoapAction:
"http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/PrepareQuery"
aspnet_wp!library!17fc!02/10/2005-14:45:07:: v VERBOSE: Call to
PrepareQuery: dataSource
(<DataSource><DataSourceDefinition><Extension>My
DataSet</Extension><ConnectString>asdf</ConnectString><CredentialRetrieval>Store</CredentialRetrieval><WindowsCredentials>False</WindowsCredentials><ImpersonateUser>False</ImpersonateUser><UserName>user</UserName><Password>test</Password></DataSourceDefinition></DataSource>),
dataSet(<DataSet><Query><CommandType>Text</CommandType><CommandText>asdfasdf</CommandText></Query></DataSet>).
aspnet_wp!crypto!17fc!02/10/2005-14:45:07:: v VERBOSE: Starting crypto
operation DBProtectString
aspnet_wp!crypto!17fc!02/10/2005-14:45:07:: v VERBOSE: Completed crypto
operation DBProtectString
aspnet_wp!crypto!17fc!02/10/2005-14:45:07:: v VERBOSE: Starting crypto
operation DBProtectString
aspnet_wp!crypto!17fc!02/10/2005-14:45:07:: v VERBOSE: Completed crypto
operation DBProtectString
aspnet_wp!crypto!17fc!02/10/2005-14:45:07:: v VERBOSE: Starting crypto
operation DBProtectString
aspnet_wp!crypto!17fc!02/10/2005-14:45:07:: v VERBOSE: Completed crypto
operation DBProtectString
aspnet_wp!crypto!17fc!02/10/2005-14:45:07:: v VERBOSE: Starting crypto
operation DBUnProtectString
aspnet_wp!crypto!17fc!02/10/2005-14:45:07:: v VERBOSE: Completed crypto
operation DBUnProtectString
aspnet_wp!crypto!17fc!02/10/2005-14:45:07:: v VERBOSE: Starting crypto
operation DBUnProtectString
aspnet_wp!crypto!17fc!02/10/2005-14:45:07:: v VERBOSE: Completed crypto
operation DBUnProtectString
aspnet_wp!crypto!17fc!02/10/2005-14:45:07:: v VERBOSE: Starting crypto
operation DBUnProtectString
aspnet_wp!crypto!17fc!02/10/2005-14:45:07:: v VERBOSE: Completed crypto
operation DBUnProtectString
aspnet_wp!processing!17fc!02/10/2005-14:45:07:: v VERBOSE: A connection
object for the My DataSet data source has been created.
aspnet_wp!crypto!17fc!02/10/2005-14:45:07:: v VERBOSE: Starting crypto
operation DBUnProtectString
aspnet_wp!crypto!17fc!02/10/2005-14:45:07:: v VERBOSE: Completed crypto
operation DBUnProtectString
aspnet_wp!library!17fc!02/10/2005-14:45:07:: e ERROR: Throwing
Microsoft.ReportingServices.Diagnostics.Utilities.CannotPrepareQueryException:
The dataset cannot be generated. An error occurred while connecting to
a data source, or the query is not valid for the data source., ;
Info:
Microsoft.ReportingServices.Diagnostics.Utilities.CannotPrepareQueryException:
The dataset cannot be generated. An error occurred while connecting to
a data source, or the query is not valid for the data source. -->
System.NullReferenceException: Object reference not set to an instance
of an object.
at
Microsoft.ReportingServices.Library.SubscriptionManager.PrepareQuery(DataSource
dataSource, DataSetDefinition dataSet, Boolean& changed)
-- End of inner exception stack trace --
aspnet_wp!runningrequests!17fc!02/10/2005-14:45:07:: v VERBOSE: User
map'<Users><User><Name>Person
1</Name><Paths><Path>http://mymachine/ReportServer/reportservice.asmx</Path><NrReq>1</NrReq></Paths></User></Users>'
aspnet_wp!runningrequests!17fc!02/10/2005-14:45:07:: v VERBOSE:
SoapAction:
"http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/GetSystemProperties"
aspnet_wp!library!17fc!02/10/2005-14:45:07:: v VERBOSE: Call to
GetSystemProperties()
aspnet_wp!library!17fc!02/10/2005-14:45:07:: v VERBOSE: Call to
GetSystemProperties completed.
No changes are made to the ReportServerService or ReportServerWebApp
logs. No other errors are listed in any of these logs.
For reference, here is my connection class:
using System;
using System.Data;
using System.Configuration;
using System.Xml;
using Microsoft.ReportingServices.DataProcessing;
namespace My.Samples.DataSetProcessingExtension
{
public class DSXConnection
: Microsoft.ReportingServices.DataProcessing.IDbConnection
{
private string _connString;
private int _connTimeout = 15;
private ConnectionState _state = ConnectionState.Closed;
public DSXConnection() {}
public DSXConnection(string connString) { _connString = connString; }
public string ConnectionString { get { return _connString; } set {
_connString = value; } }
public int ConnectionTimeout { get { return _connTimeout; } }
public ConnectionState State { get { return _state; } }
public Microsoft.ReportingServices.DataProcessing.IDbTransaction
BeginTransaction()
{
return null;
}
public void Open()
{
_state = ConnectionState.Open;
}
public void Close()
{
this.Dispose();
_state = ConnectionState.Closed;
}
// Implemented.
public Microsoft.ReportingServices.DataProcessing.IDbCommand
CreateCommand()
{
return new DSXCommand(this);
}
public string LocalizedName
{
get { return "DataSet Data Processing Extension"; }
}
public void SetConfiguration(string configuration) {}
public void Dispose() {}
}
}
I also have forms authentication and a custom security extension set
up, which works fine as far as I can tell. I don't know if that would
have any bearing on this issue, but I thought I'd mention it anyways.
Hope that helps. If you need more information feel free to post here or
e-mail me.

Saturday, February 25, 2012

Null Values

I have run a report and then grouped values. However some of these values have a 'null' or empty value. How do i change this so that the group name is not blank.

I have tried the following but this does not help:

IF {Subset.SCHOOLCAT} = '' THEN 'other'

It simply blanks out all group names.

I am doing this report on a HEAT System and i know that the reason for this null field is that we have two types of customers and one customer type does not have this field in its tables so it returns the value as blank.

I just need to replace this empty value with a string for consistency value but cannot seem to do it.

Regards

PIF {Subset.SCHOOLCAT} = '' THEN 'other'

Instead of the above code, try the following code

IF IsNull({Subset.SCHOOLCAT}) THEN 'other'|||Many thanks - that seemed to work.

Cheers

T

Null values

How can I replace null value of a column in a query
with something like 'TEST'
for eg. if I run the query
select contract_num, prodid from product
if the contract_num is null, it should return 'TEST'
instead of NULL. how can I do so?
Thank you,
-Loretta
On Tue, 17 Aug 2004 15:24:44 -0700, Loretta wrote:

>How can I replace null value of a column in a query
>with something like 'TEST'
>for eg. if I run the query
>select contract_num, prodid from product
>if the contract_num is null, it should return 'TEST'
>instead of NULL. how can I do so?
>Thank you,
>-Loretta
Hi Loretta,
SELECT COALESCE(contract_num, 'TEST')
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)
|||Hugo,
This helps, thanks much!
-Loretta

>--Original Message--
>On Tue, 17 Aug 2004 15:24:44 -0700, Loretta wrote:
>
>Hi Loretta,
>SELECT COALESCE(contract_num, 'TEST')
>Best, Hugo
>--
>(Remove _NO_ and _SPAM_ to get my e-mail address)
>.
>

NULL Value in Aggregate Function

When I run a query, I get the following warning message
and I would like to know whether it is a problem or not ?
Warning: Null value is eliminated by an aggregate or other
SET operation.
ThanksWhether or not the warning message is a problem depends on the results you
expect. Consider the example below:
CREATE TABLE #Table1(Col1 int NULL)
INSERT INTO #Table1 VALUES(10)
INSERT INTO #Table1 VALUES(NULL)
SELECT AVG(Col1) FROM #Table1
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Mary" <anonymous@.discussions.microsoft.com> wrote in message
news:02f401c529ca$0df65ff0$a401280a@.phx.gbl...
> When I run a query, I get the following warning message
> and I would like to know whether it is a problem or not ?
> Warning: Null value is eliminated by an aggregate or other
> SET operation.
> Thanks|||Hi,
Most aggregate functions eliminate null values in calculations; one
exception is the COUNT function. When using the COUNT function against a
column containing null values, the null values will be eliminated from the
calculation. However, if the COUNT function uses an asterisk, it will
calculate all rows regardless of null values being present.
Again depending upon the aggregate function you are using, you might have
received this warning message. You need to understand if the aggregate
function is giving the required result set. You can use ISNULL function to
convert NULL to the desired values.
--
Thanks
Yogish|||Thank you the reply from both of you.
In my select statement, aggregrate function SUM(Balance)
is used.
From the query result, I find that some of them are NULL
and some are $0. I am still looking into the reason why
some of them are NULL.
From my understanding, for NULL + $0, it will be $0. And
all balance are NULL will give me a NULL result. I
believe that the query still OK.
Thanks again.
>--Original Message--
>Hi,
>Most aggregate functions eliminate null values in
calculations; one
>exception is the COUNT function. When using the COUNT
function against a
>column containing null values, the null values will be
eliminated from the
>calculation. However, if the COUNT function uses an
asterisk, it will
>calculate all rows regardless of null values being
present.
>Again depending upon the aggregate function you are
using, you might have
>received this warning message. You need to understand if
the aggregate
>function is giving the required result set. You can use
ISNULL function to
>convert NULL to the desired values.
>--
>Thanks
>Yogish
>.
>|||> From my understanding, for NULL + $0,
No, NULL + 0 is UNKNOWN. For convenience, the SQL language designers decided to not return UNK or
NULL when you aggregate over rows where one or more have NULL in the column. They decided to skip
(ignore) the ones with NULL. And give you a reminder (this warning).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Mary" <anonymous@.discussions.microsoft.com> wrote in message
news:033801c529d5$f9747920$a401280a@.phx.gbl...
> Thank you the reply from both of you.
> In my select statement, aggregrate function SUM(Balance)
> is used.
> From the query result, I find that some of them are NULL
> and some are $0. I am still looking into the reason why
> some of them are NULL.
> From my understanding, for NULL + $0, it will be $0. And
> all balance are NULL will give me a NULL result. I
> believe that the query still OK.
> Thanks again.
>>--Original Message--
>>Hi,
>>Most aggregate functions eliminate null values in
> calculations; one
>>exception is the COUNT function. When using the COUNT
> function against a
>>column containing null values, the null values will be
> eliminated from the
>>calculation. However, if the COUNT function uses an
> asterisk, it will
>>calculate all rows regardless of null values being
> present.
>>Again depending upon the aggregate function you are
> using, you might have
>>received this warning message. You need to understand if
> the aggregate
>>function is giving the required result set. You can use
> ISNULL function to
>>convert NULL to the desired values.
>>--
>>Thanks
>>Yogish
>>.

NULL Value in Aggregate Function

When I run a query, I get the following warning message
and I would like to know whether it is a problem or not ?
Warning: Null value is eliminated by an aggregate or other
SET operation.
ThanksWhether or not the warning message is a problem depends on the results you
expect. Consider the example below:
CREATE TABLE #Table1(Col1 int NULL)
INSERT INTO #Table1 VALUES(10)
INSERT INTO #Table1 VALUES(NULL)
SELECT AVG(Col1) FROM #Table1
Hope this helps.
Dan Guzman
SQL Server MVP
"Mary" <anonymous@.discussions.microsoft.com> wrote in message
news:02f401c529ca$0df65ff0$a401280a@.phx.gbl...
> When I run a query, I get the following warning message
> and I would like to know whether it is a problem or not ?
> Warning: Null value is eliminated by an aggregate or other
> SET operation.
> Thanks|||Hi,
Most aggregate functions eliminate null values in calculations; one
exception is the COUNT function. When using the COUNT function against a
column containing null values, the null values will be eliminated from the
calculation. However, if the COUNT function uses an asterisk, it will
calculate all rows regardless of null values being present.
Again depending upon the aggregate function you are using, you might have
received this warning message. You need to understand if the aggregate
function is giving the required result set. You can use ISNULL function to
convert NULL to the desired values.
Thanks
Yogish|||Thank you the reply from both of you.
In my select statement, aggregrate function SUM(Balance)
is used.
From the query result, I find that some of them are NULL
and some are $0. I am still looking into the reason why
some of them are NULL.
From my understanding, for NULL + $0, it will be $0. And
all balance are NULL will give me a NULL result. I
believe that the query still OK.
Thanks again.

>--Original Message--
>Hi,
>Most aggregate functions eliminate null values in
calculations; one
>exception is the COUNT function. When using the COUNT
function against a
>column containing null values, the null values will be
eliminated from the
>calculation. However, if the COUNT function uses an
asterisk, it will
>calculate all rows regardless of null values being
present.
>Again depending upon the aggregate function you are
using, you might have
>received this warning message. You need to understand if
the aggregate
>function is giving the required result set. You can use
ISNULL function to
>convert NULL to the desired values.
>--
>Thanks
>Yogish
>.
>|||> From my understanding, for NULL + $0,
No, NULL + 0 is UNKNOWN. For convenience, the SQL language designers decided
to not return UNK or
NULL when you aggregate over rows where one or more have NULL in the column.
They decided to skip
(ignore) the ones with NULL. And give you a reminder (this warning).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Mary" <anonymous@.discussions.microsoft.com> wrote in message
news:033801c529d5$f9747920$a401280a@.phx.gbl...[vbcol=seagreen]
> Thank you the reply from both of you.
> In my select statement, aggregrate function SUM(Balance)
> is used.
> From the query result, I find that some of them are NULL
> and some are $0. I am still looking into the reason why
> some of them are NULL.
> From my understanding, for NULL + $0, it will be $0. And
> all balance are NULL will give me a NULL result. I
> believe that the query still OK.
> Thanks again.
>
> calculations; one
> function against a
> eliminated from the
> asterisk, it will
> present.
> using, you might have
> the aggregate
> ISNULL function to

NULL Value in Aggregate Function

When I run a query, I get the following warning message
and I would like to know whether it is a problem or not ?
Warning: Null value is eliminated by an aggregate or other
SET operation.
Thanks
Whether or not the warning message is a problem depends on the results you
expect. Consider the example below:
CREATE TABLE #Table1(Col1 int NULL)
INSERT INTO #Table1 VALUES(10)
INSERT INTO #Table1 VALUES(NULL)
SELECT AVG(Col1) FROM #Table1
Hope this helps.
Dan Guzman
SQL Server MVP
"Mary" <anonymous@.discussions.microsoft.com> wrote in message
news:02f401c529ca$0df65ff0$a401280a@.phx.gbl...
> When I run a query, I get the following warning message
> and I would like to know whether it is a problem or not ?
> Warning: Null value is eliminated by an aggregate or other
> SET operation.
> Thanks
|||Hi,
Most aggregate functions eliminate null values in calculations; one
exception is the COUNT function. When using the COUNT function against a
column containing null values, the null values will be eliminated from the
calculation. However, if the COUNT function uses an asterisk, it will
calculate all rows regardless of null values being present.
Again depending upon the aggregate function you are using, you might have
received this warning message. You need to understand if the aggregate
function is giving the required result set. You can use ISNULL function to
convert NULL to the desired values.
Thanks
Yogish
|||Thank you the reply from both of you.
In my select statement, aggregrate function SUM(Balance)
is used.
From the query result, I find that some of them are NULL
and some are $0. I am still looking into the reason why
some of them are NULL.
From my understanding, for NULL + $0, it will be $0. And
all balance are NULL will give me a NULL result. I
believe that the query still OK.
Thanks again.

>--Original Message--
>Hi,
>Most aggregate functions eliminate null values in
calculations; one
>exception is the COUNT function. When using the COUNT
function against a
>column containing null values, the null values will be
eliminated from the
>calculation. However, if the COUNT function uses an
asterisk, it will
>calculate all rows regardless of null values being
present.
>Again depending upon the aggregate function you are
using, you might have
>received this warning message. You need to understand if
the aggregate
>function is giving the required result set. You can use
ISNULL function to
>convert NULL to the desired values.
>--
>Thanks
>Yogish
>.
>
|||> From my understanding, for NULL + $0,
No, NULL + 0 is UNKNOWN. For convenience, the SQL language designers decided to not return UNK or
NULL when you aggregate over rows where one or more have NULL in the column. They decided to skip
(ignore) the ones with NULL. And give you a reminder (this warning).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Mary" <anonymous@.discussions.microsoft.com> wrote in message
news:033801c529d5$f9747920$a401280a@.phx.gbl...[vbcol=seagreen]
> Thank you the reply from both of you.
> In my select statement, aggregrate function SUM(Balance)
> is used.
> From the query result, I find that some of them are NULL
> and some are $0. I am still looking into the reason why
> some of them are NULL.
> From my understanding, for NULL + $0, it will be $0. And
> all balance are NULL will give me a NULL result. I
> believe that the query still OK.
> Thanks again.
> calculations; one
> function against a
> eliminated from the
> asterisk, it will
> present.
> using, you might have
> the aggregate
> ISNULL function to