Multiple User SPIDs Which Won't Go Away??
May 22, 2001
I have an issue with a server where some users are recieving error messages along the lines of "There are currently 250 connected users etc....". the result of which is that the users sometimes can't connect. The server properties have Current Users set to 250 - I know that I could increase this figure but that doesnt't appear to be the problem.
It would seem that connections appear to stay connected even though the user has finished any server/client transactions. Also there seems to be a huge number of SPIDs even when there are only a handfull of users. Most of the 'Process Details' for these user threads show the following: "IF @@TRANCOUNT > 0 COMMIT TRAN".
What is going on and why are these Process IDs hanging around, sometimes the only option is to reboot the client PCs since trying to kill the processes just makes them reappear a few seconds later?
It could be the 32-bit client application causing it, but these problems are only on one server out of half a dozen.
Any ideas?
Thanks, Derek.
View 2 Replies
ADVERTISEMENT
Jun 1, 2004
I have issued a simple insert statement on table and the statement could not insert a single row into the table.When i check the locks on the tables i found that almost 5000(five thousand) locks on the table for a single user with different SPID(s).
The user is and sql server user(not a windows user) and used to connect to the application.I wanted to disconnect the user from the DB so that all the locks will be freed.But i dunno how to disconnect a user from the DB. I know that i can issue KILL command to Terminate a user process based on the system process ID,but here the same user has nearly 1000 SPIDs.I thought that it would be very big job to kill each and every process and restared the sql server.but i guess its not the correct process to do.
how can i dosconnect a specific user from the DB.
Thanks.
View 1 Replies
View Related
Jul 23, 2005
I wonder if anyone has any hard fact based pro or contra, especially onperformance, about having views as opposed to tables when the object isbeing accessed for read only by multiple sessions/users/spids. I amparticularly concerned about the multiple instantiations of the view.Relevant thoughts on this are much appreciated.Thanks,Caveman
View 1 Replies
View Related
Nov 13, 2007
is there any way to get all the SPID's running a particular Stored Proc?
Thx
Venu
View 3 Replies
View Related
Feb 22, 2001
We have just combined 3 sites into one server.
Two of the sites are serving fine, however one site has spids
that won't disconnect. By the end of the day there are over 600 spids
from that one site. At first we thought it was due to the ASP pages
had a db connect, but nothing that closed that db connection. But after
they modified the pages, we are still having the same problem. Checked
the webserver and they are identical to the other webservers.
Any ideas???
View 1 Replies
View Related
Jan 24, 2008
A developer came over and asked me a couple of things
1. Can C# not cleanup SPIDs and just open new ones lieing around
2. Do a large number of spids, even if they are sleeping, cause performance issues?
3. What's the Max # of spids sql server can handle?
BOL ain't too helpful right now
View 14 Replies
View Related
Jul 23, 2005
SQL Server 2000Just curious - was wondering why some SPIDS are left hanging out therefor up to several weeks. There are no errors or anything. It looks likenormal processing.Thanks,Craig
View 1 Replies
View Related
Oct 19, 2005
Hey guys,
I've recently noticed some strange behaviour with sql server 2000 spid's blocking themselves. The spid will appear to be blocked for short periods of time, and then the block will disappear. I'm not sure how this could occur. It started appearing around the same time as I applied SP4.
If anyone could provide any insight into this, it would be greatly appreciated.
Cheers,
-Kilka
View 7 Replies
View Related
Jul 20, 2005
We are using Merge replication with clients from remote offices (SQL2000, sp3). Recently, I have had a problem with users who arereplicating, and they shut down their laptops. The connection neverdies, and I end up with major blocking issues related to the"orphaned" spid. The tables that are blocked are used to filter dataon each client. Since the orphaned spid is blocking, backups will runforever, and have to be killed, and a SQL management job thatinserts/updates data in these tables has to be killed.If I kill the spid, it shows a rollback at 0% and the status neverchanges. The user has disconnected, and there is really nothing toroll back. How can I get rid of this spid with out restarting SQLserver, or rebooting my server?Any help would be greatly appreciated.Thanks,Amy M
View 1 Replies
View Related
Jan 24, 2008
Hi,
The myComplexProc stored proc does the following in sequence:
1. Call a UDF
2. Call another Stored Proc
3. Make a SELECT with 4 joins
4. Make another SELECT 4 joins + aggregate.
Question1: if myComplexProc is executed on 4-CPUs SQL2K Server, does it start and complete with a single SPID?
Question2: Is SQL2K smart enough to do some sort of parallelism behind the scene? If yes, can it spawn some extra SPIDs? How does it handle lock or sequencing? Because in the hypothetic scenario above Step N+1 re-uses the results of Step N so it has to wait for Step N to complete.
Thanks very much in advance for any help.
View 2 Replies
View Related
Nov 10, 2003
A fellow developer of mine has created a ASP.Net application that executes some fairly complex stored procedures. This application is for all intensive purposes a queue and 3 or 4 people work on processing items in a FIFO type environment. There is logic in the Stored procedures to make sure each worker get a unique entry using a series of query hints.
Well what we are seeing is if these works are moving at a rapid pace and we execute an sp_who2 on the sql server there are entries that that seems to be hanging there and REMAINING there even after a browser is closed or the disposed method has been called on the connection object. Has anyone else experienced something similar to this with an ASP.Net application used by mutiple people?
My inclination is to blame the design of the application, but before I do that and step on my co-workers toes I thought I would throw this out to the group.
Thanks in advance for your input.
View 7 Replies
View Related
Mar 20, 2000
I need a stored proc to kill spids, but the following sproc loops infinitely with the same [correct] spid being printed out. What am I doing wrong?
The select statement, when I execute it via the query grid, returns the correct and finite number of spids.
Any help greatly appreciated.
Judith
CREATE PROCEDURE rasp_KillDBProcess
@dbname varchar(128)
AS
declare @KillSpid smallint
declare @SQL varchar(1000)
--
declare DBCursor cursor Forward_only for SELECT distinct l.spid
FROM master.dbo.syslocks l INNER JOIN
master.dbo.sysdatabases d ON l.dbid = d.dbid
WHERE (d.name = N'coj_pcisdata')
open DBCursor
--
Fetch next from DBCursor into @Killspid
--
While (@@Fetch_status <> -1)
Begin
If (@@Fetch_status <> -2)
begin
print 'spid = ' + cast(@killspid as varchar(12))
--exec ('kill ' + @killspid)
end
--
end
Fetch next from DBCursor into @Killspid
--
close dbcursor
deallocate dbcursor
print 'end'
return
View 1 Replies
View Related
Nov 6, 2015
I've installed the MDW (Mangement Data Warehouse) database on our central monitoring SQL Server. I've then added a number of servers to be monitored. The data is collected on the servers that are being monitored and uploaded to the central MDW Monitoring server.
On the servers that are being monitored, I'm seeing a large number (over 1000) of SPIDs being generated by 'SQL Server Data Collector'.
Is this normal behaviour? I've seen more blocking as a result of this.
Is there any way to reduce the number of SPIDs generated?
View 0 Replies
View Related
Nov 16, 2006
I have a table that contains the following
UserName - Which is unique to each user
TimeStart - Which is the time and date that the user logs in
TimeEnd - Which is the time and date that the user logs out
Using SQL, how do you find who has logged in using the same account within the same time period. In other words, Two people are using the same username and are logged in at the same time.
View 1 Replies
View Related
Oct 13, 2014
Lets say for example I have a table named Drier_Lot_Recipients with columns grower_id int, crop_year int, and email_address varchar(100). This table contains users that would like to receive an SSRS report I created on daily basis.
I created the SSRS report and it is deployed on a reporting services server. The name of the report is Drier_Lot_Report.rdl.
I am not sure what would be the best way to go about this. Should I do it all in SSIS or a stored procedure in SQL Server?OR maybe a combination of both.
Do I need to have calls made to the RS.EXE utility? Do I need to setup database mail in SQL Server?We have two SMTP servers.
So the end solution must call the Drier_Lot_Report and pass in two parameters (Grower_id and Crop_Year). The output must be PDF and either have the grower_id included in the output filename OR generic filename
View 1 Replies
View Related
Mar 16, 2008
Hi,
I just developed a ASP.NET website with SQL Server 2005 as database. I am having connection crash problem when multiple user click on same link to fetch data from the database. If users click on different links or there is few seconds of time gap between the data access, then it works fine. But the connections crash problem only occurs when 2 or more users click same link at same time.
I am using the following kind of Datalayers to access the data from database:
public static ContentInformation GetContentForUpdate(int ContentId)
{
ContentInformation result = new ContentInformation(); ;
SqlCommand command = new SqlCommand();
command.CommandType = CommandType.StoredProcedure;
command.Connection = Connection;
command.CommandText = "Content_GetContentForUpdate1";
SqlParameter parameter = new SqlParameter("@ContentId", SqlDbType.Int);
parameter.Direction = ParameterDirection.Input;
parameter.Value = ContentId;
command.Parameters.Add(parameter);
try
{
command.Connection.Open();
SqlDataReader reader = command.ExecuteReader(CommandBehavior.SingleRow);
if (reader.Read())
{
// read the data
}
reader.Close();
}
catch (SqlException ex)
{
Trace.TraceError(ex.Message);
throw ex;
}
finally
{
command.Connection.Close();
}
return result;
}
I would be really grateful if someone can help me out with this problem. Waiting for the soonest reply. Thanks.
View 2 Replies
View Related
Dec 12, 2007
HI,
I am using SqlServer2005 as data base for my web application. I am able to connect to the database through DBCP connection pool . Its working fine for 2 user. When ever 2 users do transaction, it works fine. But 3 users do the transaction, its trowning error.Even i increase the pool size the behavior is same.
error:
com.microsoft.sqlserver.jdbc.SQLServerException: Server failed to resume the transaction, desc: 3f00000002.
For a change I wrote a connection pool to access the DB. I am getting the same error. i.e. Its working fine for 2 user and throws error for more than 2 users.
Is there any setting to be made?
Same application is working fine for Oracle10g.
Regrads
Rupesh
View 1 Replies
View Related
Jul 19, 2007
If I have a domain user DOMAINuser1 who belongs to multiple window groups say DOMAINLookupConfigUsers and DOMAINAuditConfigUsers. In sqlserver, I would create two logins - DOMAINLookupConfigUsers and DOMAINAuditConfigUsers and matching users in the database. Then I grant LookupConfig role to the LookupConfigUsers user and AuditConfig role to the AuditConfigUsers user in the database. When DOMAINuser1 logs in, will it have both roles? I try to set this up but it does not seem to work. The domain user only picks up one of the role. Am I on the right track? If not, what is the proper way to grant multiple roles to a user when it belongs to multiple groups and each group has different privileges in the database.
View 4 Replies
View Related
Nov 1, 2007
Hi,
I'd recently posted a question about using SQL CE as a database server for a multi-user desktop app. I did some development and tested it, and it seemed to work fine. What I did was:
1. create a remoteable object that used SqlCe classes to perform read and write operations to an encrypted CE database.
public class RemData : MarshalByRefObject
{
public DataSet GetData()
{
//Read data
}
public int AddData(DataSet data)
{
//Write data
}
}
2. hosted this object in a Remoting Server
TcpServerChannel channel = new TcpServerChannel(props, bp);
// Register the channel with the runtime remoting services
ChannelServices.RegisterChannel(channel, false);
RemotingConfiguration.RegisterWellKnownServiceType(
typeof(RemData ), // The type to register
"RM_RemData", // The objectURI
WellKnownObjectMode.SingleCall
);
So, basically the CE DB is running in-proc with this Remoting Server. This is hosted on a regular P2 1GB box.
3. created client WinForms app to connect to this object through remoting with url tcp://myserverip/RM_RemData and distributed this client EXE to various machines within the intranet to execute the GetData and AddData methods
This seems to work perfectly fine and super fast, and i was also concurrently executing the above methods in loops of 100.
So what I don't understand is why most of the posts I read about multi-user scenario here and on the web are always discouraging people to only use CE for single-user desktop? As long as I use the SQL CE ONLY as a Data Store and all logic into my data layer such as the Remotabe Objects, will this be a feasible option for around 10-20 Users since CE allows 256 Connections anyway?
My other questions are with regards to programmatically Import/Export to and from CSV and Excel..is this supported or anything planned?
Would appreciate a detailed response..my product hangs in balance as i need some closure on this
Thanks,
CP
View 3 Replies
View Related
Mar 1, 2007
I hope this is a simple question. I have a package-scope user variable which is populated using a Recordset Destination in a Data Flow task. I am attempting to read the variable multiple times from different Script Tasks. The first read works fine, however the second read, in the second Script Task, says that there are no rows.
Has anyone run across this before? Any thoughts would be appreciated.
Thanks
View 1 Replies
View Related
Mar 16, 2008
Hi,
I just developed a ASP.NET website with SQL Server 2005 as database. I am having connection crash problem when multiple user click on same link to fetch data from the database. If users click on different links or there is few seconds of time gap between the data access, then it works fine. But the connections crash problem only occurs when 2 or more users click same link at same time.
I am using the following kind of Datalayers to access the data from database:
public static ContentInformation GetContentForUpdate(int ContentId)
{
ContentInformation result = new ContentInformation(); ;
SqlCommand command = new SqlCommand();
command.CommandType = CommandType.StoredProcedure;
command.Connection = Connection;
command.CommandText = "Content_GetContentForUpdate1";
SqlParameter parameter = new SqlParameter("@ContentId", SqlDbType.Int);
parameter.Direction = ParameterDirection.Input;
parameter.Value = ContentId;
command.Parameters.Add(parameter);
try
{
command.Connection.Open();
SqlDataReader reader = command.ExecuteReader(CommandBehavior.SingleRow);
if (reader.Read())
{
// read the data
}
reader.Close();
}
catch (SqlException ex)
{
Trace.TraceError(ex.Message);
throw ex;
}
finally
{
command.Connection.Close();
}
return result;
}
I would be really grateful if someone can help me out with this problem. Waiting for the soonest reply. Thanks.
View 7 Replies
View Related
Mar 31, 2008
Let's say you had a User table and one of the fields was called Deceased. It's a simple closed-ended question, so a bit value could be used to satisfy the field, if the person is dead or alive. Let's say another field is called EyeColor. A person can have only one eye color and thus one answer should be stored in this value, so this is easy as well.
Now, let's say I want to store all the languages that a specific user can speak. This isn't as easy as the previous examples since it's not a yes or no or a single-value answer. I haven't had much experience with working with databases so I've come up with two possible ways with my crude knowledge hehe.
In terms of inputting the multi-answer values, I suppose I could use a multiple-selection listbox, cascading dropdowns, etc. Now, here are the 2 solutions that came to mind.....
1) Make a field called LanguagesSpoken in the User table. When I process the selections the user makes on the languages he knows, I can then insert into the LanguagesSpoken field a string "English, Spanish, Czech" or IDs corresponding to the languages like "1, 5, 12" (these IDs would be referenced from a separate table I guess). I would use commas so that later on, when I need to display a user's profile and show the user's languages, I can retrieve that long string from the LanguagesSpoken field, and parse the languages with the commas I've used. Using commas would just be a convention I use so I would know how to parse (I could have used "." or "|" or anything else I guess) the data.
2) Forget about the LanguagesSpoken field in the User table altogether, and just make a LanguagesSpoken table. A simple implementation would have 3 fields (primary key, userId, languageId). A row would associate a user with a language. So I would issue a query like "SELECT * FROM LanguagesSpoken WHERE userId=5" (where userId=5 is some user). Using this method would free me from having to store a string with delimited values into the User table and then to parse data when I need them. However, I'm not sure how efficient this method would be if the LanguagesSpoken table grows really large since the userIds would NOT be contiguous, the search might take a long time. I guess I would index the userId field in the LanguagesSpoken table for quicker access?
OR, I may be going about this the wrong way and I'm way out on left field with these 2 solutions. Is there a better way other than those 2 methods?
I haven't work extensively with databases and I'm just familiar with the basics. I'm just trying to find out the best-practice implementation for this type of situation. I'm sure in the real world, situations like this is very common and I wonder how the professionals code this.
Thanks in advance.
View 3 Replies
View Related
Mar 15, 2008
Hi,
I just developed a ASP.NET website with SQL Server 2005 as database. I am having connection crash problem when multiple user click on same link to fetch data from the database. If users click on different links or there is few seconds of time gap between the data access, then it works fine. But the connections crash problem only occurs when 2 or more users click same link at same time.
I am using the following kind of Datalayers to access the data from database:
public static ContentInformation GetContentForUpdate(int ContentId)
{
ContentInformation result = new ContentInformation(); ;
SqlCommand command = new SqlCommand();
command.CommandType = CommandType.StoredProcedure;
command.Connection = Connection;
command.CommandText = "Content_GetContentForUpdate1";
SqlParameter parameter = new SqlParameter("@ContentId", SqlDbType.Int);
parameter.Direction = ParameterDirection.Input;
parameter.Value = ContentId;
command.Parameters.Add(parameter);
try
{
command.Connection.Open();
SqlDataReader reader = command.ExecuteReader(CommandBehavior.SingleRow);
if (reader.Read())
{
// read the data
}
reader.Close();
}
catch (SqlException ex)
{
Trace.TraceError(ex.Message);
throw ex;
}
finally
{
command.Connection.Close();
}
return result;
}
I would be really grateful if someone can help me out with this problem. Waiting for the soonest reply. Thanks.
View 4 Replies
View Related
Dec 7, 2006
This is my first time to deploy an asp.net2 web site. Everything is working fine on my local computer but when i published the web site on a remote computer i get the error "Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed" (only in pages that try to access the database)
Help pleaseee
View 3 Replies
View Related
Aug 13, 2006
Hello all,
Being still a relative newcomer to SQL Server (people may say I'm trying to take on too much being somewhat inexperienced once they read about the problem I'm trying to tackle, but alas...) I'm running into the following problem: I need to create tables in my user database on the fly (using Stored Procedures) so that each table can be created many times in the database but only once for every user. The tables should be named something like "username.Table1", "username.Table2" etc. as opposed to "dbo.Table1". I then want to use the stored procedure from .NET/C# in my web application, so that i can create the complete set of usertables for each of my clients.
Now, I tackled the stored procedure part (that is, it creates all the tables I need with all the parameters I want) and am able to use it from my web application (which took some time to learn but proved quite easy to do), but I cannot seem to get it coupled to the current user (instead of the dbo). Every time I trie, the tables are created as dbo.Table1 and when I try to create a new set, it gives a warning ("table with name such and so already exists..."). I made sure to log in as an authenticated user (using forms authentication) before trying to create the tables but this gives the aforementioned result.
What am I doing wrong? I use Visual Web Developer Express, SQL Server 2005 Express and IIS version 5.1
Please help :-D
Greetingz,
DJ Roelfsema
View 2 Replies
View Related
May 22, 2008
Hi,
Please give the T-SQL script for this ? Thanks
Shanth
View 4 Replies
View Related
Aug 12, 2006
Hello all,
Being still a relative newcomer to SQL Server (people may say I'm trying to take on too much being somewhat inexperienced once they read about the problem I'm trying to tackle, but alas...) I'm running into the following problem: I need to create tables in my user database on the fly (using Stored Procedures) so that each table can be created many times in the database but only once for every user. The tables should be named something like "username.Table1", "username.Table2" etc. as opposed to "dbo.Table1". I then want to use the stored procedure from .NET/C# in my web application, so that i can create the complete set of usertables for each of my clients.
Now, I tackled the stored procedure part (that is, it creates all the tables I need with all the parameters I want) and am able to use it from my web application (which took some time to learn but proved quite easy to do), but I cannot seem to get it coupled to the current user (instead of the dbo). Every time I trie, the tables are created as dbo.Table1 and when I try to create a new set, it gives a warning ("table with name such and so already exists..."). I made sure to log in as an authenticated user (using forms authentication) before trying to create the tables but this gives the aforementioned result.
What am I doing wrong? I use Visual Web Developer Express, SQL Server 2005 Express and IIS version 5.1
Please help :-D
Greetingz,
DJ Roelfsema
View 6 Replies
View Related
Sep 28, 2007
When I am in Visual Studio 2005, and I try to add an SQL database, I get the following error "generating user instances in sql server is disabled. use sp_configure user instances enabled to generate user instances." I am currently using SQL server 2005 Express. What do I need to do, to create an SQL database? Thanks in advance.
View 4 Replies
View Related
Nov 22, 2007
i'm using the Enterpirse library logger to write logs into a database.
When choosing connection string i choose the database i want in the "connection properties" dialog box and
push 'Test connection' button.
everything goes well.
then i open the SQL Server Management studio express and connect to the databse to check some things,
from that point on , when i push the 'Test Connection' button in the Enterprise library i get the error:
"cannot open user default database. Login failed. login failed for user My'server/MyuserName'"
even when i close the sql server manager , it is still stuck - the connection test doesn't work anymore....
it only work when i restart the computer.
why ?
View 3 Replies
View Related
Mar 3, 2008
Cannot open user default database. Login failed.Login failed for user
'NT AUTHORITYNETWORK SERVICE'. Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code. Exception Details:
System.Data.SqlClient.SqlException: Cannot open user default database. Login
failed.Login failed for user 'NT AUTHORITYNETWORK SERVICE'. I have This Error When i try to log into My online web site, i have no idea how to fix it,one day it was working and the next it wasnt, is there any way to find out what database the default is and if it's either incorrect or not present change the web.config in a way that will make my system work. i have the NT Authority/Network Service in my Server Properties Permissions, its given the type login and is granted Connect SQL by sa i have 3 colder copies of the web site on my server my question is, how would i use of of these to restore the original site configuration is there a way to restore the original configuration to undo whatever it is i've done to break the system ChrisStressed
View 3 Replies
View Related
Dec 6, 2013
I would like to know if there is a way to find out who changed a users roles/access WITHOUT using the audit function. For example, if a user account was created and given SA access then changed to read only, how can I find out who made that change? I tried searching for an answer, but kept getting no results. I'm thinking this may tie into the sys.sysusers view?
View 3 Replies
View Related
Jan 23, 2007
Hi,
I have several reports for users to view on our Intranet. After installation of SQL 2005 SP2 patch, I cannot delete user or user's authority from Report in Properties Tab. An error message was shown on the status bar. It indicated that JavaScript Error: 'Return' statement outside of function. Seems something wrong with the 'Delete' funciton in SQL 2005 after update. The other functions worked fine. Could you point me out how to fix it or need to install any updates / hotfix. Thanks a lot!
Regards,
Kenneth Lai
Programmer
Error Pic
Message Box
View 1 Replies
View Related
Apr 25, 2007
Hi, I'm new to SQL Express 2005.
I found information regarding : "Cannot open user default database. Login failed."on this forum but I think that in my case it's a bit different issue.
I have a website (ASP.NET 2.0) accessing DB, in the mean time Windows Service tries to update some data in the same DB (Service runs as NT AUTHORITYLOCAL SYSTEM). The second connection is rejected: "Cannot open user default database. Login failed.Login failed for user ....".
Problem occurs only when both: service and website are running at the same time. So service and website are running without problems when they are connecting DB exclusively.
My connection string is:
"Data Source=.SQLEXPRESS;AttachDbFilename="|DataDirectory|spider-lab.mdf";Integrated Security=True;User Instance=True"
I would be grateful if you can help me
View 1 Replies
View Related