Showing posts with label idea. Show all posts
Showing posts with label idea. Show all posts

Thursday, March 29, 2012

Homemade Stress Test

I am trying to make a "homemade stress test" for an application we are
wanting to deploy soon. My idea was to make a few querys in MSAccess to do
some updates on tables in the database. I want to run the querys long enough
to see the transaction log grow. Has anyone tried something like this? I
just need some way to simulate activity to make the transaction log to grow.
Have a look here:
http://support.microsoft.com/?kbid=887057
Andrew J. Kelly SQL MVP
"Rich" <Rich@.discussions.microsoft.com> wrote in message
news:01E6E7A7-1223-4E5C-8371-A800D8D43EB8@.microsoft.com...
>I am trying to make a "homemade stress test" for an application we are
> wanting to deploy soon. My idea was to make a few querys in MSAccess to
> do
> some updates on tables in the database. I want to run the querys long
> enough
> to see the transaction log grow. Has anyone tried something like this? I
> just need some way to simulate activity to make the transaction log to
> grow.

Homemade Stress Test

I am trying to make a "homemade stress test" for an application we are
wanting to deploy soon. My idea was to make a few querys in MSAccess to do
some updates on tables in the database. I want to run the querys long enoug
h
to see the transaction log grow. Has anyone tried something like this? I
just need some way to simulate activity to make the transaction log to grow.Have a look here:
http://support.microsoft.com/?kbid=887057
Andrew J. Kelly SQL MVP
"Rich" <Rich@.discussions.microsoft.com> wrote in message
news:01E6E7A7-1223-4E5C-8371-A800D8D43EB8@.microsoft.com...
>I am trying to make a "homemade stress test" for an application we are
> wanting to deploy soon. My idea was to make a few querys in MSAccess to
> do
> some updates on tables in the database. I want to run the querys long
> enough
> to see the transaction log grow. Has anyone tried something like this? I
> just need some way to simulate activity to make the transaction log to
> grow.

Homemade Stress Test

I am trying to make a "homemade stress test" for an application we are
wanting to deploy soon. My idea was to make a few querys in MSAccess to do
some updates on tables in the database. I want to run the querys long enough
to see the transaction log grow. Has anyone tried something like this? I
just need some way to simulate activity to make the transaction log to grow.Have a look here:
http://support.microsoft.com/?kbid=887057
--
Andrew J. Kelly SQL MVP
"Rich" <Rich@.discussions.microsoft.com> wrote in message
news:01E6E7A7-1223-4E5C-8371-A800D8D43EB8@.microsoft.com...
>I am trying to make a "homemade stress test" for an application we are
> wanting to deploy soon. My idea was to make a few querys in MSAccess to
> do
> some updates on tables in the database. I want to run the querys long
> enough
> to see the transaction log grow. Has anyone tried something like this? I
> just need some way to simulate activity to make the transaction log to
> grow.

Monday, March 26, 2012

Hilary's new replication book

To Hilary: I've been eagerly awaiting your new book on SQL
Replication that had been scheduled for April publication.
Any idea when it will become available? Thanks!
http://www.nwsu.com/forthcoming.html
http://www.nwsu.com/0974973602.html
I'm not sure if I will be hitting the June ship date, but it will be soon
after that. I'll let you know. I had a disagreement with Apress and decided
not to go with them. I don't know why they claim they are still publishing
it or why they claim an April print date.
"fundster" <anonymous@.discussions.microsoft.com> wrote in message
news:8e3c01c432c8$e6fbdbd0$a301280a@.phx.gbl...
> To Hilary: I've been eagerly awaiting your new book on SQL
> Replication that had been scheduled for April publication.
> Any idea when it will become available? Thanks!
|||And to increase the goodwill in the world, Hilary will be
providing, free of charge, all posters in this newsgroup
with signed copies.....:-)
|||Yes, I am very excited to be able to freely distribute these volumes, and I
am even more excited that Paul has agreed to pick up the tab
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:8f6801c43345$a077eaf0$a401280a@.phx.gbl...
> And to increase the goodwill in the world, Hilary will be
> providing, free of charge, all posters in this newsgroup
> with signed copies.....:-)
|||I will gladly pay for mine (signed of course). You have been a great source
of knowledge, help for me, Hillary. I will like to take the sopportunity to
say thank you and congratulate you.
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:OpsLcX1MEHA.268@.TK2MSFTNGP11.phx.gbl...
> Yes, I am very excited to be able to freely distribute these volumes, and
I
> am even more excited that Paul has agreed to pick up the tab
> "Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
> news:8f6801c43345$a077eaf0$a401280a@.phx.gbl...
>

