473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ASP and SQL issues

I am running SQL Server 2000/W2K advance server/Dual proc/4gig Ram. We have a
ASP.Net/C# application/IIS6 that queries this database. Whenever we update or
insert the same record by pressing a "Save" button or the "Activate" button
simultaneously from the app it seems like the connection string to SQL gets
disconnected and throws an occasional "timeout or deadlock". It doesn't
happen on the same operation. It is very sporadic. The errors are different
each time whick makes me believe that there is an issue with the app's
connection to SQL. The asp app does not use stored procedures. What is the
best methodology to troubleshoot this? Start with SQL profiler? How about on
the asp side? I can't post the actual errors because there are too many of
them and very sporadic. Any insights highly appreciated.

Feb 16 '07 #1
6 1168
Are you using Trusted Connections or just standard SQL username/password?

I wouldn't mnid seeing some of your data access code. This could be related
to improperly disposing/referecing resources or something. When I close my
eyes I see static variables all over the place.

SQL Profiler is good. Enterprise Manager also has some tools to monitor
deadlocks, user activity and connections.

Are the processes log running? Are you specifying any lock modifiers in your
queries? Does it only happen when the system is under load?

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"morphius" <mo******@discussions.microsoft.comwrote in message
news:78**********************************@microsof t.com...
>I am running SQL Server 2000/W2K advance server/Dual proc/4gig Ram. We have
a
ASP.Net/C# application/IIS6 that queries this database. Whenever we update
or
insert the same record by pressing a "Save" button or the "Activate"
button
simultaneously from the app it seems like the connection string to SQL
gets
disconnected and throws an occasional "timeout or deadlock". It doesn't
happen on the same operation. It is very sporadic. The errors are
different
each time whick makes me believe that there is an issue with the app's
connection to SQL. The asp app does not use stored procedures. What is the
best methodology to troubleshoot this? Start with SQL profiler? How about
on
the asp side? I can't post the actual errors because there are too many of
them and very sporadic. Any insights highly appreciated.
Feb 16 '07 #2
CLOSE your connections.

CLOSE your IDataReaders.

...

Better yet,

Either download
Data Access Application Block 2.0 (sql server specific)
or
Enterprise.Library.Data ( sql server and other rdbms)

and let that code take care of the best practices for you.
Even with those, you need to
CLOSE your IDataReaders.

If you don't ..... you don't allow others to use the available connections.

Look up Connection Pooling ..... it'll get you started.


"morphius" <mo******@discussions.microsoft.comwrote in message
news:78**********************************@microsof t.com...
I am running SQL Server 2000/W2K advance server/Dual proc/4gig Ram. We
have a
ASP.Net/C# application/IIS6 that queries this database. Whenever we update
or
insert the same record by pressing a "Save" button or the "Activate"
button
simultaneously from the app it seems like the connection string to SQL
gets
disconnected and throws an occasional "timeout or deadlock". It doesn't
happen on the same operation. It is very sporadic. The errors are
different
each time whick makes me believe that there is an issue with the app's
connection to SQL. The asp app does not use stored procedures. What is the
best methodology to troubleshoot this? Start with SQL profiler? How about
on
the asp side? I can't post the actual errors because there are too many of
them and very sporadic. Any insights highly appreciated.

Feb 16 '07 #3
Hi Karl,
we are using username password on SQL and Integrated Security=SSPI on
web.config. The processes log are running, there are no lock modifiers, and
it happens only when two or more users are hitting the same exact button on
the app at the same time. For example, we have three testers that will hit
the same "OK" button to enter the same customer information. What are you
suggesting on static variables? Any example on this? for every sqlconn.open
we will have a .dispose and .close . Any help is appreciated.
"Karl Seguin [MVP]" wrote:
Are you using Trusted Connections or just standard SQL username/password?

I wouldn't mnid seeing some of your data access code. This could be related
to improperly disposing/referecing resources or something. When I close my
eyes I see static variables all over the place.

SQL Profiler is good. Enterprise Manager also has some tools to monitor
deadlocks, user activity and connections.

Are the processes log running? Are you specifying any lock modifiers in your
queries? Does it only happen when the system is under load?

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"morphius" <mo******@discussions.microsoft.comwrote in message
news:78**********************************@microsof t.com...
I am running SQL Server 2000/W2K advance server/Dual proc/4gig Ram. We have
a
ASP.Net/C# application/IIS6 that queries this database. Whenever we update
or
insert the same record by pressing a "Save" button or the "Activate"
button
simultaneously from the app it seems like the connection string to SQL
gets
disconnected and throws an occasional "timeout or deadlock". It doesn't
happen on the same operation. It is very sporadic. The errors are
different
each time whick makes me believe that there is an issue with the app's
connection to SQL. The asp app does not use stored procedures. What is the
best methodology to troubleshoot this? Start with SQL profiler? How about
on
the asp side? I can't post the actual errors because there are too many of
them and very sporadic. Any insights highly appreciated.
Feb 16 '07 #4
for every sqlconn.open we will have a .dispose and .close

"sloan" wrote:
CLOSE your connections.

CLOSE your IDataReaders.

...

Better yet,

Either download
Data Access Application Block 2.0 (sql server specific)
or
Enterprise.Library.Data ( sql server and other rdbms)

and let that code take care of the best practices for you.
Even with those, you need to
CLOSE your IDataReaders.

If you don't ..... you don't allow others to use the available connections.

Look up Connection Pooling ..... it'll get you started.


"morphius" <mo******@discussions.microsoft.comwrote in message
news:78**********************************@microsof t.com...
I am running SQL Server 2000/W2K advance server/Dual proc/4gig Ram. We
have a
ASP.Net/C# application/IIS6 that queries this database. Whenever we update
or
insert the same record by pressing a "Save" button or the "Activate"
button
simultaneously from the app it seems like the connection string to SQL
gets
disconnected and throws an occasional "timeout or deadlock". It doesn't
happen on the same operation. It is very sporadic. The errors are
different
each time whick makes me believe that there is an issue with the app's
connection to SQL. The asp app does not use stored procedures. What is the
best methodology to troubleshoot this? Start with SQL profiler? How about
on
the asp side? I can't post the actual errors because there are too many of
them and very sporadic. Any insights highly appreciated.


Feb 16 '07 #5
Can we see any sample DAL code?

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"morphius" <mo******@discussions.microsoft.comwrote in message
news:46**********************************@microsof t.com...
Hi Karl,
we are using username password on SQL and Integrated Security=SSPI on
web.config. The processes log are running, there are no lock modifiers,
and
it happens only when two or more users are hitting the same exact button
on
the app at the same time. For example, we have three testers that will hit
the same "OK" button to enter the same customer information. What are you
suggesting on static variables? Any example on this? for every
sqlconn.open
we will have a .dispose and .close . Any help is appreciated.
"Karl Seguin [MVP]" wrote:
>Are you using Trusted Connections or just standard SQL username/password?

I wouldn't mnid seeing some of your data access code. This could be
related
to improperly disposing/referecing resources or something. When I close
my
eyes I see static variables all over the place.

SQL Profiler is good. Enterprise Manager also has some tools to monitor
deadlocks, user activity and connections.

Are the processes log running? Are you specifying any lock modifiers in
your
queries? Does it only happen when the system is under load?

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"morphius" <mo******@discussions.microsoft.comwrote in message
news:78**********************************@microso ft.com...
>I am running SQL Server 2000/W2K advance server/Dual proc/4gig Ram. We
have
a
ASP.Net/C# application/IIS6 that queries this database. Whenever we
update
or
insert the same record by pressing a "Save" button or the "Activate"
button
simultaneously from the app it seems like the connection string to SQL
gets
disconnected and throws an occasional "timeout or deadlock". It doesn't
happen on the same operation. It is very sporadic. The errors are
different
each time whick makes me believe that there is an issue with the app's
connection to SQL. The asp app does not use stored procedures. What is
the
best methodology to troubleshoot this? Start with SQL profiler? How
about
on
the asp side? I can't post the actual errors because there are too many
of
them and very sporadic. Any insights highly appreciated.
Feb 16 '07 #6
you are probably getting a deadlock. this is a expected occurrence in a
multiuser db (it can happen any time queries/transactions use more than
1 table). the standard approach is to detect the deadlock, sleep a
random amount of time and try again.

if you get too many deadlocks, then you need to change your schema, or
sql code.
-- bruce (sqlwork.com)
morphius wrote:
I am running SQL Server 2000/W2K advance server/Dual proc/4gig Ram. We have a
ASP.Net/C# application/IIS6 that queries this database. Whenever we update or
insert the same record by pressing a "Save" button or the "Activate" button
simultaneously from the app it seems like the connection string to SQL gets
disconnected and throws an occasional "timeout or deadlock". It doesn't
happen on the same operation. It is very sporadic. The errors are different
each time whick makes me believe that there is an issue with the app's
connection to SQL. The asp app does not use stored procedures. What is the
best methodology to troubleshoot this? Start with SQL profiler? How about on
the asp side? I can't post the actual errors because there are too many of
them and very sporadic. Any insights highly appreciated.
Feb 16 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tom Loredo | last post by:
Hi folks- I'm about to move from a Solaris 8/SPARC environment to a Dell running RedHat 9. Are there any issues I need to be aware of in bringing my Python code over (mostly scientific...
28
by: grahamd | last post by:
Who are the appropriate people to report security problems to in respect of a module included with the Python distribution? I don't feel it appropriate to be reporting it on general mailing lists.
5
by: sandy | last post by:
Hi All, I am a newbie to MySQL and Python. At the first place, I would like to know what are the general performance issues (if any) of using MySQL with Python. By performance, I wanted to...
2
by: malcolm | last post by:
Hello, We have a robust (.NET 1.1 c# winforms) client-server application that utilizes many typed DataSets, typed DataTables and typed DataRows. Our application is a series of windows and popup...
1
by: Aliandro | last post by:
Hi Does any one know where I can find information regarding any issues with SQL and IIS being run under windows XP SP2? as I am in the process of programmning in Dot net and neet some way of...
7
by: David Laub | last post by:
I have stumbled across various Netscape issues, none of which appear to be solvable by tweaking the clientTarget or targetSchema properties. At this point, I'm not even interested in "solving"...
2
by: G2 | last post by:
Hi We are dealing with significant browser compatibility issues with Netscape 5.x+ browsers and Mac IE. I am sure most web developers have faced similar issues in the past. Can anyone give me their...
1
by: GaryDean | last post by:
We have been developing all of our .net applications on 32 bit windows using 32 bit SQL Server. We are being asked to now deploy to servers running 64bit windows and 64bit SQL Server. Are there...
3
by: eschneider | last post by:
Just some common issues with WS: Using custom objects: When objects change, seems you are always fixing some issue. Update references, which sometimes does not work. Deployment: Weird errors...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.