Critical issue - need help please

  • we're using SQL 2005 and running old VB 6 application. In this application we have a button that say "Create PO from this Quote" this button creates a New PO in the SQL database based on the current Quote.

    The problem is that when we hit this button for a particular Quote then application seems hang and after 20 seconds or more it starts working and during the hang period we noticed that there are thousands of PO with the same number created in SQL database that we need to remove manually.

    Please note that this is happhappeningh one particular Quote only and that we're using this application since 2001

    with no issue at all.

    Any help please.

    Regards

  • Hi, welcome to SQL Server Central.

    Unfortunately, you didn't give enough details for someone to help you out.

    You need provide code or at least the actions that are followed by the button "Create PO" (I hope PO is purchase order because you might not be creating Post Offices or Pacific Oceans).

    Remember that every problem is different and people in here can't read minds or see what you see.

    I hope that you can explain your problem in a more detailed way so you can get help;-)

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • aamir.a4 (10/16/2012)


    we're using SQL 2005 and running old VB 6 application. In this application we have a button that say "Create PO from this Quote" this button creates a New PO in the SQL database based on the current Quote.

    The problem is that when we hit this button for a particular Quote then application seems hang and after 20 seconds or more it starts working and during the hang period we noticed that there are thousands of PO with the same number created in SQL database that we need to remove manually.

    Please note that this is happhappeningh one particular Quote only and that we're using this application since 2001

    with no issue at all.

    Any help please.

    Regards

    Use profiler to trace sql code that this application sent to sql server, and I'm afraid that in 99% the bug is in application not in SQL Server

  • I suspect this is a performance problem at the root, the 'hang' sounds like a query that's now running far too slow because of data volume, lack of maintenance or one of several other things.

    Identify the slow code, tune it. Repeat until performance is acceptable.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Create a unique constraint on the PO number

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Dear All,

    Thanks much for all your prompt replies, most appreciated.

    We noticed that user entered "*" (asterisk) in the beginning of some data fields that we have removed manually and recreate the PO and it went fine this time. Though not sure why but it seems that the issue is resolved.

    Thanks again.

    Best regards,

  • aamir.a4 (10/16/2012)


    Dear All,

    Thanks much for all your prompt replies, most appreciated.

    We noticed that user entered "*" (asterisk) in the beginning of some data fields that we have removed manually and recreate the PO and it went fine this time. Though not sure why but it seems that the issue is resolved.

    Thanks again.

    Best regards,

    Are you using the content of those fields to build criteria from?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply