If you delete rows in a table and do a full table scan...Is that supposed to read up to the highest block/extent that thetable ever attended.(like in some databases I use)If so what is the best way to take care of such tables in sql server.I appreciate your responsesVince
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.
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
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 .............
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.
Is there a way you can find out how many conneections to a database there may be before running (for example) a restore procedure to warn that it wil fail?
I am in the process of migrating SQL Server 2000 to SQL Server 2005. Moving one user database at a time to SQL Server 2005. Is there anyway I can list the DTS packages referenced by each databases. All our DTS packages are stored in the database. Will the query to system or meta database will help? Thank you, Gish Smith
I have a SQL Server 2005 system that has been running for about 2 years. This morning nothing will connect. SQL Server Agent will not start. It gives me the message
"The request failed or the Service did not respond in a timely manner. Consult the event log or other applicable error logs."
The error log only states the SQL Server Agent cannot connect to server CANSPEC-TMMCSQLDEV and it is shutting down.
When i try to logon to SQL Server using Management Studio i get the following message:
"A connection was successfully established with the server, but then an error occured during the pre-logon handshake. Provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe. Microsoft SQL Server Error : 233"
The help for this error states that it could be caused by the fact that SQL Server does not allow remote connections. I have remote connections turned on.
I am using SQL 6.5 and I would like to know (using Isql/w) the number of users connected to my server at any given time. Thanks for your help in advance.
Greetings Attempting to upgrade standard edition to enterprise.
Tried running setup with the SKUUPGRADE switch per the documentation. Kept getting a modal message box that I had to use Control Panel to upgrade components. Searched Google & MSDN tried everything I found, no luck.
No problem, I'll backup, remove standard, and install enterprise.
Removed standard via control panel.
Ran Enterprise setup. On the setup screen everything is greyed out (e.g. disabled) except workstation components.
Install the workstation components, run it again, everything greyed out except workstation. Select again, says I have nothing to install.
Uninstalled via control panel.
Deleted the SQL Server directory from Program Files Deleted all the files in WindowsTemp Deleted every registry key with the words MicrosoftSQLServer in it.
Run install, everything greyed out except Workstation Components.
Okay I give up... Not sure what else to do except reformat the (#*$(@*&$(# computer which will take hours.
Is there a way to find active connection to a database so you don't have to wait for a restore or similar operation to fail. (Which take forever).?
Is there a SMO method or a transact SQL command or something that can be used in an application to detect active connections?
I don't want to have to wait forever to get a failure when you can't perform a operation that require that there be no active connection such detach a database. I want to be able to tell when I can perform a operation which requires no active connection and when I need to use a task without out dropping the connection like copying the schema using SMO methods.
However if there are no connection I can perform a detach copy and attach to create a new database which is considerable faster.
Is there a way to configure mirroring to go from High Availability to High Protection without having to reconfigure Database Mirroring? Using the interface in Management Studio, I can change the configuration option to High Performance, but not High Protection despite both of them being Synchronous.
If not, what are the recommended steps to configure the mirror once it already has been configured? Is just like initially setting up the mirror or would there be any shortcuts I could take? If I stop the mirroring and remove the witness, will the High Protection option be available?
I realise this is a stupid quesiton but i cannot really find any confirmation of this in BOL.
If you are running High Safety with automatic failover, when failover occurs does this automatically change to High Performance mode. SInce for failover to occur something has happen with the primary , it will be impossible to commit transactions on the new primary and mirror asyncronously since 1 of them is no longer available.
So am i correct in assuming that automatic failover also automatically changes the mode to High Performacne for that session?
I am trying to select rows from a SQL2000 database table and then write a random number back into each row. I have already looked into do it all in a SP but there are well documented limitations for the SQL RAND function when called in the same batch, so I need to somehow do in .Net what I already have working in classic ASP. I can't get the UPDATE (part two section) to compile. I don't know how to call the stored procedure inside the 'foreach' loop or extract the SP parameters. I have it working in classic asp but am having a lot of trouble converting to .Net 2.0. Is the below even close to working? // stored procedure to write externally generated random number value into database PROCEDURE RandomizeLinks@L_ID int,@L_Rank intASUPDATE Links SET L_Rank = @L_RankWHERE (L_ID = @L_ID) // Part One select links that need random number inserted. public DataTable GetRandLinks() { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString1A"].ConnectionString); SqlCommand cmd = new SqlCommand("RandomizerSelect001", con); cmd.CommandType = CommandType.StoredProcedure; SqlDataAdapter da = new SqlDataAdapter(); da.SelectCommand = cmd; DataSet ds = new DataSet(); try { da.Fill(ds, "Random001"); return ds.Tables["Random001"]; } catch { throw new ApplicationException("Data error"); } } // Part Two I need two write a random number back into each row protected void Button1_Click(object sender, EventArgs e) { GetRandLinks(); int LinkID; // this generates unassigned local variable "LinkID' error int LRank; // this generates unassigned local variable "LRank' error SqlConnection con2 = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString1A"].ConnectionString); SqlCommand cmd2 = new SqlCommand("RandomizeLinks", con2); cmd2.CommandType = CommandType.StoredProcedure; cmd2.Parameters.AddWithValue("@L_ID", LinkID); cmd2.Parameters.AddWithValue("@L_Rank", LRank); SqlDataAdapter da2 = new SqlDataAdapter(); int RowIncrement; RowIncrement = 0; DataTable dt = GetRandLinks(); foreach (DataRow row in dt.Rows) { System.Random myRandom = new System.Random(); int LinkRank = myRandom.Next(25, 250); LRank = LinkRank; da2.UpdateCommand = cmd2; RowIncrement++; } }
I have problem with sql query with aspnet. In my web page, i have a text box for input name or string to search in database. I have problem if the search string consist of quotation mark => ' . Any suggestions? Thanks.
Hi Guys, We have developed some applications and we wanted to have a performance bench mark for the database. Can anyone pl let me know how to have a baseline for performance. What would be and acceptable response time. Thanks for your reply. --Joy
Hi, I am encountering a problem. There are lots of duplicate rows in the cobol flat files (due to improper data entry and missing columns values )from where I am transforming data to sql 7. 0 tables using DTS. After transformation , can I some how mark the duplicate rows ? it is not for the purpose of eliminating them, but to enter the missing values and make all the rows complete and unique. I have the transformed table as a temporary table. Can I add a column like 'status' etc.. and have the column values marked '1' for the repeating rows etc.... Can anyone suggest 'any' possible way of implementing it ? Thanx Nisha
One of the tables in my database was originally designed with a question mark in the column name. When creating my query for jdbc i did this:
String q = "o."Cancelled?" from ORDERS o";
However, this query gives me the following error message:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid column name 'Cancelled@P1'.
Is there a way of stopping the driver from turning the '?' into '@P1'?
I have tried single quotation marks instead of the double ones around the column name and also back ticks, but with no success.
I have also seen an option in a local ODBC connection I have created an option for ansi quoted strings which solves the problem for oDBC queries, is there an equivilant for JDBC?
SELECT DEPARTMENT.ID, DEPARTMENT.NAME, DEPARTMENT.FUNDCODE, DEPARTMENT.DEPTCODE, DEPARTMENT.DEFAULTCONTACT, CONTACT.LNAME AS DEFAULTCONTACTLASTNAME, CONTACT.FNAME AS DEFAULTCONTACTFIRSTNAME, CONTACT.POSITION AS DEFAULTCONTACTPOSITION, CONTACT.PHONE AS DEFAULTCONTACTPHONE, CONTACT.FAX AS DEFAULTCONTACTFAX, CONTACT.EMAIL AS DEFAULTCONTACTEMAIL, DEPARTMENT.ISACTIVE, DEPARTMENT.ISACTIVECOMMENTS, DEPARTMENT.POSTUSERID, DEPARTMENT.POSTDATETIME FROM TDEPARTMENT AS DEPARTMENT LEFT JOIN TCONTACT AS CONTACT ON DEPARTMENT.DEFAULTCONTACT = CONTACT.ID WHERE DEPARTMENT.ID = ? ORDER BY DEPARTMENT.NAME ASC
I have never seen a question mark in the WHERE clause like this before.
If I run such a query in Query Analyzer I get:
[Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error
Hi,I've created a table in SQL Server 2000 and I'm now trying to searchthrough the data and return specific rows. I'm using this command:select * from Export where libelle_court='Recherche d'investisseurs'The problem is this: The search fails whenever there is a curlysingle quotation mark within the table field ( ' as opposed to ' ).For example, if the field entry in my table is this:Recherche d'investisseursthen both of the following commands retun no fields:select * from Export where libelle_court='Recherche d'investisseurs'select * from Export where libelle_court='Recherche d''investisseurs'However, if the field entry in my table is this:Recherche d'investisseursthen both of the commands quoted above succeed.How can I get SQL Server to treat the curly quotation mark correctlyand return the right results? I've tried changing the collation butwith no success.Thanks,Rob
I have a requirement to mark duplicate records when I pull them from the database. However, I only want to mark the 2nd, 3rd, 4th etc record - not the first one. The code I have below creates a column called Dupes but marks all the duplicates - including the first one. Is there a way to only mark the 2nd, 3rd, 4th etc record ? SELECT *, cs.CallStatusDescription as CSRStatusDesc, cs2.CallStatusDescription as CustomerStatusDesc, (Select MAX(CallAttemptNumber)From CallResults cr Where cl.Id = cr.CallLogId) as CallAttemptNumber, Dupes = (select count(id) from CallLogswhere (CustomerHomePhone != '' AND cl.CustomerHomePhone = CustomerHomePhone)OR (CustomerBusinessPhone != '' AND cl.CustomerBusinessPhone = CustomerBusinessPhone)AND DealerId= 'hdsh' AND CSRStatus IS NULLand datediff(d, logdate, getdate()) <= 21), FROM CallLogs cl left Join CallStatus cs on cs.Id = cl.CSRstatusleft Join CallStatus cs2 on cs2.Id = cl.Customerstatus Where SaleStage IN ('1', '2', '3', '4', '5', '6') And (LogProcessFlag = 1 Or LogProcessFlag = 0)And DealerId='hdsh'And Logdate Between '08/01/2007' And '08/31/2007'
Hi i have to pass Query to the SqlCommand with " ' " single quote when i try this i got the error msg Unclosed quotation mark before the character string ')'. insert into service(problem) values('Receipt Printer Can't Work') where service_id = 112; help me Very Urgent
I try to get values from database table name GoldPriceRecord , and display them in a simple labels text. However, i receive the following error: Error: Unclosed quotation mark before the character string ''.
Public LondonDateTime As Date Public CommodityPrice As String Public SysDate As DatePublic CommodityPrice_Check As String Protected Sub Page_Load(ByVal sender As Object, _ ByVal e As System.EventArgs) Dim strsql1 As String Dim strsql2 As String strsql1 = "SELECT TOP 1 Bid, SystemDate FROM GOLDBEST.DBO.GoldPriceRecord ORDER BY SystemDate DESC'" SetGoldPriceRecord(strsql1) fdsa1.Text = LondonDateTime fdsa2.Text = CommodityPrice fdsa3.Text = SysDate fdsa4.Text = CommodityPrice_Check End Sub Public Function SetGoldPriceRecord(ByVal strsql As String) Dim connString As String = _ConfigurationManager.ConnectionStrings("Local_LAConnectionString1").ConnectionString Using myConnection As New SqlConnection(connString)Dim myCommand As New SqlDataAdapter(strsql, myConnection) Dim DS As New DataSetmyCommand.Fill(DS, "GoldPriceRecord") <---- Error CommodityPrice = CType(DS.Tables(0).Rows(0)("Bid"), String)CommodityPrice_Check = CType(DS.Tables(0).Rows(0)("Bid"), String) SysDate = CType(DS.Tables(0).Rows(0)("SystemDate"), Date)LondonDateTime = CType(DS.Tables(0).Rows(0)("SystemDate"), Date) myConnection.Close() End UsingReturn LondonDateTime Return CommodityPriceReturn SysDate Return CommodityPrice_Check End Function
Hi,Is there anyone encountered this error before & how it is being resolved?[Microsoft][ODBC SQL Server Driver][SQL Server]Missing end comment mark '*/'The error pops-up when I was running a DTS Import/Export from a SQL server(source) to another SQL server (destination) residing on a differentmachine. I'm copying all tables, views, & stored procedures of a database.Thanks for any input.Regards,Maricel