Hilary and Paul : SQL 2005 Book and Materials

I considered the idea, but have decided to produce a few
articles on the main changes that I'm interested in
instead - merge over the internet and peer-to-peer
transactional. Hilary's the man for books, and he'll be
able to update you about his plans.
BTW to be honest as MVPs we don't have much of an
advantage over anyone else in this regard - we still have
to do the research, trial and error, digging through
system stored procedures etc, although some changes we
hear about a little earlier. I know Kalen was able to
interview PMs for the various groups but that was
exceptional and we don't really have such access. If this
is something you're interested in - ie close contact with
the developers - then now is the time we can all do it.
Have a good look at the Beta2 and try to figure the
replication features out, then post your questions in the
Beta2 newsgroups
(http://communities.microsoft.com/new...s/default.asp?
icp=sqlserver2005&slcid=us). I have used these and the
Yukon ones, and the questions are answered by the actual
TSQL code developers - the people we don't usually see on
the public newsgroups, so this is pretty valuable stuff.
Regards,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Paul is right. Please post your comments about SQL server 2005 betas. We
will be delighted to have your feedback.
thanks - Deepak
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:1f5e01c4f7c1$8cafb250$a401280a@.phx.gbl...
> I considered the idea, but have decided to produce a few
> articles on the main changes that I'm interested in
> instead - merge over the internet and peer-to-peer
> transactional. Hilary's the man for books, and he'll be
> able to update you about his plans.
> BTW to be honest as MVPs we don't have much of an
> advantage over anyone else in this regard - we still have
> to do the research, trial and error, digging through
> system stored procedures etc, although some changes we
> hear about a little earlier. I know Kalen was able to
> interview PMs for the various groups but that was
> exceptional and we don't really have such access. If this
> is something you're interested in - ie close contact with
> the developers - then now is the time we can all do it.
> Have a good look at the Beta2 and try to figure the
> replication features out, then post your questions in the
> Beta2 newsgroups
> (http://communities.microsoft.com/new...s/default.asp?
> icp=sqlserver2005&slcid=us). I have used these and the
> Yukon ones, and the questions are answered by the actual
> TSQL code developers - the people we don't usually see on
> the public newsgroups, so this is pretty valuable stuff.
> Regards,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>

Wednesday, March 7, 2012

hierarchical output

I have a Table with 2 columns 1)Parent column-ASSEMBLY_ID and 2)child
column-COMPONENT_ID
I want the output as a hierarchy given below. Any idea on how to get the
output?(I am using a Stored Procedure on SQL Server 2000 to generate the
output)
CREATE TABLE [dbo].[IPDS_MBOM_INTERFACE]
(
[ASSEMBLY_ID] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
,
[COMPONENT_ID] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
)
----
---
INSERT INTO IPDS_MBOM_INTERFACE (ASSEMBLY_ID, COMPONENT_ID)
VALUES ('320192 - 3', 'AS12438791')
INSERT INTO
IPDS_MBOM_INTERFACE(ASSEMBLY_ID, COMPONENT_ID)
VALUES ('320192 - 3', 'AS12438792')
INSERT INTO
IPDS_MBOM_INTERFACE(ASSEMBLY_ID, COMPONENT_ID)
VALUES ('AS12438792', 'AS12438793')
INSERT INTO
IPDS_MBOM_INTERFACE(ASSEMBLY_ID, COMPONENT_ID)
VALUES ('AS12438793', 'AS12438794')
INSERT INTO
IPDS_MBOM_INTERFACE(ASSEMBLY_ID, COMPONENT_ID)
VALUES ('AS12438794', 'AS12438795')
INSERT INTO
IPDS_MBOM_INTERFACE(ASSEMBLY_ID, COMPONENT_ID)
VALUES ('AS12438794', 'AS12438796')
----
---
EXPECTED OUTPUT WITH HEADINGS
ASSEMBLY_ID LEVEL1 LEVEL2 LEVEL3
LEVEL4
320192 - 3 AS12438791
320192 - 3 AS12438792 AS12438793 AS12438794
AS12438795
320192 - 3 AS12438792 AS12438793 AS12438794
AS12438796http://www.google.com/url?sa=D&q=ht..._qd_14_5yk3.asp
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Nishanth" <cvnishanth@.hotmail.com> schrieb im Newsbeitrag
news:eCZfUHrWFHA.2796@.TK2MSFTNGP09.phx.gbl...
>I have a Table with 2 columns 1)Parent column-ASSEMBLY_ID and 2)child
> column-COMPONENT_ID
> I want the output as a hierarchy given below. Any idea on how to get the
> output?(I am using a Stored Procedure on SQL Server 2000 to generate the
> output)
> CREATE TABLE [dbo].[IPDS_MBOM_INTERFACE]
> (
> [ASSEMBLY_ID] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
> ,
> [COMPONENT_ID] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
> NULL
> )
> ----
--
> ---
> INSERT INTO IPDS_MBOM_INTERFACE (ASSEMBLY_ID, COMPONENT_ID)
> VALUES ('320192 - 3', 'AS12438791')
> INSERT INTO
> IPDS_MBOM_INTERFACE(ASSEMBLY_ID, COMPONENT_ID)
> VALUES ('320192 - 3', 'AS12438792')
> INSERT INTO
> IPDS_MBOM_INTERFACE(ASSEMBLY_ID, COMPONENT_ID)
> VALUES ('AS12438792', 'AS12438793')
> INSERT INTO
> IPDS_MBOM_INTERFACE(ASSEMBLY_ID, COMPONENT_ID)
> VALUES ('AS12438793', 'AS12438794')
> INSERT INTO
> IPDS_MBOM_INTERFACE(ASSEMBLY_ID, COMPONENT_ID)
> VALUES ('AS12438794', 'AS12438795')
> INSERT INTO
> IPDS_MBOM_INTERFACE(ASSEMBLY_ID, COMPONENT_ID)
> VALUES ('AS12438794', 'AS12438796')
> ----
--
> ---
> EXPECTED OUTPUT WITH HEADINGS
> ASSEMBLY_ID LEVEL1 LEVEL2 LEVEL3
> LEVEL4
> 320192 - 3 AS12438791
> 320192 - 3 AS12438792 AS12438793 AS12438794
> AS12438795
> 320192 - 3 AS12438792 AS12438793 AS12438794
> AS12438796
>
>|||Try:
SELECT
a.assembly_id,
a.component_id AS level1,
b.component_id AS level2,
c.component_id AS level3,
d.component_id AS level4
FROM #ipds_mbom_interface a
LEFT JOIN #ipds_mbom_interface b ON a.component_id = b.assembly_id
LEFT JOIN #ipds_mbom_interface c ON b.component_id = c.assembly_id
LEFT JOIN #ipds_mbom_interface d ON c.component_id = d.assembly_id
WHERE NOT EXISTS
(
-- Record is root parent, ie has children but no parent ids above it
SELECT *
FROM #ipds_mbom_interface
WHERE component_id = a.assembly_id
)
This query works for your sample data, you'll need to make sure it works for
your real data!
Let me know how you get on.
Damien
"Nishanth" wrote:

