Showing posts with label store. Show all posts
Showing posts with label store. Show all posts

Monday, March 26, 2012

Prblem to store XML result into an output veriable on SQL 2000

Hi,

I want to store the result of the query

SELECT * FROM Customer FOR XML AUTO,ELEMENTS

Into an output veriable. How will I do this in SQL Server 2000?

I've tried this in simple way like

declare @.x varchar(1000)

set @.x = (select * from customer for xml auto,elements)

select @.x

This is perfectly working in SQL 2005 but throwing error in 2000

also in I've tried this using cursor, TempTable on SQL Server 2000.

Please help me.

You can't able to do this in SQL Server 2000. In SQL Server 2000 we don't have XML datatype. It is introduced from SQL Server 2005 only.

The only possible solution is manullay concatinating the values, but it is very expensive and there is char length limitation (8000) may cause truncation of your data.

|||

Thank you very much.

Prblem to store XML result into an output veriable on SQL 2000

Hi,

I want to store the result of the query

SELECT * FROM Customer FOR XML AUTO,ELEMENTS

Into an output veriable. How will I do this in SQL Server 2000?

I've tried this in simple way like

declare @.x varchar(1000)

set @.x = (select * from customer for xml auto,elements)

select @.x

This is perfectly working in SQL 2005 but throwing error in 2000

also in I've tried this using cursor, TempTable on SQL Server 2000.

Please help me.

You can't able to do this in SQL Server 2000. In SQL Server 2000 we don't have XML datatype. It is introduced from SQL Server 2005 only.

The only possible solution is manullay concatinating the values, but it is very expensive and there is char length limitation (8000) may cause truncation of your data.

|||

Thank you very much.

Prbblems with a Process.

Hi, i have a store procedure that takes about 20 minutes to execute.
Today i want to execute the same process and it takes more than two
hours and the process doesnt finish.
I restart the server twice, and the problem persist.
What do you recommend to me to check and found the reason that the
process take more time.
Thanks a lot for your help!.
*** Sent via Developersdex http://www.codecomments.com ***Have you tried reindexing the underlying tables or running an UPDATE
STATISTICS on them? That might solve your issue. Do you have regular
maintenance routines setup for this server?
Also, check the execution plan and see if you see anything out of the
ordinary.
MeanOldDBA
derrickleggett@.hotmail.com
http://weblogs.sqlteam.com/derrickl
When life gives you a lemon, fire the DBA.
"MariaGuzman" wrote:

> Hi, i have a store procedure that takes about 20 minutes to execute.
> Today i want to execute the same process and it takes more than two
> hours and the process doesn4t finish.
> I restart the server twice, and the problem persist.
> What do you recommend to me to check and found the reason that the
> process take more time.
> Thanks a lot for your help!.
> *** Sent via Developersdex http://www.codecomments.com ***
>|||Hi Maria,
Do u have indexes created on that table.Try reindexing.
If the problem persists just recreate ur stored procedure.
Run the Profilor and see what is happening at the back.
or Enable C2 auditing feature to trace all the activities.
HTH
from
Doller|||In addition to checking the execution plan, also blocking can be the cause.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"MariaGuzman" <marisa@.devdex.com> wrote in message news:eXUUOnsyFHA.3588@.tk2msftngp13.phx.gb
l...
> Hi, i have a store procedure that takes about 20 minutes to execute.
> Today i want to execute the same process and it takes more than two
> hours and the process doesnt finish.
> I restart the server twice, and the problem persist.
> What do you recommend to me to check and found the reason that the
> process take more time.
> Thanks a lot for your help!.
> *** Sent via Developersdex http://www.codecomments.com ***

Prbblems with a Process.

Hi, i have a store procedure that takes about 20 minutes to execute.
Today i want to execute the same process and it takes more than two
hours and the process doesnt finish.
I restart the server twice, and the problem persist.
What do you recommend to me to check and found the reason that the
process take more time.
Thanks a lot for your help!.
*** Sent via Developersdex http://www.codecomments.com ***
Have you tried reindexing the underlying tables or running an UPDATE
STATISTICS on them? That might solve your issue. Do you have regular
maintenance routines setup for this server?
Also, check the execution plan and see if you see anything out of the
ordinary.
MeanOldDBA
derrickleggett@.hotmail.com
http://weblogs.sqlteam.com/derrickl
When life gives you a lemon, fire the DBA.
"MariaGuzman" wrote:

> Hi, i have a store procedure that takes about 20 minutes to execute.
> Today i want to execute the same process and it takes more than two
> hours and the process doesn4t finish.
> I restart the server twice, and the problem persist.
> What do you recommend to me to check and found the reason that the
> process take more time.
> Thanks a lot for your help!.
> *** Sent via Developersdex http://www.codecomments.com ***
>
|||Hi Maria,
Do u have indexes created on that table.Try reindexing.
If the problem persists just recreate ur stored procedure.
Run the Profilor and see what is happening at the back.
or Enable C2 auditing feature to trace all the activities.
HTH
from
Doller
|||In addition to checking the execution plan, also blocking can be the cause.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"MariaGuzman" <marisa@.devdex.com> wrote in message news:eXUUOnsyFHA.3588@.tk2msftngp13.phx.gbl...
> Hi, i have a store procedure that takes about 20 minutes to execute.
> Today i want to execute the same process and it takes more than two
> hours and the process doesnt finish.
> I restart the server twice, and the problem persist.
> What do you recommend to me to check and found the reason that the
> process take more time.
> Thanks a lot for your help!.
> *** Sent via Developersdex http://www.codecomments.com ***
sql

Prbblems with a Process.

Hi, i have a store procedure that takes about 20 minutes to execute.
Today i want to execute the same process and it takes more than two
hours and the process doesn´t finish.
I restart the server twice, and the problem persist.
What do you recommend to me to check and found the reason that the
process take more time.
Thanks a lot for your help!.
*** Sent via Developersdex http://www.developersdex.com ***Have you tried reindexing the underlying tables or running an UPDATE
STATISTICS on them? That might solve your issue. Do you have regular
maintenance routines setup for this server?
Also, check the execution plan and see if you see anything out of the
ordinary.
--
MeanOldDBA
derrickleggett@.hotmail.com
http://weblogs.sqlteam.com/derrickl
When life gives you a lemon, fire the DBA.
"MariaGuzman" wrote:
> Hi, i have a store procedure that takes about 20 minutes to execute.
> Today i want to execute the same process and it takes more than two
> hours and the process doesn4t finish.
> I restart the server twice, and the problem persist.
> What do you recommend to me to check and found the reason that the
> process take more time.
> Thanks a lot for your help!.
> *** Sent via Developersdex http://www.developersdex.com ***
>|||Hi Maria,
Do u have indexes created on that table.Try reindexing.
If the problem persists just recreate ur stored procedure.
Run the Profilor and see what is happening at the back.
or Enable C2 auditing feature to trace all the activities.
HTH
from
Doller|||In addition to checking the execution plan, also blocking can be the cause.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"MariaGuzman" <marisa@.devdex.com> wrote in message news:eXUUOnsyFHA.3588@.tk2msftngp13.phx.gbl...
> Hi, i have a store procedure that takes about 20 minutes to execute.
> Today i want to execute the same process and it takes more than two
> hours and the process doesn´t finish.
> I restart the server twice, and the problem persist.
> What do you recommend to me to check and found the reason that the
> process take more time.
> Thanks a lot for your help!.
> *** Sent via Developersdex http://www.developersdex.com ***

Wednesday, March 21, 2012

Postage Calculation goes where?

When a customer proceeds to the checkout of the store I'm working on, the customer's ID is sent to a database stored procedure which returns the details of the order based on the shopping cart and customer account details stored in the database.

Should I have the stored procedure calculate the postage and packing for the order or should I wait till the order details are returned to the asp.net code, do some calculations, and then update the order?

Having this code in the asp.net page would not only require a trip to the server to do the update but also a trip to retrieve p&p information used for the calculations. These extra trips are my concern.

Any thoughts?::These extra trips are my concern.

Why? Are you working for Amazon?

How many hundred CHECKOUTS do you have per minute?

IMHO this is a non-issue, at least with some caching.