473,466 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

shared server issue?

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?
Jul 20 '05 #1
4 1861
(in*********@yahoo.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
Jul 20 '05 #2
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.
Jul 20 '05 #3
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*********@yahoo.com> wrote in message
news:15**************************@posting.google.c om...
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.

Jul 20 '05 #4
(in*********@yahoo.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
Jul 20 '05 #5

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

Similar topics

1
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...
0
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
10
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...
11
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...
5
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...
1
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...
5
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...
0
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...
4
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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
tracyyun
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...
0
isladogs
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.