We've been running a database on a shared server. The traffic on our
site has been picking up steadily and it seems as though we're running
into sporadic downtime on the database. Sometimes when we do large
data imports, the transaction log fills up and the schema somehow
fails to truncate it when asked to back it up. So we run the explicit
truncate statement and that usually seems to fix the problem. A few
days ago a single stored procedure started to block, but inexplicably
only when called by our .NET server. When called by hand from
Enterprise Manager, it executed fine. I was at my wits end when I
just recreated it with the same exact code and it magically started
working again. What gives? Is this at all indicative of a shared
database, or are these known SQL Server issues? 4 1892
(in*********@ya hoo.com) writes: We've been running a database on a shared server. The traffic on our site has been picking up steadily and it seems as though we're running into sporadic downtime on the database. Sometimes when we do large data imports, the transaction log fills up and the schema somehow fails to truncate it when asked to back it up. So we run the explicit truncate statement and that usually seems to fix the problem. A few days ago a single stored procedure started to block, but inexplicably only when called by our .NET server. When called by hand from Enterprise Manager, it executed fine. I was at my wits end when I just recreated it with the same exact code and it magically started working again. What gives? Is this at all indicative of a shared database, or are these known SQL Server issues?
There is not much information in your post to determine what the problem
might be.
When you say "shared server", I suppose you mean that here are other
databases on the same server, used by other applications. What kind
of server is this? Is in this an in-house server at some corporation,
or do you rent space at a service provider? Not that the answers to
these questions are pertinent to the problem, but it could your
affect your possibilities to diagnose the problems.
When you say that the log faile to truncate, what commands do you use?
And which recovery mode are you using?
One reason for the log not truncating could be that there is an open
transaction in the database. SQL Server never truncates the long
past the oldest open transaction.
Indeed, an open transaction could also be the answer to the blocking
problem. But you need to diagnose the blocking situations better, to
find out what is blocking. A simple variant is to use sp_who and look
at the Blk column. A non-zero value in the column for a spid, means
that that spid is blocked by the spid in the column. Then you can
use DBCC INPUTBUFFER on that blocking spid to get see what it is up to.
A more elaborate tool is aba_lockinfo, available on my website, http://www.algonet.se/~sommar/sqlutil/aba_lockinfo.html.
The likelyhood that you run into problems because of other applications
on the same server, but in other databases, is not particularly big.
(Unless you are running SQL 6.5.)
--
Erland Sommarskog, SQL Server MVP, so****@algonet. se
Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinf...2000/books.asp
Thank you for your response. I will look into the techniques you
mention. Like you said, I doubt the answers to your questions will
shed much light, but maybe they will, so here it goes: There is not much information in your post to determine what the problem might be.
Unfortunately we don't have a whole lot of information as to what's
actually going on in the database ourselves when problems arise. The
best I can do is see if the server is responding to pings, if we are
connecting to the schema properly, if certain stored procedures return
incorrect results or block given particular parameters. Typically our
woes have to do with our web app not connecting to the schema or the
transaction log filling up and not truncating.
When you say "shared server", I suppose you mean that here are other databases on the same server, used by other applications. What kind of server is this? Is in this an in-house server at some corporation, or do you rent space at a service provider?
Yes, we are one schema out of many set up on one big SQL Server 8
machine. Our .NET runs in IIS on a Win 2000 server and connects to
the database to run the site. Nothing fancy here. Both machines are
hosted by a hosting company. our IIS server is dedicated and the
database server, as I mentioned, is shared.
When you say that the log faile to truncate, what commands do you use? And which recovery mode are you using?
Typically our transaction log fills up when we do large data imports.
When that happens, I use Enterprise Manager to back up its transaction
log with the idea that it normally truncates it after the back-up is
successful. Sometimes it backs up, but the transaction log is not
truncated. I believe what you said about an open transaction makes a
lot of sense. Next time this happens, I will look at what's open.
Our band-aid solution to force the log to truncate has been to run
DBCC SHRINKFILE command, which normally does the trick.
Hi
To add to Erlands response
When you call the procedure though your application, there is probably a
transaction already in progress, this will not be the case when you call it
from Query Analyser. You may want to look at using profiler to see when
transactions are started and finished.
John
<in*********@ya hoo.com> wrote in message
news:15******** *************** ***@posting.goo gle.com... Thank you for your response. I will look into the techniques you mention. Like you said, I doubt the answers to your questions will shed much light, but maybe they will, so here it goes:
There is not much information in your post to determine what the problem might be.
Unfortunately we don't have a whole lot of information as to what's actually going on in the database ourselves when problems arise. The best I can do is see if the server is responding to pings, if we are connecting to the schema properly, if certain stored procedures return incorrect results or block given particular parameters. Typically our woes have to do with our web app not connecting to the schema or the transaction log filling up and not truncating.
When you say "shared server", I suppose you mean that here are other databases on the same server, used by other applications. What kind of server is this? Is in this an in-house server at some corporation, or do you rent space at a service provider?
Yes, we are one schema out of many set up on one big SQL Server 8 machine. Our .NET runs in IIS on a Win 2000 server and connects to the database to run the site. Nothing fancy here. Both machines are hosted by a hosting company. our IIS server is dedicated and the database server, as I mentioned, is shared.
When you say that the log faile to truncate, what commands do you use? And which recovery mode are you using?
Typically our transaction log fills up when we do large data imports. When that happens, I use Enterprise Manager to back up its transaction log with the idea that it normally truncates it after the back-up is successful. Sometimes it backs up, but the transaction log is not truncated. I believe what you said about an open transaction makes a lot of sense. Next time this happens, I will look at what's open. Our band-aid solution to force the log to truncate has been to run DBCC SHRINKFILE command, which normally does the trick.
(in*********@ya hoo.com) writes: Yes, we are one schema out of many set up on one big SQL Server 8 machine. Our .NET runs in IIS on a Win 2000 server and connects to the database to run the site. Nothing fancy here. Both machines are hosted by a hosting company. our IIS server is dedicated and the database server, as I mentioned, is shared.
You may need to work with the hosting company to resolve these problems.
I guess that have dbo privieges in your database, but outside it you
are just a plain user. You can still use sp_who and sp_who2 to examine
blocking. You might even be able to install aba_lockinfo in your database
and run it, but the hosting company may not appreciate that. In any case,
you will see a lot of white noise from the other applications running
on the server.
What could be the root to all evil is a stored procedure that times
out for some reason. This timeout is defined in the client layer, not
in SQL Server itself. Say that this stored procedure starts a transaction.
This transaction will not roll back when the time-out sets in, but
you need to have code to handle this.
--
Erland Sommarskog, SQL Server MVP, so****@algonet. se
Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinf...2000/books.asp This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Chris |
last post by:
I try to read a shared directory. This shared directory is on a 2000
server.
When I use DirectoryInfo.Exists, I always have "This directory does
not exist".
If the shared directory is on a Windows XP computer or on a Windows
2000, it works only if I add the same user on all computers.
What do I have to do on Windows 2000 Server if I want to read my
|
by: Peter |
last post by:
When I issue
call sqlj.install_jar('file:///f:/jars/mail.jar','MAIL');
I get the messages
SQL4301N Java or .NET interpreter startup or communication failed,
reason
|
by: BLiTZWiNG |
last post by:
When I try the following:
System.IO.File.Copy("C:\\test_read\\test.txt",
"\\\\192.168.0.5\\test_write\\test.txt", false)
I get an UnauthorizedAccessException.
I cannot however, seem to find out how to authorize the file copy (ie.
process the user/pass).
|
by: Brett |
last post by:
I have an assembly on a shared LAN drive. On my developer machine, I give
that assembly full trust from the .NET wizard. It works fine. I go to a
user machine on the LAN, map to the shared drive, give full trust on that
machine but the assembly doesn't fully work. No errors. The assembly post
data from MS Access to a website. The posting part doesn't work. The
firewall was turned off and still nothing.
Any ideas?
Thanks,
|
by: Dan Lorenz |
last post by:
When trying to use the function CreateDirectory on my local machine
everything works fine but when I upload the page to my webhost I get an issue
that it can't find path on D:\, though D:\ is what my website is found on.
This is an H-SPHERE web cluster host.
From my research I found that this issue is due to ASPNET account not having
read previdgeles on the root of the drive.
My question is what is the correct approach to solve this...
| |
by: lecnac |
last post by:
Sorry for the repost. I must have done something wrong when I tried to post
my reply (I can't seem to find it).
Anyway, I'd really appreciate any help that anyone could provide. My issue
is quickly becoming more and more urgent.
I've tried the code below using the server's local Administrator user name
and password. This gets me past the Access denied error but gives me a User
|
by: Sune |
last post by:
Hi all,
I want to make data stored in-memory (not disk) available to several
processes. My concern is that poorly written C applications with
dangling pointers may(will) damage the data in this memory segment if
it is open to all, i.e. shared memory mapped into all processes memory
area.
I don't want to use TCP/IP client/server between the apps and a data
store process due to the overhead.
|
by: DanWeaver |
last post by:
Hi,
I am going mad with this.
I seem to have some kind of session problem. Login SEEMS to work (and
login event is recorded sucessfuly in DB (MSSQL on shared server)) but
asp pages behave as
if a user isnt logged in ie not showing user name/ logged in views
etc. As behavior is different on this shared server to my local
development environment (VS 2008/ Web Publisher) Im not sure how to
troubleshoot the problem.
|
by: adnanjunk |
last post by:
Hi,
Having a little issue with .htaccess not working on windows server. I
have clean url's setup using the htaccess file, working fine on linux
server. I have researched for a while and found .htaccess doesn't work
on windows. Since this is a shared hosting i don't have access to
httpd.conf so that i can edit it.
I have been reading this forum about it. http://forum.mambo-foundation.org/showthread.php?t=1857
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |