I'm trying to run a script against a database which seems to max out the CPU usage on the server. When I run the same script against a copy of the database it runs fine. Is there some sort of permission or database setting causing this to happen? Here is the script:
SELECT DD.ID, DD.transtype, DD.datum, DD.docdate, DD.vervdatfak, DD.project, DD.res_id INTO dbo.AgingDistDate_51A79C0011F33E46B1DCF306C7EE90A3
FROM (( SELECT bs.ID, gb.transtype, gb.datum, gb.docdate, gb.vervdatfak, gb.project, gb.res_id FROM Banktransactions bs WITH(NOLOCK) INNER JOIN gbkmut gb WITH(NOLOCK) ON (bs.sysguid = gb.banktransactionguid AND bs.sysguid IS NOT NULL AND gb.banktransactionguid IS NOT NULL)
I have written a client software which makes calls to an SQL Server to retrieve data every 3 seconds. It's basically a plan of an office with desks and there are some databases on the server containing information about the telephone status of the agent at each desk. I have now written the methods that call the stored procedures into a web service in hope that it would increase performance as once there's 3 or more clients running it maxes out the server. An option is to increase the timer tick to 5 seconds but I was wondering if there were other options. I think another option is to consider writing the stored procs in a better way.
We have our databases set to SIMPLE model, but we continue to blow up during DataWarehouse loads because the log file fills. Our understanding is that SIMPLE should have no logging yet it appers to. I have 2 requests.
1) Is there a command to tell the database prior to the DataWarehouse load to not log any transactions?
2) Do we need to do more then set the DB to SIMPLE to get a general "no log" effect?
Hi Settled into the new giggero now. Since I have moved here we have upgraded our 4 SQL Servers to 2005 64 bit. All 2 proc dual core hyper threaded with 4GB RAM. Windows 2003. SQL Server compatibility level is 90. SP 1 and the CTP for SP2 are installed. We are hanging on with sp2. Maxdop is 0 (but has been tried on 2). Up to a score or so databases per machine, between 8 and 300 GB in size. Offline, reasonably heavy duty ETL batch processing. Since upgrading we have had trouble with the CPUs intermittently maxing out at 100% usage. This is when intensive routines are run. We know that many of these routines are crappy (SELECT... INTO creating tables with 10s or 100s of millions of rows, cursors etc.) and we are rewriting the code. Estimated time of completion of code review and rewrite is end of next year so we can't wait that long. The same poor code ran (albeit slowly) in SS2k but is causing the server to lock up now it is being run on SS2k5. Symptoms include connection attempts timing out, routines running very slowly. Existing connections can continue to make requests but these are very slow. If we get on the box the CPUs are at a never wavering 100% utilisation. This continues until intervention is taken, often restarting the service. We have left a maxed out box alone over a weekend and it was still in the same state when we came in on Monday. Nothing to glean from the error logs (AFAIK). Obviously the long term fix is to get the code sorted but this is an ongoing process (in fact it is one of the reasons I was hired). Our immediate concern is to get the servers back up to the sort of performance we were realising before we upgraded. Does anyone have any ideas?As ever eternal gratitude and a crate of virtual beer for any help :D
I have a calculated measure in Power Pivot that takes too long to run that it would max out my RAM when running it in Excel 2016 (for some reason it actually manages to run in Excel 2013 but still takes a long time). How to optimise the measure? I have shared the measure below. it is the Unique Leads (MTD) measure that I need to run in a pivot table that is broken down by everyday in a month. The Unique Leads (MTD) measure basically calculates the month-to-date unique leads where a unique lead is defined as an email address that has not appeared in the 'application' table thus far in a particular month.
I have a client program that writes to sql server database 10 records per second . i want to compute the CPU usage and the memory usage for the whole program or CPU usage,memory usage for the insert statement in the program .
Hello, When I am seeing SQL Server 2005 Management studio Server Dashboard> I am seeing my(USERS) databases and msdb database usage is very small % of in CPU Usage(%), Logical IO Performed (%) Usage pie chart.
90% of Total cpu usage is showing for Adhoc Queries. what excatly this means in Dashboard? if application uses more than it would have shown in Database level or not?
sicerely this dashboard is good, if any one is watching daily, please advice their experiences here.
I need to provide some infomation on how much (trans/request)SQL7 can handle. I checked the white papers and testimonials, but don't see any actual numbers. We have a clustered SQL7 environment sitting on some Compaq 6400 using 4 cpu's. Our database size is only about 3.5 gig and we are using IIS 3. Does anyone know where to get this information?
Hi guys, I have a sell server its a new server 4 processors and 4 gigs of ram. SQL server is pinning the CPU's 100% I can’t figure out why, I'm at mdac 2.7 with the hotfix. I don’t know what else to look at.
Hi .... I'd like to know if I can use BCP to transfer the whole database to a device or file and then back to the server(I mean,using only one server) with a new char set/sort order configuration,or I have to do it table by table??? How do I use BCP to perform this task?What commands and parameters should I use???
I have a SQL 2000 Server, dual processer with hyperthreading. 2Gb of Ram. The machine is only being used as a SQL Server
Normally the server runs at about 15-20% usage. I have now noticed a problem where the SQL server suddenly jumps to 100%, this can happen after a week or a couple of days. It requires a server reboot to fix the problem. Stopping the SQL server and restarting will not work.
I don't know if this is part of the problem, but I have noticed that after a day or so the processor usage climbs by about 10%, if I stop the SQL service and restart, the processor usage drop by the 10%.
Also I have set the memory usage to be 1.5Gb, but it takes a day or two for the SQL server to consume this amount of memory. Don't know if this has anything to do with it.
I am new to MSSQL, Iam using it to store largeamounts of data on a daily basis,that I import from a CSV file at the rate that I am going it should be about 1Gig a month of data. I noticed that as I add data to MSSQL my ram usage climbs by the size of the data. Is there someting Ihave done wrong inthe setup.
hi all, when I click web page (executing some stored procedure generally will take less than 2 minutes) the CPU usage is becoming 100% and taking a long time to run.I already posted a forum before (SQL server 2005 running slow ). I dont know these problems are related.If I restart the server then it will run as ususal.What should be problem.Server Windows 2003 ,SQL server 2005 Is it bcos of any memory lekage or any other reason..
HiI am having a real issue with CPU usage by SQL Server, and it is notrelated to a poor query.I have a clients database that I am currently investigating some issueswith. After I perform a standard task using the application, and theresults have been returned to the application the cpu usage remains at100%.Even once the application has been completely closed down the cpu usageremains at 100%. Nothing else is happening.I am at a complete loss as to how to proceed to with investigation ofthis issue (i have been looking at this for over a week using SQLServer tools and Performance Monitor, and eliminating various otherpossibilities)I downloaded Process Explorer, and looking at the threads forsqlservr.exe there is one in particular that is consuming all of thecpu time:MSVCRT.DLLI am running SQL Server 2000 SP4 on the following machine:Windows 2000 SP4Pentium 4 3Ghz (Note this is seen as 2 processors so the reported cpuusage is 50%)1Gb MemoryI also have about 20Gig of free disk space.One other thing, the page faults reported on the Performance tab ofProcess Explorer exceeds 3 million. This is after running theapplication for around 10 minutes.Please can anybody suggest anything at all that might help? I'm sorrythere is not too much information in here but I have not been able tofind out anything useful!Many Thanks in advance.Paul
Hi guys,Got an odd SQL string that I need to produce that is most probably simple toconstruct but with it being hot in our office, I simply can't get my headaround it....!!Its based around an online emailing facility whereby multiple hotels can beemailed via a single application. Users within the application have accessrights to email only specific hotels.The tables are laid out like this (irrelevant columns left out)...CampaignID, CampaignName, CampaignHotelIDs1 Test Campaign 1,4,5,7,92 Test Campaign2 1,2UserID, UserName, UserHotelIDAccess1 Test User 1,6,72 Test User 2,7Now on the stats page I want to give users access to view ONLY sentcampaigns to which they have access to view, I was considering the IN SQLstatement to achieve something like this...'WHERE CampaignHotelIDs IN UserHotelIDAcess'....but that doesn't want to work, can anyone give me any ideas to get thisworking within just a single SQL query?Cheers, @sh
I have 2 SQL Server 2005 instances in one server. We noticed that CPU usage is high in the server. Is there is any posibility to know how many percentage each SQL Server instances is taking?
LIke Total usage is 60%. Instance 1 is 40% Instance 2 is 20%
Hi all, I want to write a backup application for SQL server.I have read the VDI specifications. I want to know whether I can use the VDI just to freeze and thaw without taking the snaphot and the backup. Or is there any other way to do the same ?
Good day to all, I'm new here, so I don't know if this is the right forum to post my problem. I have a web application written using C# .net 2005 (W/ajax). The application has a module that uploads data from excel file to the sql server 2005 database. w/c is by the way, i'm using SQL 2005 Express Edition, the app can upload up to more than 10,000 records from an excel file. Everything is ok until it was deployed in a test environment, while having a run through with the system, the application encounter an error after which, we cannot log in to the system anymore. I restarted the server (web and sql server in 1 machine running winxp) then I can log-in again in the system. When I'm tracing where the problem came from, I noticed that the memory usage of sqlservr.exe increases everytime the app connects to the server. I already fix some code to close some objects that might have caused the high memory usage, then I run sp_who in the management studio and there are still connections used by the app AWAITING COMMAND. Then I manually kill (using kill spid) connection that are left opened by the application. But the mem usage of sqlservr did no decrease. Is there a way to release the memory usage of sqlservr.exe? In ASP.Net ? I have a hint that this has been causing the error. Thanks a lot.
Hi, it seems that every day SQL Server 2000 has some kind of memory leak, the memory usage creeps above 150000 approximately 3 times per day. Is this normal? It starts at about 13000.
Is there any way that I can monitor what is causing the memory usage to be so high and maybe rectify it?
SQL takes all CPU resource on some of the intensive queries. Is any way to make sure there is something left for other tasks to be processed? Let's say limit SQL to use no more than 80% of CPU.
You can see that the indexes are taking up more space than data there are a total of four indexes on the table is shouldn't the data(MB) be higher than the indexes(MB) ?
Does anyone know about this? Can you reassign package ownership to a group? For example, we use NT groups to manage SQL security. As such, the group is listed as a valid SQL Login. Can I change (reassign) ownership to this group? I tried it a few different ways but have not yet been successful (i.e. NT local group that contains a global group, local group that contains individual account(s)). Our global groups and user accounts reside in domain1 and the development server resides in domain2.
As for the purpose, unless I am the owner of a package, I cannot edit the package in DTS Designer and save it under the same name (new version). Some of our efforts require shared editting.
Hi all, I need to drop some of my indexes to keep the size of my DB manageable. I know they're not all being used, but what is the best way to determine how often they are being used? Statistics? I haven't come across any text referring to this so any help is appreciated.
I would just like to know what everyone uses to monitor SQL usage? We have a SQL 2000 server that already has several applications sharing it and everyone wants to keep forcing more onto it.
I want to be able to judge when this server has reached it's capacity or how much more it can allow. Can SQL profiler alone do this for me?