Showing posts with label number. Show all posts
Showing posts with label number. Show all posts

Friday, March 23, 2012

Link analysis

Does Microsoft plan to extend the number of Data Mining algorithms in AS in the future releases? The question is motivated by the task of so called "link analysis" where one should determine how data attributes are related to each other or how and in what extent they influence each other in probabilistic terms. A good solution would be to build a Bayesian Network which gives an insight to how data attributes are related by means of directed acyclic graph. But this approach is not yet implemented in AS2005.

Existing algorithms such as association rules or decision trees might be used but they are far from being ideal for this task (association rules are designed for determining frequent boolean sets in data like Name=Attribute, decision trees work good for classification tasks but perform poor by design for the tasks of revealing attributes direct and inderect influence).

It would be interesting to know what algorithms and approaches Microsoft plans to develop in the future.

We cannot comment on algorithms that will appear in future versoins other than what has already been announced. In SQL Server 2008 we are introducing ARIMA time series with a default option to combine both ARTXP and ARIMA models to get the best of both approached.

The July CTP of SQL Server 2008 has this algorithm available.

Link analysis

Does Microsoft plan to extend the number of Data Mining algorithms in AS in the future releases? The question is motivated by the task of so called "link analysis" where one should determine how data attributes are related to each other or how and in what extent they influence each other in probabilistic terms. A good solution would be to build a Bayesian Network which gives an insight to how data attributes are related by means of directed acyclic graph. But this approach is not yet implemented in AS2005.

Existing algorithms such as association rules or decision trees might be used but they are far from being ideal for this task (association rules are designed for determining frequent boolean sets in data like Name=Attribute, decision trees work good for classification tasks but perform poor by design for the tasks of revealing attributes direct and inderect influence).

It would be interesting to know what algorithms and approaches Microsoft plans to develop in the future.

We cannot comment on algorithms that will appear in future versoins other than what has already been announced. In SQL Server 2008 we are introducing ARIMA time series with a default option to combine both ARTXP and ARIMA models to get the best of both approached.

The July CTP of SQL Server 2008 has this algorithm available.

sql

Wednesday, March 21, 2012

Line Numbers in SQL

Is there a function I can put into my select clause that tell me what the
line number of the row is?
i.e. in Oracle you can do something like (Been a year since I've used
Oracle)
select rownum, Field1, Field2
from blah
Any help is appreciated. Thanks.No, you could do something with a temp table and IDENTITY. I believe Yukon
has the rownumber function. What do you need it for?
Ray Higdon MCSE, MCDBA, CCNA
--
"Scott Meddows" <scott_meddows_no_spm@.tsged-removeme.com> wrote in message
news:uTDWhna8DHA.1052@.TK2MSFTNGP12.phx.gbl...
> Is there a function I can put into my select clause that tell me what the
> line number of the row is?
> i.e. in Oracle you can do something like (Been a year since I've used
> Oracle)
> select rownum, Field1, Field2
> from blah
> Any help is appreciated. Thanks.
>|||It's the only way I can think of to alternate row colors in reporting
services...
"Ray Higdon" <sqlhigdon@.nospam.yahoo.com> wrote in message
news:%233NMuic8DHA.1548@.tk2msftngp13.phx.gbl...
> No, you could do something with a temp table and IDENTITY. I believe Yukon
> has the rownumber function. What do you need it for?
> --
> Ray Higdon MCSE, MCDBA, CCNA
> --
> "Scott Meddows" <scott_meddows_no_spm@.tsged-removeme.com> wrote in message
> news:uTDWhna8DHA.1052@.TK2MSFTNGP12.phx.gbl...
the
>|||you should have a look at the subject "row style in matrix" in
microsoft.public.sqlserver.reportingsvcs
Jean-Philippe.
"Scott Meddows" <scott_meddows_no_spm@.tsged-removeme.com> a crit dans le
message de news:eDztD6e8DHA.2404@.TK2MSFTNGP12.phx.gbl...
> It's the only way I can think of to alternate row colors in reporting
> services...
> "Ray Higdon" <sqlhigdon@.nospam.yahoo.com> wrote in message
> news:%233NMuic8DHA.1548@.tk2msftngp13.phx.gbl...
Yukon
message
> the
>|||I don't seem to have a message with that title and the newsgroup is not in
Google groups yet...
"Jean Philippe Vankemmel" <vankemjp@.ifrance.com> wrote in message
news:%23zh0zZG9DHA.452@.TK2MSFTNGP11.phx.gbl...
> you should have a look at the subject "row style in matrix" in
> microsoft.public.sqlserver.reportingsvcs
> Jean-Philippe.
> "Scott Meddows" <scott_meddows_no_spm@.tsged-removeme.com> a crit dans le
> message de news:eDztD6e8DHA.2404@.TK2MSFTNGP12.phx.gbl...
> Yukon
> message
what
used
>|||See here - http://www.microsoft.com/sql/commun...ups/default.asp
Ray Higdon MCSE, MCDBA, CCNA
--
"Scott Meddows" <scott_meddows_no_spm@.tsged-removeme.com> wrote in message
news:%23k0kO%23K9DHA.4060@.tk2msftngp13.phx.gbl...
> I don't seem to have a message with that title and the newsgroup is not in
> Google groups yet...
> "Jean Philippe Vankemmel" <vankemjp@.ifrance.com> wrote in message
> news:%23zh0zZG9DHA.452@.TK2MSFTNGP11.phx.gbl...
le
> what
> used
>|||Nothing there, either..
Doesn't come up in search.
"Ray Higdon" <sqlhigdon@.nospam.yahoo.com> wrote in message
news:eKr4rHL9DHA.400@.tk2msftngp13.phx.gbl...
> See here - http://www.microsoft.com/sql/commun...ups/default.asp
> --
> Ray Higdon MCSE, MCDBA, CCNA
> --
> "Scott Meddows" <scott_meddows_no_spm@.tsged-removeme.com> wrote in message
> news:%23k0kO%23K9DHA.4060@.tk2msftngp13.phx.gbl...
in
> le
reporting
believe
>|||Nothing there? I just went to it, it's toward the bottom of the page, search
for "reporting services"
Ray Higdon MCSE, MCDBA, CCNA
--
"Scott Meddows" <scott_meddows_no_spm@.tsged-removeme.com> wrote in message
news:uVp1YYL9DHA.2712@.tk2msftngp13.phx.gbl...
> Nothing there, either..
> Doesn't come up in search.
> "Ray Higdon" <sqlhigdon@.nospam.yahoo.com> wrote in message
> news:eKr4rHL9DHA.400@.tk2msftngp13.phx.gbl...
message
not
> in
dans
> reporting
> believe
in
me
I've
>|||you should have a look at the subject "row style in matrix" in
That is what I'm looking up in that newsgroup. I can find the reporting
services newsgroup.
"Ray Higdon" <sqlhigdon@.nospam.yahoo.com> wrote in message
news:%23yp%23tcL9DHA.548@.TK2MSFTNGP11.phx.gbl...
> Nothing there? I just went to it, it's toward the bottom of the page,
search
> for "reporting services"
> --
> Ray Higdon MCSE, MCDBA, CCNA
> --
> "Scott Meddows" <scott_meddows_no_spm@.tsged-removeme.com> wrote in message
> news:uVp1YYL9DHA.2712@.tk2msftngp13.phx.gbl...
http://www.microsoft.com/sql/commun...ups/default.asp
> message
> not
> dans
wrote
> in
tell
> me
> I've
>|||Ah, OK.
I use NNTP and searched and found it, this is the excerpt: (See below)
You will need to add an expression the outer most row grouping on the
matrix.
The attached sample report demonstrates how to do this.
Key Areas:
* Matrix Properties Dialog : Groups Tab : Country Group has an expression
on it
that controls the number of rows:
=System.Math.Ceiling(RowNumber(Nothing)/5)
* Place a PageBreakAtEnd on the Matrix Properties Dialog : Groups Tab :
Country Group.
NOTE: There is a bug on this dialog in RTM version. The checkboxes to
set
PageBreakAt[Start | End] are missing. You will need to hand edit the RDL
to get this
to work. Before proceeding backup your RDL. The code snippet shows where
the
PageBreakAtEnd tag was added to the RDL:
<Grouping Name="matrix1_Country">
<GroupExpressions>
<GroupExpression>=System.Math.Ceiling(RowNumber(Nothing)/5)</GroupExpression
>
</GroupExpressions>
<PageBreakAtEnd>true</PageBreakAtEnd> <<<<<< Tag added
here.
</Grouping>
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Avi" <anonymous@.discussions.microsoft.com> wrote in message
news:B9A6926F-2CBD-4C40-9471-49422C3EA39E@.microsoft.com...
> Hi
> Is there any way by which I can specify the number of rows to be displayed
on one page in matrix?
> Suppose I want only 10 rows to be displyed on one page irrespective of
collapsed or expanded state of the groups.
> How do I achieve this?
> -Avi
Ray Higdon MCSE, MCDBA, CCNA
--
"Scott Meddows" <scott_meddows_no_spm@.tsged-removeme.com> wrote in message
news:OeKWKlO9DHA.3704@.tk2msftngp13.phx.gbl...
> you should have a look at the subject "row style in matrix" in
> That is what I'm looking up in that newsgroup. I can find the reporting
> services newsgroup.
> "Ray Higdon" <sqlhigdon@.nospam.yahoo.com> wrote in message
> news:%23yp%23tcL9DHA.548@.TK2MSFTNGP11.phx.gbl...
> search
message
> http://www.microsoft.com/sql/commun...ups/default.asp
is
crit
> wrote
> tell
since
>sql

Line Number in Transact SQL

Hi,

How do you generate line numbers in Transact SQL?

Example:

In Sybase, I could use this...
select number(*), customer_name from customer_table

number(*) customer_name
----------------
1 Customer Name 1
2 Customer Name 2
3 Customer Name 3

Thanks,
GeoffOriginally posted by geoff_sy
Hi,

How do you generate line numbers in Transact SQL?

Example:

In Sybase, I could use this...
select number(*), customer_name from customer_table

number(*) customer_name
----------------
1 Customer Name 1
2 Customer Name 2
3 Customer Name 3

Thanks,
Geoff

select number=identity(int,1,1), fak.* into #temp

from (select top 100 percent customer_name from customer_table order by 1) fak

select * from #temp order by 1

drop table #temp|||I don't understant why you suggested a nested query it could more simple I think eg:

select number=identity(int,1,1), customer_name into #temp
from customer_table order by 1 -- (or any other column)

Originally posted by harshal_in
select number=identity(int,1,1), fak.* into #temp

from (select top 100 percent customer_name from customer_table order by 1) fak

select * from #temp order by 1

drop table #tempsql

Line Number ?

Hi guys,
SQL RS supplies the global variable "PageNumber" but is there a kind of
"LineNumber" variable or function available ? Or another way to get the
number of current line being printed ?
Thanks.
Jean-MarcLook up "RowNumber" and "RunningValue" functions in the RS Books
Online. In a simple table, RowNumber(scope) gives the current row
number. In some more complex scenarios (ex: numbering rows within a
matrix group), the RunningValue(Expression, Function, Scope) function
is the best option.|||Thanks I'm gonna try that !
Jean-Marc

Line Number

Hello,
I am getting an error in my .NET app and the error comes from a SQL
Server sproc. I am able to capture the line number. My question is how
to find that line? Do I start counting from CREATE PROCEDURE or from
the AS statement? Or elsewhere?
Frank,
Execute the sproc in Query Analyzer. When the error message appears in the
result pane, double-click it - should highlight the line or general location
of the error.
HTH
Jerry
"Frank Rizzo" <none@.none.com> wrote in message
news:O5ChPem1FHA.3188@.TK2MSFTNGP14.phx.gbl...
> Hello,
> I am getting an error in my .NET app and the error comes from a SQL Server
> sproc. I am able to capture the line number. My question is how to find
> that line? Do I start counting from CREATE PROCEDURE or from the AS
> statement? Or elsewhere?
>
|||Jerry Spivey wrote:

>Frank,
>Execute the sproc in Query Analyzer. When the error message appears in the
>result pane, double-click it - should highlight the line or general location
>of the error.
>
Unfortunately, this is not something that happens all the time. It
happens very rarely. When it does happen, the application captures and
writes out to a log all the info it can. This is where the line number
is found as well. Thus I am trying to troubleshoot a sproc based on a
line number.
So, that said, do I start counting from CREATE PROCEDURE or from the AS
statement?

>HTH
>Jerry
>"Frank Rizzo" <none@.none.com> wrote in message
>news:O5ChPem1FHA.3188@.TK2MSFTNGP14.phx.gbl...
>
>
>

Line Number

Hello,
I am getting an error in my .NET app and the error comes from a SQL
Server sproc. I am able to capture the line number. My question is how
to find that line? Do I start counting from CREATE PROCEDURE or from
the AS statement? Or elsewhere?Frank,
Execute the sproc in Query Analyzer. When the error message appears in the
result pane, double-click it - should highlight the line or general location
of the error.
HTH
Jerry
"Frank Rizzo" <none@.none.com> wrote in message
news:O5ChPem1FHA.3188@.TK2MSFTNGP14.phx.gbl...
> Hello,
> I am getting an error in my .NET app and the error comes from a SQL Server
> sproc. I am able to capture the line number. My question is how to find
> that line? Do I start counting from CREATE PROCEDURE or from the AS
> statement? Or elsewhere?
>|||Jerry Spivey wrote:
>Frank,
>Execute the sproc in Query Analyzer. When the error message appears in the
>result pane, double-click it - should highlight the line or general location
>of the error.
>
Unfortunately, this is not something that happens all the time. It
happens very rarely. When it does happen, the application captures and
writes out to a log all the info it can. This is where the line number
is found as well. Thus I am trying to troubleshoot a sproc based on a
line number.
So, that said, do I start counting from CREATE PROCEDURE or from the AS
statement?
>HTH
>Jerry
>"Frank Rizzo" <none@.none.com> wrote in message
>news:O5ChPem1FHA.3188@.TK2MSFTNGP14.phx.gbl...
>
>>Hello,
>>I am getting an error in my .NET app and the error comes from a SQL Server
>>sproc. I am able to capture the line number. My question is how to find
>>that line? Do I start counting from CREATE PROCEDURE or from the AS
>>statement? Or elsewhere?
>>
>
>

Line Number

Hello,
I am getting an error in my .NET app and the error comes from a SQL
Server sproc. I am able to capture the line number. My question is how
to find that line? Do I start counting from CREATE PROCEDURE or from
the AS statement? Or elsewhere?Frank,
Execute the sproc in Query Analyzer. When the error message appears in the
result pane, double-click it - should highlight the line or general location
of the error.
HTH
Jerry
"Frank Rizzo" <none@.none.com> wrote in message
news:O5ChPem1FHA.3188@.TK2MSFTNGP14.phx.gbl...
> Hello,
> I am getting an error in my .NET app and the error comes from a SQL Server
> sproc. I am able to capture the line number. My question is how to find
> that line? Do I start counting from CREATE PROCEDURE or from the AS
> statement? Or elsewhere?
>|||Jerry Spivey wrote:

>Frank,
>Execute the sproc in Query Analyzer. When the error message appears in the
>result pane, double-click it - should highlight the line or general locatio
n
>of the error.
>
Unfortunately, this is not something that happens all the time. It
happens very rarely. When it does happen, the application captures and
writes out to a log all the info it can. This is where the line number
is found as well. Thus I am trying to troubleshoot a sproc based on a
line number.
So, that said, do I start counting from CREATE PROCEDURE or from the AS
statement?

>HTH
>Jerry
>"Frank Rizzo" <none@.none.com> wrote in message
>news:O5ChPem1FHA.3188@.TK2MSFTNGP14.phx.gbl...
>
>
>

Line Graph Question

My line graph is currently using the yearmonth datafield on the x-axis and
the number of units ordered datafield on the y-axis ( it pretty much
demostrates the consumers' purchasing trends throughout the months of a
year)- this is a horizontal line. I want to create a second line (vertical
line) that marks the date datafield (separate from the yearmonth datafield)
of an event to show the the user the effects of the purchasing trends after
an event date (date datafield) throughout the months. Is this possible? And
if so, how would I approach this? Thank you in advance for you help.
Sincerely,
HaYou may want to try to combine the line chart with a column chart (see this
related posting):
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=f23bb56f-ba12-4890-b0f2-2288a8914d91&sloc=en-us
You would use the chart series with the columns to mark certain date ranges.
You can modify the default width of columns by changing the PointWidth
property (directly in the RDL file). See also this related posting:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=8eda1408-dffc-459e-8cb3-c52e718c2358&sloc=en-us
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ha Vo" <ha.vo@.prometheuslabs.com> wrote in message
news:uqfYZc4lEHA.2680@.TK2MSFTNGP15.phx.gbl...
> My line graph is currently using the yearmonth datafield on the x-axis and
> the number of units ordered datafield on the y-axis ( it pretty much
> demostrates the consumers' purchasing trends throughout the months of a
> year)- this is a horizontal line. I want to create a second line (vertical
> line) that marks the date datafield (separate from the yearmonth
datafield)
> of an event to show the the user the effects of the purchasing trends
after
> an event date (date datafield) throughout the months. Is this possible?
And
> if so, how would I approach this? Thank you in advance for you help.
>
> Sincerely,
> Ha
>

Monday, March 19, 2012

Line Break formatting

I have a report with a narrow column. The column contains a comma delimited number list.

If the length of the string exceeds the width of the column then the line breaks. No problem with this, except that there are breaks between the numbers.

Example:

123,124,125,126

can be formatted as

123,12
4, 125,1
26

I'd like to force a break at a position within the string if its on the comma. Any thoughts on doing this in the Expressions window?

TIA

anyone please?|||you'll need to have space after the commas.|||

By assuming that all your number list of three digits than we can adjust the column width such that it fixes the numbers. if numbers are not fixed length digits than i wont think we can do .

|||The numbers can be any length (1 to n digits). They are also not always guaranteed to be numeric; they can be alphanumeric as well (but still sequential).|||Use vbcrlf. I'm putting a line break in my address with the below code. I tried \r\n, <br>, all kinds of stuff. vbcrlf is what I needed.

=Fields!SHIPTO.Value & vbcrlf & Fields!SHP_TO_CTY.Value & ", " & Fields!SHP_TO_ST.Value & " " & Fields!SHP_TO_ZIP.Value
|||vbcrlf will work but seeing as we're in the .NET world now I would recommend using Environment.NewLine

Line Break formatting

I have a report with a narrow column. The column contains a comma delimited number list.

If the length of the string exceeds the width of the column then the line breaks. No problem with this, except that there are breaks between the numbers.

Example:

123,124,125,126

can be formatted as

123,12
4, 125,1
26

I'd like to force a break at a position within the string if its on the comma. Any thoughts on doing this in the Expressions window?

TIA

anyone please?|||you'll need to have space after the commas.|||

By assuming that all your number list of three digits than we can adjust the column width such that it fixes the numbers. if numbers are not fixed length digits than i wont think we can do .

|||The numbers can be any length (1 to n digits). They are also not always guaranteed to be numeric; they can be alphanumeric as well (but still sequential).|||Use vbcrlf. I'm putting a line break in my address with the below code. I tried \r\n, <br>, all kinds of stuff. vbcrlf is what I needed.

=Fields!SHIPTO.Value & vbcrlf & Fields!SHP_TO_CTY.Value & ", " & Fields!SHP_TO_ST.Value & " " & Fields!SHP_TO_ZIP.Value
|||vbcrlf will work but seeing as we're in the .NET world now I would recommend using Environment.NewLine

Limits on number of merge subscribers?

I'm testing merge replication between a SQL server 2000
publisher and multiple MSDE subscribers. The publication
consists of somewhere around 200 articles (tables, views,
store procs). All subscriptions are pull subscriptions.
My test environment has roughly 10 subscribers.
So far the solution seems to work nicely.
Does anyone know what kind of performance issues I may run
into if the number of subscribers increased to 50 or 100?
It there a theoretical limit or is it simply a question of
machine capability and band width?
Pat,
I haven't ever used more than a dozen simultaneous subscribers, but this
article details scaling up to 2000 subscribers and the correlation with
download speed, effect of RAM, processors etc:
http://www.microsoft.com/technet/pro...mergperf.mspx.
BTW, as far as I know there is no documented limit to the number of
subscribers.
HTH,
Paul Ibison

Monday, March 12, 2012

Limits on Number of database...

I have created "around 25 excluding system databases" number of databases in
one SQL server instance. Is there any limits on number of SQL server
databases which affects the performance of SQL Server.
I am using SQL 2K.
Thanks,
Akshay
"Akshay Sen" <ASen89@.hotmail.com> wrote in message
news:eblLuwVCFHA.328@.tk2msftngp13.phx.gbl...
>I have created "around 25 excluding system databases" number of databases
>in
> one SQL server instance. Is there any limits on number of SQL server
> databases which affects the performance of SQL Server.
> I am using SQL 2K.
> Thanks,
> Akshay
>
It depends..
How heavily is each database used?
How big is your system (processors, memory etc.).
It's not really the number of databases that is an issue, but rather how
they are being used. One thing to note however is that with a lot of
databases, it may take longer for the SQL Server to come back online as it
does some work with each database when the system is restarted.
HTH
Rick Sawtell
MCT, MCSD, MCDBA
|||Makes sense. Thanks
Akshay
"Rick Sawtell" <quickening@.msn.com> wrote in message
news:#azT90VCFHA.520@.TK2MSFTNGP09.phx.gbl...
> "Akshay Sen" <ASen89@.hotmail.com> wrote in message
> news:eblLuwVCFHA.328@.tk2msftngp13.phx.gbl...
>
> It depends..
> How heavily is each database used?
> How big is your system (processors, memory etc.).
> It's not really the number of databases that is an issue, but rather how
> they are being used. One thing to note however is that with a lot of
> databases, it may take longer for the SQL Server to come back online as it
> does some work with each database when the system is restarted.
> HTH
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>
|||Also keep in mind that the SQLServer:Database performance counters are only
collected on the first 99 databses.
Sincerely,
Anthony Thomas

