Discussions
Categories
- 196.9K All Categories
- 2.2K Data
- 239 Big Data Appliance
- 1.9K Data Science
- 450.3K Databases
- 221.7K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 550 MySQL Community Space
- 478 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 546 SQLcl
- 4K SQL Developer Data Modeler
- 187K SQL & PL/SQL
- 21.3K SQL Developer
- 295.9K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.6K Development Tools
- 107 DevOps
- 3.1K QA/Testing
- 646K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 155 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 18 Java Essentials
- 160 Java 8 Questions
- 86K Java Programming
- 80 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 442 LiveLabs
- 38 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 171 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 232 Portuguese
Generating the SQLText Metric in DMS

1002441
Member Posts: 3
I want the SQLText value to be set in JDBC DMS, from the document here http://docs.oracle.com/cd/B28359_01/java.111/b31224/dmsmtrc.htm#CHDBDDHB, it says:
If the 11.1 version of the DMS JAR file is present in the classpath environment variable, then JDBC checks the DMS update SQL text flag. If this flag is true, then the SQLText metric is updated.
If the 11.1 version of the DMS JAR file is not present in the classpath environment variable, then JDBC uses the value of the DMSStatementMetrics connection property. If this statement property is true, then SQLText metric is updated. The default value of this connection property is false.
The problems are that:
1) It does not mention how to set this "DMS update SQL text" flag.
2) What's the exact name of DMSStatementMetrics property, I can find the "oracle.jdbc.DMSStatementMetrics" from http://docs.oracle.com/cd/B14099_19/core.1012/b14001/optj2ee.htm#CACFHAHF, is it the right one?
Anyone can help me?
If the 11.1 version of the DMS JAR file is present in the classpath environment variable, then JDBC checks the DMS update SQL text flag. If this flag is true, then the SQLText metric is updated.
If the 11.1 version of the DMS JAR file is not present in the classpath environment variable, then JDBC uses the value of the DMSStatementMetrics connection property. If this statement property is true, then SQLText metric is updated. The default value of this connection property is false.
The problems are that:
1) It does not mention how to set this "DMS update SQL text" flag.
2) What's the exact name of DMSStatementMetrics property, I can find the "oracle.jdbc.DMSStatementMetrics" from http://docs.oracle.com/cd/B14099_19/core.1012/b14001/optj2ee.htm#CACFHAHF, is it the right one?
Anyone can help me?
Tagged:
Answers
-
Those are 'properties' and would be set on the command-line but you can set them in code before you begin referencing JDBC.
They are generally only (and then only rarely) used in an application server context.
See the Application Server Performance Guide
>
6.3.7 Setting the OC4J JDBC DMS Statement Metrics Option
To improve performance, by default OC4J does not collect JDBC statement metrics. The properties, oracle.jdbc.DMSStatementCachingMetrics and oracle.jdbc.DMSStatementMetrics are by default, set to false. When these properties are false, performance is improved since OC4J does not collect expensive JDBC statement level metrics.
Setting these properties to true may have a negative impact on performance. You should only set these properties to true when you need to collect JDBC statement metrics.
When oracle.jdbc.DMSStatementCachingMetrics property is set to true and JDBC statement caching is enabled, the JDBC statement metrics are available.
When JDBC statement caching is disabled, make the JDBC statement metrics available by setting the property oracle.jdbc.DMSStatementMetrics to true. -
I set both oracle.jdbc.DMSStatementCachingMetrics and oracle.jdbc.DMSStatementMetrics to true, but still do not see the SQLText value in DMS Spy.
So I want to try another way, "If the 11.1 version of the DMS JAR file is present in the classpath environment variable, then JDBC checks the DMS update SQL text flag. If this flag is true, then the SQLText metric is updated." The problem is it does not mention what's the name of this "DMS update SQL text flag", or how to set it. -
This question has NOTHING to do with JDBC. As previously stated DMS is used ONLY within an application server context.
You should mark this question ANSWERED and repost it in the Fusion Middleware forum.
3377
DMS is used in Oracle Application Server and WebLogic Server. You shouldn't be using it except in those environments.
This discussion has been closed.