CONNECTIONIDLETIME threshold - db2-luw

I have created a CONNECTIONIDLETIME threshold as follows to force connections that are idle for more than 1 minute, but it does not work. Is there any db or dbm configuration parameter that should be set? OR is there any prerequisite for this threshold to work correctly? My db2 version is v10.5.0.10 on CentOS 6.9
CREATE THRESHOLD dbconidl
FOR DATABASE ACTIVITIES
ENFORCEMENT DATABASE ENABLE
WHEN CONNECTIONIDLETIME > 1 MINUTE
STOP EXECUTION

Related

SQL Server 2012 - Why would changing the compatibility mode affect parallelism in a query?

We changed the compatibility mode from 100 (2008) to 110 (2012) on a 2012 Enterprise SQL server last week.
Since then we have found that the performance on a stored procedure has nose dived from 18 minutes to 48 hours (before we killed it).
I changed the compatibility mode back to 100 and the sproc runs in 18 mins again. Comparing plans from before and after, the 110 version has parallelism at every step of the way, the 100 version has none whatsoever. Other stored procedures (about 50) have been running at the normal speed.
This is totally new ground for me, why would changing the compatibility mode from 100 to 110 cause a huge increase in parallelism on just one stored procedure?
Changing to higher compatibility level helps sql engine to pick plans as per the latest improvement. So changing the compatibility level is not the main reason for your query slowness. You should use query hint OPTION(MAXDOP n) to find the RCA.
Check the query plan before and after changing the compatibility level. After changing compatibility level check it's plan on MAXDOP 1 by using query hint and then check the plan with MAXDOP n, where n is >1(depends on server hardware).
And don't forget to analyse the query plan with changed compatibility level.

Undo tablespace is growing after oracle version updated from 11.2.0.1 to 11.2.0.4

I have recently upgraded the oracle database from 11.2.0.1 to 11.2.0.4 in RAC environment. Installation was successful and i checked logs on both instances. Services were fine untill Ora 30036 resulted due to undotablespace. I got following in spfile
*undo_retention =108000
node11.undo_tablespace='UNDOTBS1'
node12.undo_tablespace='UNDOTBS2'
I have following long running queries
1. EMD_MAINTENANCE.EXECUTE_EM_DBMS_JOB_PROCS()
2. #This query is for AWR auto workload repository
select result_key_value from mgmt_policy_assoc_eval_details........
( select column_value from table cast ...........)
Undotablespace 2 is growing at the rate of 1700MB / hours. I am afraid that I'll ran short of space. I have following questions in my mind:-
Q1. What could be maximum undotablespace for an oracle 11.2.0.4 running in RAC?
Q2. Why retention period is specified for 30hours?
Q3. Why the tablespace2 is growing too fast?
Q4. What could be possible workaround?
It is important to highlight that we have resumed services after few days due to planned upgrade. I have stopped Enterprise manager console as well as its eating a lot of space. SysAux is at 99%.
Q1. What could be maximum undotablespace for an oracle 11.2.0.4 running in RAC?
please refer to https://docs.oracle.com/cloud/latest/db112/REFRN/limits002.htm#REFRN0042 for details.
Q2. Why retention period is specified for 30hours?
is before upgrade, the pramater value never changed? it is configured by manual.
Q3. Why the tablespace2 is growing too fast?
please check if there is long running transaction from gv$transaction or x$ktuxe which consume too many undo blocks. if not, maybe the undo rentention need reduce.
Q4. What could be possible workaround?
advice that do not set the undo datafile autoextend is on avoid the disk space oom. and refer to Q3. i think the buiness is also changed after upgrade.

Query performance when running on Tomcat 6.0

I am facing a weird problem when running a simple aggregation query form my application within Tomcat.
The query is a PreparedStatement - select Min([VSZ(Bytes)]) 'Maximum Resident Memory Utilized (MB)',Min([RSS(Bytes)]) 'Maximum Virtual Size memory (MB)' ,Min([%CPU])'Total CPU Utilization %'from ps_ where ([cmd_date]) > = ? and ([cmd_date]) < = ? and zone = ? and command like ?
This is taking more than 6 mins to complete.
When i run this query from SQL server Studio, it completes within a minute.
To further troubleshoot the problem i wrote a simple java class which creates connection and executes the same query. It is not running on Tomcat but it on the same server on which Tomcat is running.
This also completes within a minute.
I am not an expert on Tomcat, what could i be missing?