"Akshay Sen" <ASen89@.hotmail.com> wrote in message
news:e1aaZ3VCFHA.868@.TK2MSFTNGP10.phx.gbl...
Makes sense. Thanks
Akshay
"Rick Sawtell" <quickening@.msn.com> wrote in message
news:#azT90VCFHA.520@.TK2MSFTNGP09.phx.gbl...
> "Akshay Sen" <ASen89@.hotmail.com> wrote in message
> news:eblLuwVCFHA.328@.tk2msftngp13.phx.gbl...
>
> It depends..
> How heavily is each database used?
> How big is your system (processors, memory etc.).
> It's not really the number of databases that is an issue, but rather how
> they are being used. One thing to note however is that with a lot of
> databases, it may take longer for the SQL Server to come back online as it
> does some work with each database when the system is restarted.
> HTH
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>

Limits on Number of database...

I have created "around 25 excluding system databases" number of databases in
one SQL server instance. Is there any limits on number of SQL server
databases which affects the performance of SQL Server.
I am using SQL 2K.
Thanks,
Akshay"Akshay Sen" <ASen89@.hotmail.com> wrote in message
news:eblLuwVCFHA.328@.tk2msftngp13.phx.gbl...
>I have created "around 25 excluding system databases" number of databases
>in
> one SQL server instance. Is there any limits on number of SQL server
> databases which affects the performance of SQL Server.
> I am using SQL 2K.
> Thanks,
> Akshay
>
It depends..
How heavily is each database used?
How big is your system (processors, memory etc.).
It's not really the number of databases that is an issue, but rather how
they are being used. One thing to note however is that with a lot of
databases, it may take longer for the SQL Server to come back online as it
does some work with each database when the system is restarted.
HTH
Rick Sawtell
MCT, MCSD, MCDBA|||Makes sense. Thanks
Akshay
"Rick Sawtell" <quickening@.msn.com> wrote in message
news:#azT90VCFHA.520@.TK2MSFTNGP09.phx.gbl...
> "Akshay Sen" <ASen89@.hotmail.com> wrote in message
> news:eblLuwVCFHA.328@.tk2msftngp13.phx.gbl...
>
> It depends..
> How heavily is each database used?
> How big is your system (processors, memory etc.).
> It's not really the number of databases that is an issue, but rather how
> they are being used. One thing to note however is that with a lot of
> databases, it may take longer for the SQL Server to come back online as it
> does some work with each database when the system is restarted.
> HTH
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>|||Also keep in mind that the SQLServer:Database performance counters are only
collected on the first 99 databses.
Sincerely,
Anthony Thomas
"Akshay Sen" <ASen89@.hotmail.com> wrote in message
news:e1aaZ3VCFHA.868@.TK2MSFTNGP10.phx.gbl...
Makes sense. Thanks
Akshay
"Rick Sawtell" <quickening@.msn.com> wrote in message
news:#azT90VCFHA.520@.TK2MSFTNGP09.phx.gbl...
> "Akshay Sen" <ASen89@.hotmail.com> wrote in message
> news:eblLuwVCFHA.328@.tk2msftngp13.phx.gbl...
>
> It depends..
> How heavily is each database used?
> How big is your system (processors, memory etc.).
> It's not really the number of databases that is an issue, but rather how
> they are being used. One thing to note however is that with a lot of
> databases, it may take longer for the SQL Server to come back online as it
> does some work with each database when the system is restarted.
> HTH
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>

Limits on Number of database...

