1. PhoneID is nothing but the participant in the call. PhoneID = 1 is twice from above. Which means 2 particpants (Same call )with 2 numbers with their callstarttime and callendtime. Similarly for PhoneID =2, there are 4 participants. And the list goes on for a day and then for a month.
2. For example a phone call P1 with 2 participants is going on for a particular day. We should not consider the same phone call having 2 participants involved. So that the concurrency would be 2. We have to ignore that here.
3. Only to be considered is other Phone calls for that day. Lets say P1 having call with 2 participants, P2 having some 4 participants which fall in the time period of P1. Then we should consider P1 and P2 the common period
4. In order to find number of concurrent calls happened for a day basing on callstarttime and callendtime. What would be the query?
5. Should consider the Timeperiod or the bucket with 1 hour as the period.
6. A Phone Call P1, Phone Call P2, should have matching (common) time ( keeping all the scenarios) is required for this query.
Result for Concurrent calls for a day should be like below. Should get all the concurrent connections happened for a particular day.
Date|TimePeriod/Bucket(hr part)|Concurrentconnections|
Jan-01-2015|01 to 02|3
Jan-01-2015|11 to 12|2
Jan-02-2015|04 to 05|5
Jan-02-2015|12 to 13|13
........
ii) So once the above is achieved.
Have to find the Maximum concurrent connections for day from the above.
For below Maximum Concurrent connections are '3'
Date|TimePeriod/Bucket(hr part)|Concurrentconnections|
Jan-01-2015|01 to 02|3
Jan-01-2015|11 to 12|2
Hence the Result for Maximum Concurrent Connections would be
Date|TimePeriod/Bucket(hr part)|MaxConcurrentconnections|
Jan-01-2015|01 to 02|3
Jan-02-2015|12 to 13|13
.............
We are running three web sites in a clustered environmentWLBS. The web servers are connected to a Database Serverrunning MS SQL server enterprise edition licensed as perCPU license. The Windows 2000 Advanced Server Licensingmode on all the servers is per SEAT license.Our customers are accessing our web servers and after sometime getting error 500, Maximum concurrent users havereached.We have been told by our software provider that theconnection problem lies with the ADO components whichcommunicating with the SQL server.We have been turning round and round, without any luck.Your help will be highly appreciated.Thanks and best regardsDaveLearning is a Never Ending process*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!
I am writing a query now where I only want to get participants in the 112 service code only but this query I have is giving me other service codes as well when I have it set to 112. How can I fix this just so i can get this 112 service code only.
declare @bgDte smalldatetime declare @enDte smalldatetime declare @rgn char(2) set @bgDte = '2013-01-01' set @enDte = '2013-04-30' set @rgn='05'
If these are all used up, and a 26th connection comes in. What happens? is the connection rejected? or does it sit in a queue, waiting to be given a connection?
hi i hv developed an application that runs on the local windows system and interfaces with the MSSQL 7.0 database server using ODBC DSN Connections. This application will be deployed over the LAN with over 100 users.
The MSSQL 7.0 server has only 5 user licenses that limits the concurrent usage to 5 users.
I need a solution whereby all users can access the SQL server database without adding more licenses
I have been searching hi and low on the web to try and find out typically which version of sql server should be used based on the number of concurrent users you will be having.
I believe that Sql Server 2005 Express should only really be used for up to 10 concurrent users while I seem to remember that Standard edition supports up to approx. 33,000 connections.
Does anybody have this information to hand as I need to write a business case to justify the potential upgrade.
I know that if I set the Package.MaxConcurrentExecutables Property to -1, it will execute the maximum number of concurrent running executables to equal the number of processors plus two.
I have a requirement where I have to run the maximum number of concurrent running executables. However, the number of concurrent executables to run varies each month (it is not fixed).
If I have a loop inside the package that executes each stored procedure (same sproc, different parameter), will SQL Server execute the maximum number of concurrent running executables possible? (It may execute 4 or 8 at a time and that is fine.)
MSDE will only allow 5 concurrent connections to ...
a particular database? a particular instance? or a particular server?
ie. if i have one application running on one instance of MSDE with 5 connections and i have another application running on another instance of MSDE with 5 connections. would i actually have 10 connections? **both instances on the same machine...
Hi, I read that there's a "tecnical" limit of 32767 concurrent connections for SQL 2005 Express, and that SQL 2005 Express uses only 1GB of memory. So, what's the number of practical concurrent connections SQL 2005 Express can handle? Is it 200 ,300, 0r 400...? How much memory is consumed by every connection? Thanks in Advance.
Does anyone know how to change the number of conccurent connections on SQL Server 7. We have purchased 10 additional licenses and I need to change the concurrent users from 10 to 20. Any help would be appreciated. Thanks
Hi all !Does someone know how many concurrent connections 2005 Express canaccommodate ? The limit on MSDE was 5 before performance drops considerably.Thanks for your help.Sebastian
I have a DB that is currently not normalized and will be getting about 100K concurrent users that will mostly be doing Read-Only operations from multiple tables.
I am trying to figure out if I should start thinking of having a DB per client (1000 clients) or if I should normalize the database and keep it as a single DB with good indexes and partitioning.
Hardware is not a problem but 100K concurrent users is.
We have a production server that is configured to 100 user connections. Without any reason, the maximum connections had been exceeded and users can no longer access the sql. But if you sp_who , it displayed only 4 user connections. Since, I have an open connection before this error happens, i was able to execute sp_who. This happened 4 times since we installed the sql server. the version is 6.50.422 sp5a with hotfix.
To all gurus out there, can you give light into this problem?
I have a Windows 2003 Server. Planning to use SQL Server to act as the main Database Server which needs to cater to over 100's of simultaneous connections.
Can anyone share with me the default maximum simultaneous connections and the maximum allowed simultaneous connections for the following versions:
- MSDE - 2000 - 2005 Express - 2005
Hope I can get more professional advice from you guys.
Newbie here.I've got my database set up in SQL 2000, and have started an Access adpfor a front end. I have 10 licenses, and at the moment the onlyaccesses are the server through Remote Desktop and one person into theADP. I started getting ODBC timeout errors when running a complexquery, so I started poking around. In the logs there's messages sayingthe maximum of 10 user connections has been reached, over and overagain. I'm not even certain that these problems are related, but itdoesn't look good.Why are all 10 connections used when there's only the server and oneclient? No one else has access to this server. And how can I stop theODBC timeout? That paticular complex query is the whole jsutificationfor using SQL over Access, so I kind of need it to work. :)Thanks in advance, maddman
We have been running SQL Server 7 for the past 6 months, with no problems at all. All of a sudden, we have received the error message 17050, that the maximum limit for connections has been reached. We cannot now start Enterprise Manager or do anything. We have tried fiddling with licencing in control panel but to no avail. Does anyone have any idea why this has suddenly happened? Any tips would be great!
I have a Sqlserver 6.5 production server used for web based applications Compaq 5500 4 GIG RAM, 4 processor
Sql Memory config on that server is 1048576 (which is 2048 MB) and the run value is 640000 (which is 1250 MB). runvalue for user connections was 500
We have only 90 user connections may increase upto 100 depends on the connections. We don't have any overload on that server.
Error: I was seeing "unable to connect maximum no. of 500 configured user connections are already connected" in the error log.
Action Taken:
I increased the user connections to 600 and rebooted the server. Immediately the same error I can see in the error log. But we have only 20 user connections at that time. I can able to connect.
I've implemented an SQL-CLR stored procedure which makes an HTTP connection using the WebClient class to a server where the processing on the web server takes 10 seconds.
If I fire off a bunch of requests to the stored procedure, e.g. 80 in 1 second I noticed that SQL Server 2005 (Express Edition) only allows 2 concurrent network connections at a time.
I can confirm this by looking at the timing of the results when they come back, basically I get 2 results every 10 seconds and by doing a 'netstat -a' on the web server I notice that there are never more than 2 HTTP connections from the SQL Server at a time.
Is this some sort of sheduling policy in terms of the number of concurrent external network accesses allowed by CLR objects running in SQL Server? Or some side effect of the way the WebClient class blocks in terms of waiting for a network response?
I was expecting all 80 of the requests to block waiting on a network response almost immediately and then for all 80 of them to pretty much complete and return 10-11 seconds later.
[Microsoft.SqlServer.Server.SqlProcedure]
public static int CreditAuthorisation(string Name, decimal Amount)
{
WebClient client = new WebClient();
string result = client.DownloadString("http://someserver/Test.aspx");
I'll try and keep this brief so in a nutshell:I have large distributed java system running on a Windows 2003 server(4cpu 8Gb memory).Periodically the following exceptions occurs in the servers:java.net.SocketException: No buffer space available (maximumconnections reached?): recv failedI know for a fact we are not using too many TCPIP sockets or runningtoo many socket servers.I have googled this error and found very little to help me.What buffer space is this?What does recv failed mean?(Is it at all relevant that sql server is running on the same box?)Any advice appreciated.Thanks in advance.Dan
How can we find maximum value on column level? Suppose we have table A with four columns col1,col2,col3,col4, Now my query look likes this:
Select col1, col2,col3,col4, (col1 + col2) as addcol1, (col2 + col3) as addcol2, (col3 + col4) as addcol3, Max(addcol1,addcol2,addcol3) as maxvalue from Table A
I am getting error as max accepts one argument, I cannot use case statement as table is already bulky and it will make my query more expensive.
--drop table #temp create table #temp (id int, idvalue int) insert into #temp(id,idvalue) select 1095,75
[code]...
I need to take the id value from maximum's id, and compare the rest id value from the table. i need to check the diffrence , if diffrence is more than 18, then i need to raise the flag as failure otherwise the whole test is success. i need to take 63 and compare rest 69,65,61,75.check the diffrence less than 18 or not.
Create table code ( id identity(1,1) code parentcode internalreference)
There are other columns but I have omitted them for clarity.
The clustered index is on the ID.
There are indexes on the code, parentcode and internalreference columns.
The problem is the table stores a parentcode with an internalreference and around 2000 codes which are children of the parentcode. I realise the table is very badly designed, but the company love orms!!
The table currently holds around 300 millions rows.
The application does the following two queries to find the first internalreference of a code and the last internal refernce of a code:
--Find first internalrefernce SELECT TOP 1 ID, InternalReference FROM code WHERE ParentCode = 'M222' Order By InternalReference
-- Find last ineternalreference SELECT TOP 1 ID, InternalReference FROM code WHERE ParentCode = 'M222' Order By InternalReference DESC
These queries are running for a very long time, only because of the sort. If I run the query without the sort, then they return the results instantly, but obviously this doesn't find the first and last internalreference for a parentCode.
I realize the best way to fix this is to redesign the table, but I cannot do that at this time.
Is there a better way to do this so that two queries which individually run very slowly, can be combined into one that is more efficient?
I have an issue where I have multiple rows of data and I need to reduce a dollar amount by a fixed maximum. I am going to throw some code in here to give a rudimentary idea of the data and what the final result should be.
I need to run an update so that the result of the following query:
select LineNum, Code, Amt, MaxAmt from
@tblLooks like this:
LineNum Code Amt MaxAmt ----------- ---- --------------------- --------------------- 1 AA 10.00 50.00 2 AA 20.00 50.00 3 AA 20.00 50.00
(3 row(s) affected)
I have tried cursors but got unexpected results or the MaxAmt always defaulted to the original even if I updated it. This seems like a simple problem but I have been banging my head against the wall for 2 days now. I've written some pretty complicated updates with less effort than this and I must have some mental block that is keeping me from figuring this out.
If I have 100 ODBC clients all submitting the following SQL at the same time how do I know that the SQL inside the conditional only gets executed once. It appear SQL Server is preventing it from happening but was curious how. Or do I need to add something to prevent it from happening.
IF NOT EXISTS (SELECT name FROM sysobjects WHERE type='U' AND name = 'mytable) BEGIN CREATE table mytable (task int NOT NULL, first_name varchar(128), last_name varchar(128)) END
I have some code I build 2 weeks ago which I’ve been running daily but it’s suddenly stopped working with the following error.
“The table "tbl_Intraday_Tmp" has been created, but its maximum row size exceeds the allowed maximum of 8060 bytes. INSERT or UPDATE to this table will fail if the resulting row exceeds the size limit” When I google this there seems to be a related to tables with vast numbers of columns.
My table tbl_Intraday_tmp is relatively small. It has 7 columns. 1 of varchar(5), 3 of decimal(9,3) and 2 of decimal(18,0). The bit I’m puzzled with is it was working and stopped.
I don’t recall changing anything but I wouldn’t rule that out. I ‘ve inspected the source files and I don’t believe they have changed either.
hi...i need a stored procedure query to get the maximum occurred value ie(more than one time occurred value).... this is my table structure.... table Name: PHOTO_GALLERY_VISITSpgv_id pgv_main_category_id pgv_sub_category_id pgv_path pgv_visitor_id pgv_visited_date 6 54 72 photo/Writer/Content/Mobiles/LG/camer4.jpg 26 4/3/2008 6:41:02 PM 7 54 73 photo/Writer/Content/Mobiles/Samsung/mobile1.jpg 26 4/3/2008 6:41:43 PM 8 64 85 photo/Writer/Content/Movie/Bachan/bhachan1.jpg 25 4/4/2008 3:37:17 PM 9 63 82 photo/Writer/Content/sports/Cricket/cricket1.jpg 34 4/4/2008 3:37:29 PM 10 54 73 photo/Writer/Content/Mobiles/Samsung/mobile1.jpg 34 4/4/2008 3:37:29 PM 11 54 73 photo/Writer/Content/Mobiles/Samsung/mobile1.jpg 26 4/4/2008 3:37:29 PM 12 54 73 photo/Writer/Content/Mobiles/Samsung/mobile1.jpg 54 4/4/2008 3:37:29 PM 13 54 72 photo/Writer/Content/Mobiles/LG/camer4.jpg 59 4/4/2008 3:37:17 PM The above is my sample table...... In that filter the most occurrence based on the column "pgv_sub_category_id"in the above table the 73 is the maximum occurred id after that the second maximum ie..72 is the 2nd maximum occurred....hence i want the output as only the id & path which occurred more than one time..... pgv_sub_category_id pgv_path 73 photo/Writer/Content/Mobiles/Samsung/mobile1.jpg 72 photo/Writer/Content/Mobiles/LG/camer4.jpg plz anybody send me the query....its urgent.....thanks in advance.....regardsjanu