SQL Server Agent Jobs Crashing

Running a Windows 2003 with SQL Server 2005 on, with around ~85-90 jobs which run once per hour (at different times), generating new sitemaps for each website hosted on the server, along with un-publishing pages.
The issue which I'm having with the server is that, the server seems to be running in three stages, the jobs run between 8am - 6pm each day, and the server is restarted around 2-3am every morning.
Once the jobs start in the morning, they will run successfully for around 90 minutes (9.30am), taking around 3-5 seconds to complete the job.
After 9.30, the jobs will start correctly, then, get stuck on executing (using 100% CPU).
If I manually stop the job, the server goes back to normal, but then the jobs will fail to execute at all, throwing the error below. (They were changed to run every 60 minutes, not every 15 a few months ago, but the names were never changed)
Step ID 1
Server [Server Name]
Job Name Execute Replicate File For [website] web
Step Name Vbscript for Replicate File every 15Minutes
Duration 00:00:00
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0
Message
Executed as user: [Domain]\[User]. The step did not generate any output.
The step failed.
Information about the script that is running: It is a VBScript
Dim IEObj
Set IEObj=CreateObject("InternetExplorer.Application")
IEObj.Navigate "[weblink]/ReplicateFile.asp"
IEObj.visible=false
do Until IEObj.ReadyState=4
loop
IEObj.quit
Set IEObj=Nothing
#mellamokb - The script is down in the general settings as an ActiveX Script, not a T-SQL one, so I am unable to specify an output file for the errors.
Note: I didn't setup anything on this server or the CMS which it is replicating, and my knowledge of databases is fairly low.
My guess is that the page you are displaying in the browser, [weblink]/ReplicateFile.asp, is erroring out on at least one of sessions.
The code
do Until IEObj.ReadyState=4
loop
will cause significant CPU usage while it is running. And, more importantly, if the browser never gets to ReadyState 4, this code will continue to run forever. Have two of three of these stuck, and you will see 100% CPU usage on your server.

Suspended status in SQL Activity Monitor

What would cause a query being done in Management Studio to get suspended?
I perform a simple select top 60000 from a table (which has 11 million rows) and the results come back within a sec or two.
I change the query to top 70000 and the results take up to 40 min.
From doing a bit of searching on another but related issue I came across someone using DBCC FREEPROCCACHE to fix it.
I run DBCC FREEPROCCACHE and then redo the query for 70000 and it seemmed to work.
However, the issue still occurs with a different query.
I increase to say 90000 or if I try to open the table using [Right->Open Table], it pulls about 8000 records and stops.
Checking the activity log for when I do the Open Table shows the session has been suspended with a wait type of "Async_Network_IO". For the session running the select of 90000 the status is "Sleeping", this is the same status for the above select 70000 query which did return but in 45min. It is strange to me that the status shows "Sleeping" and it does not appear to be changing to "Runable" (I have the activiy monitor refreshing ever 30sec).
Additional notes:
I am not running both the Open Table and select 90000 at the same time. All queries are done one at a time.
I am running 32bit SQL Server 2005 SP2 CU9. I tried upgrading to SP3 but ran into install failurs. The issues was occuring prior to me trying this upgrade.
Server setup is an Active/Active cluster the issue occurs on either node, and the other instance does not have this issue.
I have ~20 other database on this same server instance but only this one DB is seeing the issue.
This database gets fairly large. It is currently at 76756.19MB. Data file is 11,513MB.
I am logged in locally on the Server box using Remote Desktop.
The wait type "Async_Network_IO" means that its waiting for the client to retrieve the result set as SQL Server's network buffer is full. Why your client isn't picking up the data in a timely manner I can't say.
The other case it can happen is with linked servers when SQL Server is querying a remote table, in this case SQL Server is waiting for the remote server to respond.
Something worth looking at is virus scanners, if they are monitoring network connections sometimes they can get lagged, its often apparent by them hogging all the CPU.
Suspended means it is waiting on a resource and will resume when it gets its resource. Judging from the sizes you are pulling back, it seems you are in an OLAP type of query.
Try the following things:
Use NOLOCK or set the TRANSACTION ISOLATION LEVEL at the top of the query
Check your execution plan and tune the query to be more efficient