I have created "around 25 excluding system databases" number of databases in
one SQL server instance. Is there any limits on number of SQL server
databases which affects the performance of SQL Server.
I am using SQL 2K.
Thanks,
Akshay"Akshay Sen" <ASen89@.hotmail.com> wrote in message
news:eblLuwVCFHA.328@.tk2msftngp13.phx.gbl...
>I have created "around 25 excluding system databases" number of databases
>in
> one SQL server instance. Is there any limits on number of SQL server
> databases which affects the performance of SQL Server.
> I am using SQL 2K.
> Thanks,
> Akshay
>
It depends..
How heavily is each database used?
How big is your system (processors, memory etc.).
It's not really the number of databases that is an issue, but rather how
they are being used. One thing to note however is that with a lot of
databases, it may take longer for the SQL Server to come back online as it
does some work with each database when the system is restarted.
HTH
Rick Sawtell
MCT, MCSD, MCDBA|||Makes sense. Thanks
Akshay
"Rick Sawtell" <quickening@.msn.com> wrote in message
news:#azT90VCFHA.520@.TK2MSFTNGP09.phx.gbl...
> "Akshay Sen" <ASen89@.hotmail.com> wrote in message
> news:eblLuwVCFHA.328@.tk2msftngp13.phx.gbl...
> >I have created "around 25 excluding system databases" number of databases
> >in
> > one SQL server instance. Is there any limits on number of SQL server
> > databases which affects the performance of SQL Server.
> > I am using SQL 2K.
> > Thanks,
> > Akshay
> >
> >
>
> It depends..
> How heavily is each database used?
> How big is your system (processors, memory etc.).
> It's not really the number of databases that is an issue, but rather how
> they are being used. One thing to note however is that with a lot of
> databases, it may take longer for the SQL Server to come back online as it
> does some work with each database when the system is restarted.
> HTH
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>|||Also keep in mind that the SQLServer:Database performance counters are only
collected on the first 99 databses.
Sincerely,
Anthony Thomas
"Akshay Sen" <ASen89@.hotmail.com> wrote in message
news:e1aaZ3VCFHA.868@.TK2MSFTNGP10.phx.gbl...
Makes sense. Thanks
Akshay
"Rick Sawtell" <quickening@.msn.com> wrote in message
news:#azT90VCFHA.520@.TK2MSFTNGP09.phx.gbl...
> "Akshay Sen" <ASen89@.hotmail.com> wrote in message
> news:eblLuwVCFHA.328@.tk2msftngp13.phx.gbl...
> >I have created "around 25 excluding system databases" number of databases
> >in
> > one SQL server instance. Is there any limits on number of SQL server
> > databases which affects the performance of SQL Server.
> > I am using SQL 2K.
> > Thanks,
> > Akshay
> >
> >
>
> It depends..
> How heavily is each database used?
> How big is your system (processors, memory etc.).
> It's not really the number of databases that is an issue, but rather how
> they are being used. One thing to note however is that with a lot of
> databases, it may take longer for the SQL Server to come back online as it
> does some work with each database when the system is restarted.
> HTH
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>

Limiting user records

Hi,
What is the best way to limit the number of records a user can insert
into a table. Basically, I want to set something like 50 records. If
the user tries to insert the 11th record, I want the action to FAIL,
therefore firing some SQL Error. I want to be able to customize this
error too.
So, what is the best way? Is it possible to get an example please?
Tascien
Your specs are inconsistent. You say you want to limit it to 50 rows but it
should fail on the 11th row. Could you post your DDL, sample data and
expected results?
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
<tascienu@.ecoaches.com> wrote in message
news:1136420757.396966.83240@.o13g2000cwo.googlegro ups.com...
Hi,
What is the best way to limit the number of records a user can insert
into a table. Basically, I want to set something like 50 records. If
the user tries to insert the 11th record, I want the action to FAIL,
therefore firing some SQL Error. I want to be able to customize this
error too.
So, what is the best way? Is it possible to get an example please?
Tascien
|||tascienu@.ecoaches.com wrote:
> Hi,
> What is the best way to limit the number of records a user can insert
> into a table. Basically, I want to set something like 50 records. If
> the user tries to insert the 11th record, I want the action to FAIL,
> therefore firing some SQL Error. I want to be able to customize this
> error too.
> So, what is the best way? Is it possible to get an example please?
> Tascien
Do you mean total rows in a table or the number of rows executed in a
single insert statement? If you want total rows in a table then you'll
have to tag each row with the user name. You can use an instead of
insert trigger to first query the underlying table for the number of
rows owned by the user and add this to the number of rows in the
inserted table. If you want to limit the number in a single insert (as
in INSERT INTO... SELECT FROM) you can also use an instead of insert
trigger, but this time check COUNT(*) from inserted to make sure it's
not over the limit. Or maybe you want something else altogether...
David Gugick
Quest Software
www.quest.com
|||Sorry, I was giving an example... Let's say, i limit to 3 records...
1 First
2 Second
3 Third
4 Raise Error "You have reached the maximum allowed rows"
Tascien
|||create table test
(value char(100))
go
create trigger testrig
on test
instead of
insert
as
begin
if (select count(*) from test) >= 3
begin
rollback
raiserror ('Number of rows exceeds 3',16,1)
end
else
insert into test select value from inserted
end
go
insert into test values('first')
insert into test values('second')
insert into test values('third')
insert into test values('fourth')
go
select * from test
|||Wonderful. That is what i was looking for. By the way, adding a
Select Count(*) trigger for each insert... is it a performance issue
when the table gets big?
Tascien
|||tascienu@.ecoaches.com wrote:
> Wonderful. That is what i was looking for. By the way, adding a
> Select Count(*) trigger for each insert... is it a performance issue
> when the table gets big?
> Tascien
Yes. You might want to consider creating a clustered index on the user
column. But it is a concern you should account for before the table gets
too large.
David Gugick
Quest Software
www.quest.com
|||Yes you need to create an clustered index on it.
One more thing that I found about my last post is,
Suppose two users want to insert record and number of records are 2 in
the table when both of you checked it.so both of you will issue insert
commands. So first of them two should be succeeded. You have to put a
lock on the table.
so while you check you have to give lock hint of holdlock.
select count(*) from test (holdlock)
But then at a time only one user can insert into the table.
What is the reason for a table to limmit its number of records to some
number of rows.
Instead you can create a view to filter number of rows.
Regards
Amish
*** Sent via Developersdex http://www.codecomments.com ***
|||The reason I am limiting is not a critical one. I just don't want some
of my customers to exceed a number of records I assign to them. If they
exceed by 1 or 2, it should be fine...
Once again, thanks for help.
Tascien
|||Ok in that case you dont need to put hold lock is you are ready to
accept 1 or 2 more records then decided. It will not create locks on
the table.
Regards
Amish

Limiting user records

Hi,
What is the best way to limit the number of records a user can insert
into a table. Basically, I want to set something like 50 records. If
the user tries to insert the 11th record, I want the action to FAIL,
therefore firing some SQL Error. I want to be able to customize this
error too.
So, what is the best way? Is it possible to get an example please?
TascienYour specs are inconsistent. You say you want to limit it to 50 rows but it
should fail on the 11th row. Could you post your DDL, sample data and
expected results?
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
<tascienu@.ecoaches.com> wrote in message
news:1136420757.396966.83240@.o13g2000cwo.googlegroups.com...
Hi,
What is the best way to limit the number of records a user can insert
into a table. Basically, I want to set something like 50 records. If
the user tries to insert the 11th record, I want the action to FAIL,
therefore firing some SQL Error. I want to be able to customize this
error too.
So, what is the best way? Is it possible to get an example please?
Tascien|||tascienu@.ecoaches.com wrote:
> Hi,
> What is the best way to limit the number of records a user can insert
> into a table. Basically, I want to set something like 50 records. If
> the user tries to insert the 11th record, I want the action to FAIL,
> therefore firing some SQL Error. I want to be able to customize this
> error too.
> So, what is the best way? Is it possible to get an example please?
> Tascien
Do you mean total rows in a table or the number of rows executed in a
single insert statement? If you want total rows in a table then you'll
have to tag each row with the user name. You can use an instead of
insert trigger to first query the underlying table for the number of
rows owned by the user and add this to the number of rows in the
inserted table. If you want to limit the number in a single insert (as
in INSERT INTO... SELECT FROM) you can also use an instead of insert
trigger, but this time check COUNT(*) from inserted to make sure it's
not over the limit. Or maybe you want something else altogether...
David Gugick
Quest Software
www.quest.com|||Sorry, I was giving an example... Let's say, i limit to 3 records...
1 First
2 Second
3 Third
4 Raise Error "You have reached the maximum allowed rows"
Tascien|||create table test
(value char(100))
go
create trigger testrig
on test
instead of
insert
as
begin
if (select count(*) from test) >= 3
begin
rollback
raiserror ('Number of rows exceeds 3',16,1)
end
else
insert into test select value from inserted
end
go
insert into test values('first')
insert into test values('second')
insert into test values('third')
insert into test values('fourth')
go
select * from test|||Wonderful. That is what i was looking for. By the way, adding a
Select Count(*) trigger for each insert... is it a performance issue
when the table gets big?
Tascien|||tascienu@.ecoaches.com wrote:
> Wonderful. That is what i was looking for. By the way, adding a
> Select Count(*) trigger for each insert... is it a performance issue
> when the table gets big?
> Tascien
Yes. You might want to consider creating a clustered index on the user
column. But it is a concern you should account for before the table gets
too large.
David Gugick
Quest Software
www.quest.com|||Yes you need to create an clustered index on it.
One more thing that I found about my last post is,
Suppose two users want to insert record and number of records are 2 in
the table when both of you checked it.so both of you will issue insert
commands. So first of them two should be succeeded. You have to put a
lock on the table.
so while you check you have to give lock hint of holdlock.
select count(*) from test (holdlock)
But then at a time only one user can insert into the table.
What is the reason for a table to limmit its number of records to some
number of rows.
Instead you can create a view to filter number of rows.
Regards
Amish
*** Sent via Developersdex http://www.codecomments.com ***|||The reason I am limiting is not a critical one. I just don't want some
of my customers to exceed a number of records I assign to them. If they
exceed by 1 or 2, it should be fine...
Once again, thanks for help.
Tascien|||Ok in that case you dont need to put hold lock is you are ready to
accept 1 or 2 more records then decided. It will not create locks on
the table.
Regards
Amish

Limiting user records

Hi,
What is the best way to limit the number of records a user can insert
into a table. Basically, I want to set something like 50 records. If
the user tries to insert the 11th record, I want the action to FAIL,
therefore firing some SQL Error. I want to be able to customize this
error too.
So, what is the best way? Is it possible to get an example please?
TascienYour specs are inconsistent. You say you want to limit it to 50 rows but it
should fail on the 11th row. Could you post your DDL, sample data and
expected results?
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
<tascienu@.ecoaches.com> wrote in message
news:1136420757.396966.83240@.o13g2000cwo.googlegroups.com...
Hi,
What is the best way to limit the number of records a user can insert
into a table. Basically, I want to set something like 50 records. If
the user tries to insert the 11th record, I want the action to FAIL,
therefore firing some SQL Error. I want to be able to customize this
error too.
So, what is the best way? Is it possible to get an example please?
Tascien|||tascienu@.ecoaches.com wrote:
> Hi,
> What is the best way to limit the number of records a user can insert
> into a table. Basically, I want to set something like 50 records. If
> the user tries to insert the 11th record, I want the action to FAIL,
> therefore firing some SQL Error. I want to be able to customize this
> error too.
> So, what is the best way? Is it possible to get an example please?
> Tascien
Do you mean total rows in a table or the number of rows executed in a
single insert statement? If you want total rows in a table then you'll
have to tag each row with the user name. You can use an instead of
insert trigger to first query the underlying table for the number of
rows owned by the user and add this to the number of rows in the
inserted table. If you want to limit the number in a single insert (as
in INSERT INTO... SELECT FROM) you can also use an instead of insert
trigger, but this time check COUNT(*) from inserted to make sure it's
not over the limit. Or maybe you want something else altogether...
--
David Gugick
Quest Software
www.quest.com|||Sorry, I was giving an example... Let's say, i limit to 3 records...
1 First
2 Second
3 Third
4 Raise Error "You have reached the maximum allowed rows"
Tascien|||create table test
(value char(100))
go
create trigger testrig
on test
instead of
insert
as
begin
if (select count(*) from test) >= 3
begin
rollback
raiserror ('Number of rows exceeds 3',16,1)
end
else
insert into test select value from inserted
end
go
insert into test values('first')
insert into test values('second')
insert into test values('third')
insert into test values('fourth')
go
select * from test|||Wonderful. That is what i was looking for. By the way, adding a
Select Count(*) trigger for each insert... is it a performance issue
when the table gets big?
Tascien|||tascienu@.ecoaches.com wrote:
> Wonderful. That is what i was looking for. By the way, adding a
> Select Count(*) trigger for each insert... is it a performance issue
> when the table gets big?
> Tascien
Yes. You might want to consider creating a clustered index on the user
column. But it is a concern you should account for before the table gets
too large.
--
David Gugick
Quest Software
www.quest.com

