I have used MQ Accounting & Statistics many times without a problem, but recently enabled both in order to do some capacity planning.
I now find that on a particular queue manager, even though I have disabled them both, I still get messages generated to SYSTEM.ADMIN.ACCOUNTING.QUEUE and SYSTEM.ADMIN.STATISTICS.QUEUE.
I'm running MQ V8.0.0.3 and used the following commands to disable the features.
ALTER QMGR STATMQI(OFF)
ALTER QMGR STATQ(OFF)
ALTER QMGR STATCHL(OFF)
ALTER QMGR ACCTMQI(OFF)
ALTER QMGR ACCTQ(OFF)
Any thoughts?
You should use NONE instead of OFF.
OFF works only if objects has "Queue Manager" value of monitoring attributes.
Read Online Monitoring section: http://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.explorer.doc/e_properties_qmanager.htm
Related
How can I determine exactly how much downtime is needed during the scheduled maintenance window in Autonomous Database? Also, how can I find out about what's included in a given patch?
As described in the doc, your database remains available during the maintenance window. Your existing database connections may get disconnected briefly; however, you can immediately reconnect and continue using your database. If your application uses Oracle Transparent Application Continuity (TAC), you avoid these brief disconnects altogether.
In order to see what bug fixes are delivered in these maintenance windows, you can run the following query:
-- To view patch information for all available patches
SELECT * FROM DBA_CLOUD_PATCH_INFO;
-- For patch ADBS-21.7.1.1
SELECT * FROM DBA_CLOUD_PATCH_INFO WHERE PATCH_VERSION = 'ADBS-21.7.1.1';
Disclaimer: I’m a Product Manager at Oracle.
I am using PL/SQL Developer 11.0.4.1774. In my work, I need to use database whole day. Sometimes, during 30-60 minutes, I do not use ide and when I need to use it again, it requires reconnection.
I do not want to reconnect, is there any way to keep the connection alive whole day?
Go to Tools --> Preferences and click "Check connection". It pings the database every 60 seconds, making the session active and avoids idle session disconnects caused by profiles.
NOTE: This question and answer are for Allround Automations PL/SQL Developer. See this question if you're looking for Oracle SQL Developer.
you need check 'IDLE_TIME' and 'CONNECT_TIME' setting for your user profile
select * from dba_profiles
where resource_name in ('IDLE_TIME','CONNECT_TIME')
http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_6010.htm
If a user exceeds the CONNECT_TIME or IDLE_TIME session resource
limit, then the database rolls back the current transaction and ends
the session. When the user process next issues a call, the database
returns an error.
I have PL/SQL Developer opens for days and don't have the issue
my PL/SQL Dev Tools-Prefernces-connection settings are:
Session Mode = Multy Session
Check connection = unchecked
Logoff with open transaction = Commit
and TIME settings are:
PROFILE RESOURCE_NAME RESOURCE_TYPE LIMIT
1 DEFAULT IDLE_TIME KERNEL UNLIMITED
2 DEFAULT CONNECT_TIME KERNEL UNLIMITED
Install the Reconnect plug-in so at least reconnecting can be a simple button-press.
Possibly against the intention of the DBA (if the issue is due to profile/resource manager settings), but you might try setting a Sessions window (or other report/query etc) to auto-refresh every 25 minutes or so.
Edit: I see on the Bar Solutions website the developer has moved Reconnect from "Plugins" to "Old Plugins". At my current client site I can't install plugins, so I can't tell whether it still works at the moment.
Today I was hit by a successful 2pc that wasn't materialized in Oracle. The other participant was MSMQ which materialized fine.
The problem is that I did not get an Exception in the application (using c# odp.net). Later I found the In-Doubt Transactions in sys.dba_2pc_pending.
Could I somehow have detected this in my application?
EDIT: This is not about getting 2pc to work. It does work, and for more than a year until a day where some rows where missing. Please read about In-Doubt Oracle transactions link1 and pending transactions link2
My first thoughts is to make sure that distributed transaction processing is enabled on the oracle listener.
In my case no error was thrown. We use RAC and the service did not have distributed transaction processing enabled. In a stand-alone system I'm not sure what this would do, but in the case of RAC it serves the purpose of identifying the primary node for handling the transaction. Without it, a second operation that was supposed to be in the same operation just ended up starting a new transaction and deadlocked with the first.
I have also had significant amounts of time go by without an issue. By luck (there's probably more) it just so happened that transactions were never split over the nodes. But then a year later the same symptoms creap up and in all cases either the service didn't have the DTP flag checked or the wrong service name (one without DTP) was being used.
From:http://docs.oracle.com/cd/B19306_01/rac.102/b14197/hafeats.htm#BABBBCFG
Enabling Distributed Transaction Processing for Services For services
that you are going to use for distributed transaction processing,
create the service using Enterprise Manager, DBCA, or SRVCTL and
define only one instance as the preferred instance. You can have as
many AVAILABLE instances as you want. For example, the following
SRVCTL command creates a singleton service for database crm,
xa_01.service.us.oracle.com, whose preferred instance is RAC01:
srvctl add service -d crm -s xa_01.service.us.oracle.com -r RAC01 -a
RAC02, RAC03
Then mark the service for distributed transaction
processing by setting the DTP parameter to TRUE; the default is FALSE.
Enterprise Manager enables you to set this parameter on the Cluster
Managed Database Services: Create Service or Modify Service page. You
can also use the DBMS_SERVICE package to modify the DTP property of
the singleton service as follows:
EXECUTE DBMS_SERVICE.MODIFY_SERVICE(service_name
=>'xa_01.service.us.oracle.com', DTP=>TRUE);
I have Oracle RAC 10g environment with two nodes.
On connection we set the session TIME_ZONE using ALTER SESSION.
But, on switching the session to another node , RAC lost TIME_SONE settings.
How to keep session parameters upon switching to another RAC node?
Tx
If you're talking about Transparent Application Failover there is probably no easy way to do this:
You must also reexecute any session customizations, in other words,
ALTER SESSION statements, after failover has occurred.
There may be workarounds, depending on how you set the session settings. For example, if all the relevant sessions come from the same application, computer, etc., you can use a logon trigger that sets the same settings. You can find the relevent session using v$session.failed_over = 'YES', and matching other relevant columns in v$session.
Is there a tool (that already comes with Oracle) for tracing SQLs that have been executed? In DB2 there is something called an 'event monitor' which I use to track the tables that have been updated. Is there an equivalent tool in Oracle?
I plan to
enable tracing
go on the website (that uses the db) and change an entry
disable tracing
see output file and record which table has been updated.
There is a table I am looking that should be updated when the entry is changed. I do not know what the name of the table is (and there are many tables), and so I need to trace the SQL executed to find out.
I have tried:
ALTER SESSION SET sql_trace = true;
-- go on website and change an entry
ALTER SESSION SET sql_trace = false;
tkprof the_trace_file.trc file.out EXPLAIN=system/manager SYS=no
However when following those steps above, no SQLs were recorded.
Is there a tool that Oracle provides? (I would like to avoid downloading external software)
There is a table I am looking that
should be updated when the entry is
changed. I do not know what the name
of the table is (and there are many
tables), and so I need to trace the
SQL executed to find out.
I'm thinking you are using the word "trace" here with another meaning than what is usually meant in the Oracle world.
You basically hit some button in the app, and by looking at what SQL queries are running, you want to find what table that code was referencing? Did I get it right?
In that case, you could have a look at v$sql, and look at columns SQL_TEXT and SQL_FULLTEXT.
The ALTER SESSION commands work at the session level (ie your current connection).
The website will use a different session (probably from a connection pool).
You can enable tracing for all sessions using the ALTER SYSTEM SET sql_trace = true;
The main reason you didn't get anything in the trace file is because you didn't do anything in the session where trace was enabled.
If you'd have done:
alter system set sql_trace = true;
-- fiddle around with the website
alter system set sql_trace = false;
You'd have gotten one or more trace files, one for each session which had activity while you were fiddling with the website.
The problem is that if the website uses connection pooling, your user activity may have been spread across several connections, and may be intermingled with other concurrent user activity.
Maybe Oracle Audit will help you.
Here is a good explanation: http://www.oracle-base.com/articles/10g/Auditing_10gR2.php
You have to enable audit by setting the parameter AUDIT_TRAIL.
That is at server level. You can audit at client level using a third party sql tracer for OCI:
http://sourceforge.net/projects/ocimonitor/
I find the Enterprise Manager the most useful tool for this. As has already been noted you have to alter the session that the web site is using and not your own. If you set your connection pool limit to 1 connection, you can easily find the session in the enterprise manager and then turn on the tracing. Usually a find the the top queries display in the enterprise manager tells me what queries are taking too long without having to trace anything.