> I have a Table with 2 columns 1)Parent column-ASSEMBLY_ID and 2)child
> column-COMPONENT_ID
> I want the output as a hierarchy given below. Any idea on how to get the
> output?(I am using a Stored Procedure on SQL Server 2000 to generate the
> output)
> CREATE TABLE [dbo].[IPDS_MBOM_INTERFACE]
> (
> [ASSEMBLY_ID] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
> ,
> [COMPONENT_ID] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
> )
> ----
--
> ---
> INSERT INTO IPDS_MBOM_INTERFACE (ASSEMBLY_ID, COMPONENT_ID)
> VALUES ('320192 - 3', 'AS12438791')
> INSERT INTO
> IPDS_MBOM_INTERFACE(ASSEMBLY_ID, COMPONENT_ID)
> VALUES ('320192 - 3', 'AS12438792')
> INSERT INTO
> IPDS_MBOM_INTERFACE(ASSEMBLY_ID, COMPONENT_ID)
> VALUES ('AS12438792', 'AS12438793')
> INSERT INTO
> IPDS_MBOM_INTERFACE(ASSEMBLY_ID, COMPONENT_ID)
> VALUES ('AS12438793', 'AS12438794')
> INSERT INTO
> IPDS_MBOM_INTERFACE(ASSEMBLY_ID, COMPONENT_ID)
> VALUES ('AS12438794', 'AS12438795')
> INSERT INTO
> IPDS_MBOM_INTERFACE(ASSEMBLY_ID, COMPONENT_ID)
> VALUES ('AS12438794', 'AS12438796')
> ----
--
> ---
> EXPECTED OUTPUT WITH HEADINGS
> ASSEMBLY_ID LEVEL1 LEVEL2 LEVEL3
> LEVEL4
> 320192 - 3 AS12438791
> 320192 - 3 AS12438792 AS12438793 AS12438794
> AS12438795
> 320192 - 3 AS12438792 AS12438793 AS12438794
> AS12438796
>
>|||Damien,
The problem is the data that I had sent is for 4 levels
but in reality I will have 'n' levels so the query you have sent may not
suit my needs completely.
"Damien" <Damien@.discussions.microsoft.com> wrote in message
news:D8C8A4BF-71BF-4440-A32A-DC52A27CFF8D@.microsoft.com...
> Try:
> SELECT
> a.assembly_id,
> a.component_id AS level1,
> b.component_id AS level2,
> c.component_id AS level3,
> d.component_id AS level4
> FROM #ipds_mbom_interface a
> LEFT JOIN #ipds_mbom_interface b ON a.component_id = b.assembly_id
> LEFT JOIN #ipds_mbom_interface c ON b.component_id = c.assembly_id
> LEFT JOIN #ipds_mbom_interface d ON c.component_id = d.assembly_id
> WHERE NOT EXISTS
> (
> -- Record is root parent, ie has children but no parent ids above it
> SELECT *
> FROM #ipds_mbom_interface
> WHERE component_id = a.assembly_id
> )
> This query works for your sample data, you'll need to make sure it works
for
> your real data!
> Let me know how you get on.
>
> Damien
> "Nishanth" wrote:
>
NULL
NULL
> ----
--
> ----
--|||Get a copy of TRESS & HIERARCHIES IN SQL. UYouc an use the nested sets
model and do this in one query without any proprietary code.|||I'm sure the others will tell me off for doing this, but try the following
script:
DECLARE @.select VARCHAR( 8000 )
DECLARE @.from VARCHAR( 8000 )
DECLARE @.where VARCHAR( 8000 )
DECLARE @.alias1 VARCHAR( 3 )
DECLARE @.alias2 VARCHAR( 3 )
DECLARE @.i TINYINT
-- Initialise
SET @.i = 1
SET @.alias1 = 1 -- will be used for table aliases
SET @.alias2 = @.alias1 + 1
SET @.select =
'SELECT
t1.assembly_id,
t1.component_id AS level1,
'
SET @.from =
'FROM #ipds_mbom_interface t1'
-- Add required levels
WHILE @.i < 99
BEGIN
-- Build SELECT clause
SET @.select = @.select + SPACE(4) +
't' + @.alias2 + '.component_id AS level' + CONVERT( VARCHAR(2), @.i + 1 )
+ ', ' + CHAR( 10 )
-- Build FROM clause
SET @.from = @.from + CHAR( 10 ) + SPACE(4) +
'LEFT JOIN #ipds_mbom_interface t' + @.alias2 + ' ON t' + @.alias1 +
'.component_id = t' + @.alias2 + '.assembly_id'
-- Increment variables
SET @.i = @.i + 1
SET @.alias1 = @.alias1 + 1
SET @.alias2 = @.alias1 + 1
END
-- Trim last comma and trailing space
SET @.select = SUBSTRING( @.select, 1, LEN( @.select ) - 3 ) + CHAR(10)
-- Add WHERE clause
SET @.where =
'
WHERE NOT EXISTS
(
-- Record is root assembly_id, ie has component_idren but no assembly_id
ids above it
SELECT *
FROM #ipds_mbom_interface
WHERE component_id = t1.assembly_id
)
'
-- Print the dynamic SQL
-- PRINT @.select + @.from + @.where
-- Execute the dynamic SQL
EXEC( @.select + @.from + @.where )
Practically, you shouldn't really be doing something like this for so many
reasons, but let me know how you get on.
Damien
"Nishanth" wrote:

> Damien,
> The problem is the data that I had sent is for 4 levels
> but in reality I will have 'n' levels so the query you have sent may not
> suit my needs completely.
> "Damien" <Damien@.discussions.microsoft.com> wrote in message
> news:D8C8A4BF-71BF-4440-A32A-DC52A27CFF8D@.microsoft.com...
> for
> NULL
> NULL
> --
> --
>
>

Sunday, February 26, 2012

Hiding tables in a report

Hi,

Can anyone help me with the expression I need to use in order to hide a table with no rows? I have put my table inside a rectangle with the idea that I would just hide the rectangle if there weren't any rows but I can't find any examples of what expression I can use to specify the no rows condition.

Thanks!

Debi

Something like for the Hidden property of the rectangle:

=iif(RowCount("NameofDatasetPopulatingTheTabe") > 0, "false", "true")|||

Andy,

Thanks for the posting. RowCount doesn't work for me (unrecognized identifier). That may be because I am using the ReportViewer control in an ASP page and not actually using SQL Server Reporting Services. I probably should have included that in my original posting. Also, if it makes a difference this is a subreport that is using a filter based on a parameter passed from the main report. I'm not sure if that will makes a difference but the datasource will usually have records but a table may not have any rows due to the filter. I want to eliminate the header that gets displayed when there are no rows to show.

Thanks!

Debi

|||

I have made some progress on this. The correct syntax is:

=IIf(CountRows("table1") > 0, false, true)

I added this to the visibility of the table and it does hide the table header if there aren't any rows. The only problem is that it still leaves the white space that would have been occupied by the table header. I had read some tips about creating a rectangle and then moving the table into the rectangle and setting the visibility for the rectangle but I can't get it to work. If I use the same expression I get the following error:

Error 1 The Hidden expression for the rectangle ‘rectangle1’ has a scope parameter that is not valid for an aggregate function. The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a data set.

It seems that table1 is out of scope in this instance but I can't figure out how the scope should be defined. Any one have any suggestions?

Also, will this even accomplish what I want (eliminating the whitespace)? This rectangle/table is in a subreport if that makes any difference.

Thanks!

Debi

|||You can use the same logic for a rectangle, but your scope parameter needs to be the name of the dataset, not the name of the table.

So if your table uses a dataset like "MyDataSet", then use that instead of "table1". The Rectangle will be aware of that scope.|||

Just thought I would mention that there is also the ability to set a message when a table has no rows. This automatically hides the table and displays your message. Setting the "No Rows" property expression to = "" will also hide the table with no message.

Simone