Limiting the Number of rows displayed per table.

Dear Report Pros,

I am New to the world of report viewer.

Problem : I have placed 3 tables on top of each other on the rdlc document, done the binding to my business Objects every thing is ok EXCEPT THAT:

the number of rows displyed by the top table are big to the point that the table would stretch Vertically (grow) to accomodate them and It would cover the other 2 tables under it , so basically the first table gets expanded so much to the point that it consumes the rest of the page and hiding / moving the other 2 tables.

I NEED a WAY to LIMIT the number of rows to be displayed per each table regardless of the resultset size, for example I just need to display the first 4 rows of the result comming to this table which might contain 20 rows, and I am hoping that there is a Scrolling / Next mechanizm that that if the user is interested to review the rest of the resltset in this particular table he can.

I understand that this can be achieved through the use of Grups and expressions, but I am not sure how to do this exactly what and where to I place my expression on the table.

Thanks very much in advance for your time and help.

HI,

I suppose you need a custom page break in this scenario. You can have a look at "Page Break " section in the following article:

http://msdn2.microsoft.com/en-us/library/ms251668(VS.80).aspx

|||

HI,

We are marking this issue as "Answered". If you have any new findings or concerns, please feel free to unmark the issue.
Thank you for your understanding!

limiting the number of record sets returned by a stored procedure

Hi,
I know that a stored procedure will return as many results sets as
SELECT statements are in. I want to actually mark which selects should be
returned as results sets and which are just internal. Is there a way of
doing this?
Thanks,
George.George,
There is noway to do this in t-sql. Why are you doing exactly?
if you are doing this kind of operation:
select col1, col2, ..., coln
from table1
where col1 like 'microsoft%'
if @.@.rowcount > 0
...
you can use:
if exists(select * from table1 where col1 like 'microsoft%')
...
AMB
"George Tihenea" wrote:

> Hi,
> I know that a stored procedure will return as many results sets as
> SELECT statements are in. I want to actually mark which selects should be
> returned as results sets and which are just internal. Is there a way of
> doing this?
> Thanks,
> George.
>
>|||Thanks,
Here are some more details. I have a stored procedure like this:
// start of stored proc, then
....
SELECT c1, c2, c3 from ...
WHERE (condition here)
if ( @.returned_rows > 0 ) return 0; /* all ok return*/
/* let the flow continue */
select c1, c2, c3 from...
where (a different condition here)
if ( @.returned_rows > 0 ) return 0; /* all ok return*/
/* let the flow continue */
......................
return 0 /* did not find anything*/
/// end of stored procedure
All this worked ok and I can get the result set from my OLEDB middle tier
using multiple results sets. Of cause I will always get ONLY ONE result set
but OLEDB needs to use the template with multiple results sets to work...
then I had to modify the stored precedure to do an INSERT before finishing.
Here is a scheleton code:
// start of stored proc, then
....
SELECT c1, c2, c3 from ...
WHERE (condition here)
if ( @.returned_rows > 0 ) go to FINISH /* all ok return*/
/* let the flow continue */
select c1, c2, c3 from...
where (a different condition here)
if ( @.returned_rows > 0 ) go to FINISH; /* all ok return*/
/* let the flow continue */
......................
FINISH:
INSERT INTO ....
VALUES (...)
return 0
/// end of stored procedure
The problem is this INSERT. For some reasons I cannot understand, my OLEDB
consumer templates will think that there are 3 result sets instead of 2! And
when I try to read the last one it will just crash while binding the
columns, which is normal because this last result set is bogus!!?
Thanks,
George.
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:F7B5BE46-FCA1-485B-902C-9F8D37629C78@.microsoft.com...
> George,
> There is noway to do this in t-sql. Why are you doing exactly?
> if you are doing this kind of operation:
> select col1, col2, ..., coln
> from table1
> where col1 like 'microsoft%'
> if @.@.rowcount > 0
> ...
> you can use:
> if exists(select * from table1 where col1 like 'microsoft%')
> ...
>
> AMB
>
> "George Tihenea" wrote:
>|||If you need these "other" select statements for debugging what I do is
add a debug variable to each stored procedure:
declare @.Debug int
and then in the TSQL code I test it:
if @.Debug = 1
Select * from Scheduler
Of course you can only run these from Query Analyzer interactively but
typically that is where you draw the line for debugging SPs.
On Thu, 17 Mar 2005 08:53:01 -0500, "George Tihenea"
<tihenea@.comcast.net> wrote:

> Hi,
> I know that a stored procedure will return as many results sets as
>SELECT statements are in. I want to actually mark which selects should be
>returned as results sets and which are just internal. Is there a way of
>doing this?
> Thanks,
> George.
>