Showing posts with label product. Show all posts
Showing posts with label product. Show all posts

Friday, March 30, 2012

MultiUser Testing Tool

Hello,
We are in process of rolling out our SQL Server version of our product.
During our beta testing phase we have started receiving problems in
scalability from some clients. The database starts doing a lot of blocks in
multi-user environment. This is not always very easy to replicate in-house.
We are now looking for a testing tool that will automate multi-user testing
while also providing useful information such lock chains and analysis of bad
locks (such as holding exclusive table/page locks for too long), etc when
there are blocks. Is there any testing tool that people here have used
before ? Any experiences or comments will be very useful.
Thanx, Amol.
Hi
You may want to look at the dbhammer program that comes with the resource
kit and using profiler to caputure the information. Loadrunner is a more
costly alternative. You can also use profiler to script the functions you
may want to do, if these are segmented then you can chain them together to
produce specific activities.
John
"Amol Kasbekar" <apk@.nospam.com> wrote in message
news:edbWB%23%23eEHA.3100@.TK2MSFTNGP10.phx.gbl...
> Hello,
> We are in process of rolling out our SQL Server version of our
product.
> During our beta testing phase we have started receiving problems in
> scalability from some clients. The database starts doing a lot of blocks
in
> multi-user environment. This is not always very easy to replicate
in-house.
> We are now looking for a testing tool that will automate multi-user
testing
> while also providing useful information such lock chains and analysis of
bad
> locks (such as holding exclusive table/page locks for too long), etc when
> there are blocks. Is there any testing tool that people here have used
> before ? Any experiences or comments will be very useful.
> Thanx, Amol.
>
>

MultiUser Testing Tool

Hello,
We are in process of rolling out our SQL Server version of our product.
During our beta testing phase we have started receiving problems in
scalability from some clients. The database starts doing a lot of blocks in
multi-user environment. This is not always very easy to replicate in-house.
We are now looking for a testing tool that will automate multi-user testing
while also providing useful information such lock chains and analysis of bad
locks (such as holding exclusive table/page locks for too long), etc when
there are blocks. Is there any testing tool that people here have used
before ? Any experiences or comments will be very useful.
Thanx, Amol.Hi
You may want to look at the dbhammer program that comes with the resource
kit and using profiler to caputure the information. Loadrunner is a more
costly alternative. You can also use profiler to script the functions you
may want to do, if these are segmented then you can chain them together to
produce specific activities.
John
"Amol Kasbekar" <apk@.nospam.com> wrote in message
news:edbWB%23%23eEHA.3100@.TK2MSFTNGP10.phx.gbl...
> Hello,
> We are in process of rolling out our SQL Server version of our
product.
> During our beta testing phase we have started receiving problems in
> scalability from some clients. The database starts doing a lot of blocks
in
> multi-user environment. This is not always very easy to replicate
in-house.
> We are now looking for a testing tool that will automate multi-user
testing
> while also providing useful information such lock chains and analysis of
bad
> locks (such as holding exclusive table/page locks for too long), etc when
> there are blocks. Is there any testing tool that people here have used
> before ? Any experiences or comments will be very useful.
> Thanx, Amol.
>
>

MultiUser Testing Tool

Hello,
We are in process of rolling out our SQL Server version of our product.
During our beta testing phase we have started receiving problems in
scalability from some clients. The database starts doing a lot of blocks in
multi-user environment. This is not always very easy to replicate in-house.
We are now looking for a testing tool that will automate multi-user testing
while also providing useful information such lock chains and analysis of bad
locks (such as holding exclusive table/page locks for too long), etc when
there are blocks. Is there any testing tool that people here have used
before ? Any experiences or comments will be very useful.
Thanx, Amol.Hi
You may want to look at the dbhammer program that comes with the resource
kit and using profiler to caputure the information. Loadrunner is a more
costly alternative. You can also use profiler to script the functions you
may want to do, if these are segmented then you can chain them together to
produce specific activities.
John
"Amol Kasbekar" <apk@.nospam.com> wrote in message
news:edbWB%23%23eEHA.3100@.TK2MSFTNGP10.phx.gbl...
> Hello,
> We are in process of rolling out our SQL Server version of our
product.
> During our beta testing phase we have started receiving problems in
> scalability from some clients. The database starts doing a lot of blocks
in
> multi-user environment. This is not always very easy to replicate
in-house.
> We are now looking for a testing tool that will automate multi-user
testing
> while also providing useful information such lock chains and analysis of
bad
> locks (such as holding exclusive table/page locks for too long), etc when
> there are blocks. Is there any testing tool that people here have used
> before ? Any experiences or comments will be very useful.
> Thanx, Amol.
>
>

Monday, March 26, 2012

Multi-Row update trigger

Hi,

I need to update LastReceivedQty and LastReceivedDate fields in the Product table each time a DeliveryNoteDetail entry is created for a PurchaseOrderDetail line.

DeliveryNote -> DeliveryNoteDetail -> PurchaseOrderDetail -> Product

DeliveryNote has the ReceivedDate
DeliveryNoteDetail has the ReceivedQty

I made the following trigger for handling single row updates, which works fine.

UPDATE Purchasing.Product
SET LastReceivedQty = i.ReceivedQty, LastReceivedDate = dn.ReceivedDate
FROM Purchasing.DeliveryNote dn INNER JOIN
Purchasing.DeliveryNoteDetail dnd ON dn.DeliveryNoteID = dnd.DeliveryNoteID INNER JOIN
inserted i ON dnd.DeliveryNoteDetailID = i.DeliveryNoteDetailID INNER JOIN
Purchasing.PurchaseOrderDetail pod ON dnd.PurchaseOrderDetailID = pod.PurchaseOrderDetailID INNER JOIN
Purchasing.Product p ON pod.VendorVendorProductID = p.VendorVendorProductID

Now I don't know how to handle multi-row situations when the same product is updated.
Since I cannot rely on the order that the updates are performed I need to somehow select the MAX(ReceivedDate).Subqueries, perhaps...
UPDATE Purchasing.Product
SET LastReceivedQty = subquery.ReceivedQty,
LastReceivedDate = subquery.ReceivedDate
from Purchasing.DeliveryNote dn
inner join --Subquery
(SELECT dnd.DeliveryNoteID,
sum(i.ReceivedQty) ReceivedQty,
max(dn.ReceivedDate) RecievedDate
FROM Purchasing.DeliveryNoteDetail dnd
INNER JOIN inserted i ON dnd.DeliveryNoteDetailID = i.DeliveryNoteDetailID
INNER JOIN Purchasing.PurchaseOrderDetail pod ON dnd.PurchaseOrderDetailID = pod.PurchaseOrderDetailID
INNER JOIN Purchasing.Product p ON pod.VendorVendorProductID = p.VendorVendorProductID
group by dnd.DeliveryNoteID) Subquery
on dn.DeliveryNoteID = Subquery.DeliveryNoteIDsql

Monday, March 19, 2012

Multiple types of data storing in SQL Server

Hello All,

We are developing customer support application. We will have so many customers after launching this product. But my problem is how will i store data of all these customers in SQL Server. Please suggest me.

You have not provided enough information about the nature of the problem for us to help you find a solution.

Monday, February 20, 2012

Multiple rows into one row

Hello I am wondering if this is possible.

I have a two tables one contains Plan information and another that
contains product information about the plan

ex:
Plan table
PlanID Plan_name
1 a
2 b

Product Table
ProductID PlanID Comments
1 1 com1
2 1 com2
3 1 com3

What I am looking to do if possible would be the following

Plan Product1 Comments1 Product2 Comments2
1 1 com1 2 com2

I am wondering down what path I should explore cause I am new to this.
I am using sql 2005Chicagoboy27 wrote:

Quote:

Originally Posted by

Hello I am wondering if this is possible.
>
I have a two tables one contains Plan information and another that
contains product information about the plan
>
ex:
Plan table
PlanID Plan_name
1 a
2 b
>
Product Table
ProductID PlanID Comments
1 1 com1
2 1 com2
3 1 com3
>
What I am looking to do if possible would be the following
>
Plan Product1 Comments1 Product2 Comments2
1 1 com1 2 com2
>
>
I am wondering down what path I should explore cause I am new to this.
I am using sql 2005


Take a look at PIVOT in Books Online. Also Itzik Ben-Gan has articles
on PIVOT in the last two issues of SQL Server Magazine. www.sqlmag.com
--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/...US,SQL.90).aspx
--|||Thanks I will explore that option...

David Portas wrote:

Quote:

Originally Posted by

Chicagoboy27 wrote:

Quote:

Originally Posted by

Hello I am wondering if this is possible.

I have a two tables one contains Plan information and another that
contains product information about the plan

ex:
Plan table
PlanID Plan_name
1 a
2 b

Product Table
ProductID PlanID Comments
1 1 com1
2 1 com2
3 1 com3

What I am looking to do if possible would be the following

Plan Product1 Comments1 Product2 Comments2
1 1 com1 2 com2

I am wondering down what path I should explore cause I am new to this.
I am using sql 2005


>
Take a look at PIVOT in Books Online. Also Itzik Ben-Gan has articles
on PIVOT in the last two issues of SQL Server Magazine. www.sqlmag.com
>
--
David Portas, SQL Server MVP
>
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
>
SQL Server Books Online:
http://msdn2.microsoft.com/library/...US,SQL.90).aspx
--