EOS下控制台以及图形界面打印sql语句
EOS下控制台以及图形界面打印sql语句
场景需求:在eos中打印sql语句,包括数据实体,查询实体和命名sql的sql语句。
所需资源:
P6spy:负责拦截sql,并打印。
Sqlprofiler:解析p6spy拦截的sql,在基于swing的图形界面上显示,并提供监控分析功能。
Spy.properties:p6spy配置文件,用来指定数据库驱动,打印sql的目的地(文件,控制台,sqlprofiler界面),打印格式等。
EOS控制台打印
- 复制p6spy.ar,sqlprofiler.jar到web应用的lib目录下(如D:\Primeton\eos702\apache-tomcat-5.5.20\webapps\default\WEB-INF\lib)。
- 复制spy.properties到classpath下(如D:\Primeton\eos702\apache-tomcat-5.5.20\webapps\default\WEB-INF\classes)。
- 修改系统配置文件user-config.xml(D:\Primeton\eos702\apps_config\default\config),修改数据源的驱动路径为:com.p6spy.engine.spy.P6SpyDriver。
- 修改spy.properties文件为如下:
################################################################P6Spy Options File #
- See documentation for detailed instructions #
#################################################################
################################################################# - MODULES #
- #
- Modules provide the P6Spy functionality. If a module, such #
- as module_log is commented out, that functionality will not #
- be available. If it is not commented out (if it is active), #
- the functionality will be active. #
- #
- Values set in Modules cannot be reloaded using the #
- reloadproperties variable. Once they are loaded, they remain #
- in memory until the application is restarted. #
- #
#################################################################
module.log=com.p6spy.engine.logging.P6LogFactory
#module.outage=com.p6spy.engine.outage.P6OutageFactory
################################################################# - REALDRIVER(s) #
- #
- In your application server configuration file you replace the #
- "real driver" name with com.p6spy.engine.P6SpyDriver. This is #
- where you put the name of your real driver P6Spy can find and #
- register your real driver to do the database work. #
- #
- If your application uses several drivers specify them in #
- realdriver2, realdriver3. See the documentation for more #
- details. #
- #
- Values set in REALDRIVER(s) cannot be reloaded using the #
- reloadproperties variable. Once they are loaded, they remain #
- in memory until the application is restarted. #
- #
################################################################# - oracle driver
- realdriver=oracle.jdbc.driver.OracleDriver
- mysql Connector/J driver
- realdriver=com.mysql.jdbc.Driver
- informix driver
- realdriver=com.informix.jdbc.IfxDriver
- ibm db2 driver
- realdriver=COM.ibm.db2.jdbc.net.DB2Driver
- the mysql open source driver
realdriver=com.mysql.jdbc.Driver
#specifies another driver to use
realdriver2=
#specifies a third driver to use
realdriver3=#the DriverManager class sequentially tries every driver that is
#registered to find the right driver. In some instances, it's possible to
#load up the realdriver before the p6spy driver, in which case your connections
#will not get wrapped as the realdriver will "steal" the connection before
#p6spy sees it. Set the following property to "true" to cause p6spy to
#explicitily deregister the realdrivers
deregisterdrivers=false
################################################################ - P6LOG SPECIFIC PROPERTIES #
################################################################ - no properties currently available
################################################################ - EXECUTION THRESHOLD PROPERTIES #
################################################################ - This feature applies to the standard logging of P6Spy. #
- While the standard logging logs out every statement #
- regardless of its execution time, this feature puts a time #
- condition on that logging. Only statements that have taken #
- longer than the time specified (in milliseconds) will be #
- logged. This way it is possible to see only statements that #
- have exceeded some high water mark. #
- This time is reloadable. #
# - executionthreshold=integer time (milliseconds)
#
executionthreshold=
################################################################ - P6OUTAGE SPECIFIC PROPERTIES #
################################################################ - Outage Detection
# - This feature detects long-running statements that may be indicative of
- a database outage problem. If this feature is turned on, it will log any
- statement that surpasses the configurable time boundary during its execution.
- When this feature is enabled, no other statements are logged except the long
- running statements. The interval property is the boundary time set in seconds.
- For example, if this is set to 2, then any statement requiring at least 2
- seconds will be logged. Note that the same statement will continue to be logged
- for as long as it executes. So if the interval is set to 2, and the query takes
- 11 seconds, it will be logged 5 times (at the 2, 4, 6, 8, 10 second intervals).
# - outagedetection=true|false
- outagedetectioninterval=integer time (seconds)
#
outagedetection=false
outagedetectioninterval=
################################################################ - COMMON PROPERTIES #
################################################################ - filter what is logged
filter=false - comma separated list of tables to include when filtering
include = - comma separated list of tables to exclude when filtering
exclude = - sql expression to evaluate if using regex filtering
sqlexpression = - turn on tracing
autoflush = true - sets the date format using Java's SimpleDateFormat routine
dateformat=yyyy-MM-dd HH:mm:ss:SS
#list of categories to explicitly include
includecategories=
#list of categories to exclude: error, info, batch, debug, statement,
#commit, rollback and result are valid values
excludecategories=info,debug,result,batch#allows you to use a regex engine or your own matching engine to determine
#which statements to log
#
#stringmatcher=com.p6spy.engine.common.GnuRegexMatcher
#stringmatcher=com.p6spy.engine.common.JakartaRegexMatcher
stringmatcher= - prints a stack trace for every statement logged
stacktrace=false - if stacktrace=true, specifies the stack trace to print
stacktraceclass= - determines if property file should be reloaded
reloadproperties=false - determines how often should be reloaded in seconds
reloadpropertiesinterval=60
#if=true then url must be prefixed with p6spy:
useprefix=false
#specifies the appender to use for logging
#appender=com.p6spy.engine.logging.appender.Log4jLogger
appender=com.p6spy.engine.logging.appender.StdoutLogger
#appender=com.p6spy.engine.logging.appender.FileLogger - name
of logfile to use, note Windows users should make sure to use forward
slashes in their pathname (e:/test/spy.log) (used for file logger only)
logfile = spy.log - append to the p6spy log file. if this is set to false the
- log file is truncated every time. (file logger only)
append=true
#The following are for log4j logging only
log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
log4j.appender.STDOUT.layout.ConversionPattern=p6spy - %m%n
#log4j.appender.SQLPROFILER_CLIENT=org.apache.log4j.net.SocketAppender
#log4j.appender.SQLPROFILER_CLIENT.RemoteHost=localhost
#log4j.appender.SQLPROFILER_CLIENT.Port=4445
#log4j.appender.SQLPROFILER_CLIENT.LocationInfo=true
log4j.logger.p6spy=INFO,STDOUT#################################################################
- DataSource replacement #
- #
- Replace the real DataSource class in your application server #
- configuration with the name com.p6spy.engine.spy.P6DataSource,#
- then add the JNDI name and class name of the real #
- DataSource here #
- #
- Values set in this item cannot be reloaded using the #
- reloadproperties variable. Once it is loaded, it remains #
- in memory until the application is restarted. #
- #
#################################################################
#realdatasource=/RealMySqlDS
#realdatasourceclass=com.mysql.jdbc.jdbc2.optional.MysqlDataSource
################################################################# - DataSource properties #
- #
- If you are using the DataSource support to intercept calls #
- to a DataSource that requires properties for proper setup, #
- define those properties here. Use name value pairs, separate #
- the name and value with a semicolon, and separate the #
- pairs with commas. #
- #
- The example shown here is for mysql #
- #
#################################################################
#realdatasourceproperties=port;3306,serverName;ibmhost,databaseName;mydb#################################################################
- JNDI DataSource lookup #
- #
- If you are using the DataSource support outside of an app #
- server, you will probably need to define the JNDI Context #
- environment. #
- #
- If the P6Spy code will be executing inside an app server then #
- do not use these properties, and the DataSource lookup will #
- use the naming context defined by the app server. #
- #
- The two standard elements of the naming environment are#
- jndicontextfactory and jndicontextproviderurl. If you need #
- additional elements, use the jndicontextcustom property. #
- You can define multiple properties in jndicontextcustom, #
- in name value pairs. Separate the name and value with a #
- semicolon, and separate the pairs with commas. #
- #
- The example shown here is for a standalone program running on #
- a machine that is also running JBoss, so the JDNI context #
- is configured for JBoss (3.0.4). #
- #
#################################################################
#jndicontextfactory=org.jnp.interfaces.NamingContextFactory
#jndicontextproviderurl=localhost:1099
#jndicontextcustom=java.naming.factory.url.pkgs;org.jboss.nameing:org.jnp.interfaces
#jndicontextfactory=com.ibm.websphere.naming.WsnInitialContextFactory
#jndicontextproviderurl=iiop://localhost:900 - 启动eos服务器,控制台在调用数据库查询的时候会打印如下的内容,即配置成功:
文件中打印
- 复制p6spy.ar,sqlprofiler.jar到web应用的lib目录下(如D:\Primeton\eos702\apache-tomcat-5.5.20\webapps\default\WEB-INF\lib)。
- 复制spy.properties到classpath下(如D:\Primeton\eos702\apache-tomcat-5.5.20\webapps\default\WEB-INF\classes)。
- 修改系统配置文件user-config.xml(D:\Primeton\eos702\apps_config\default\config),修改数据源的驱动路径为:com.p6spy.engine.spy.P6SpyDriver。
- 修改spy.properties文件为如下:
#################################################################
- P6Spy Options File #
- See documentation for detailed instructions #
#################################################################
################################################################# - MODULES #
- #
- Modules provide the P6Spy functionality. If a module, such #
- as module_log is commented out, that functionality will not #
- be available. If it is not commented out (if it is active), #
- the functionality will be active. #
- #
- Values set in Modules cannot be reloaded using the #
- reloadproperties variable. Once they are loaded, they remain #
- in memory until the application is restarted. #
- #
#################################################################
module.log=com.p6spy.engine.logging.P6LogFactory
#module.outage=com.p6spy.engine.outage.P6OutageFactory
################################################################# - REALDRIVER(s) #
- #
- In your application server configuration file you replace the #
- "real driver" name with com.p6spy.engine.P6SpyDriver. This is #
- where you put the name of your real driver P6Spy can find and #
- register your real driver to do the database work. #
- #
- If your application uses several drivers specify them in #
- realdriver2, realdriver3. See the documentation for more #
- details. #
- #
- Values set in REALDRIVER(s) cannot be reloaded using the #
- reloadproperties variable. Once they are loaded, they remain #
- in memory until the application is restarted. #
- #
################################################################# - oracle driver
- realdriver=oracle.jdbc.driver.OracleDriver
- mysql Connector/J driver
- realdriver=com.mysql.jdbc.Driver
- informix driver
- realdriver=com.informix.jdbc.IfxDriver
- ibm db2 driver
- realdriver=COM.ibm.db2.jdbc.net.DB2Driver
- the mysql open source driver
realdriver=com.mysql.jdbc.Driver
#specifies another driver to use
realdriver2=
#specifies a third driver to use
realdriver3=#the DriverManager class sequentially tries every driver that is
#registered to find the right driver. In some instances, it's possible to
#load up the realdriver before the p6spy driver, in which case your connections
#will not get wrapped as the realdriver will "steal" the connection before
#p6spy sees it. Set the following property to "true" to cause p6spy to
#explicitily deregister the realdrivers
deregisterdrivers=false
################################################################ - P6LOG SPECIFIC PROPERTIES #
################################################################ - no properties currently available
################################################################ - EXECUTION THRESHOLD PROPERTIES #
################################################################ - This feature applies to the standard logging of P6Spy. #
- While the standard logging logs out every statement #
- regardless of its execution time, this feature puts a time #
- condition on that logging. Only statements that have taken #
- longer than the time specified (in milliseconds) will be #
- logged. This way it is possible to see only statements that #
- have exceeded some high water mark. #
- This time is reloadable. #
# - executionthreshold=integer time (milliseconds)
#
executionthreshold=
################################################################ - P6OUTAGE SPECIFIC PROPERTIES #
################################################################ - Outage Detection
# - This feature detects long-running statements that may be indicative of
- a database outage problem. If this feature is turned on, it will log any
- statement that surpasses the configurable time boundary during its execution.
- When this feature is enabled, no other statements are logged except the long
- running statements. The interval property is the boundary time set in seconds.
- For example, if this is set to 2, then any statement requiring at least 2
- seconds will be logged. Note that the same statement will continue to be logged
- for as long as it executes. So if the interval is set to 2, and the query takes
- 11 seconds, it will be logged 5 times (at the 2, 4, 6, 8, 10 second intervals).
# - outagedetection=true|false
- outagedetectioninterval=integer time (seconds)
#
outagedetection=false
outagedetectioninterval=
################################################################ - COMMON PROPERTIES #
################################################################ - filter what is logged
filter=false - comma separated list of tables to include when filtering
include = - comma separated list of tables to exclude when filtering
exclude = - sql expression to evaluate if using regex filtering
sqlexpression = - turn on tracing
autoflush = true - sets the date format using Java's SimpleDateFormat routine
dateformat=yyyy-MM-dd HH:mm:ss:SS
#list of categories to explicitly include
includecategories=
#list of categories to exclude: error, info, batch, debug, statement,
#commit, rollback and result are valid values
excludecategories=info,debug,result,batch#allows you to use a regex engine or your own matching engine to determine
#which statements to log
#
#stringmatcher=com.p6spy.engine.common.GnuRegexMatcher
#stringmatcher=com.p6spy.engine.common.JakartaRegexMatcher
stringmatcher= - prints a stack trace for every statement logged
stacktrace=false - if stacktrace=true, specifies the stack trace to print
stacktraceclass= - determines if property file should be reloaded
reloadproperties=false - determines how often should be reloaded in seconds
reloadpropertiesinterval=60
#if=true then url must be prefixed with p6spy:
useprefix=false
#specifies the appender to use for logging
#appender=com.p6spy.engine.logging.appender.Log4jLogger
#appender=com.p6spy.engine.logging.appender.StdoutLogger
appender=com.p6spy.engine.logging.appender.FileLogger - name
of logfile to use, note Windows users should make sure to use forward
slashes in their pathname (e:/test/spy.log) (used for file logger only)
logfile = c:/abc/spy.log - append to the p6spy log file. if this is set to false the
- log file is truncated every time. (file logger only)
append=true
#The following are for log4j logging only
#log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
#log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
#log4j.appender.STDOUT.layout.ConversionPattern=p6spy - %m%n
#log4j.appender.CHAINSAW_CLIENT=org.apache.log4j.net.SocketAppender
#log4j.appender.CHAINSAW_CLIENT.RemoteHost=localhost
#log4j.appender.CHAINSAW_CLIENT.Port=4445
#log4j.appender.CHAINSAW_CLIENT.LocationInfo=true
log4j.logger.p6spy=INFO,STDOUT#################################################################
- DataSource replacement #
- #
- Replace the real DataSource class in your application server #
- configuration with the name com.p6spy.engine.spy.P6DataSource,#
- then add the JNDI name and class name of the real #
- DataSource here #
- #
- Values set in this item cannot be reloaded using the #
- reloadproperties variable. Once it is loaded, it remains #
- in memory until the application is restarted. #
- #
#################################################################
#realdatasource=/RealMySqlDS
#realdatasourceclass=com.mysql.jdbc.jdbc2.optional.MysqlDataSource
################################################################# - DataSource properties #
- #
- If you are using the DataSource support to intercept calls #
- to a DataSource that requires properties for proper setup, #
- define those properties here. Use name value pairs, separate #
- the name and value with a semicolon, and separate the #
- pairs with commas. #
- #
- The example shown here is for mysql #
- #
#################################################################
#realdatasourceproperties=port;3306,serverName;ibmhost,databaseName;mydb#################################################################
- JNDI DataSource lookup #
- #
- If you are using the DataSource support outside of an app #
- server, you will probably need to define the JNDI Context #
- environment. #
- #
- If the P6Spy code will be executing inside an app server then #
- do not use these properties, and the DataSource lookup will #
- use the naming context defined by the app server. #
- #
- The two standard elements of the naming environment are#
- jndicontextfactory and jndicontextproviderurl. If you need #
- additional elements, use the jndicontextcustom property. #
- You can define multiple properties in jndicontextcustom, #
- in name value pairs. Separate the name and value with a #
- semicolon, and separate the pairs with commas. #
- #
- The example shown here is for a standalone program running on #
- a machine that is also running JBoss, so the JDNI context #
- is configured for JBoss (3.0.4). #
- #
#################################################################
#jndicontextfactory=org.jnp.interfaces.NamingContextFactory
#jndicontextproviderurl=localhost:1099
#jndicontextcustom=java.naming.factory.url.pkgs;org.jboss.nameing:org.jnp.interfaces
#jndicontextfactory=com.ibm.websphere.naming.WsnInitialContextFactory
#jndicontextproviderurl=iiop://localhost:900 - 启动前请在指定的路径下新建日志文件(logfile = c:/abc/spy.log),启动EOS服务器会在c:/abc/spy.log看到如下内容,表示配置成功:
图形界面中打印
- 复制p6spy.ar,sqlprofiler.jar到web应用的lib目录下(如D:\Primeton\eos702\apache-tomcat-5.5.20\webapps\default\WEB-INF\lib)。
- 复制spy.properties到classpath下(如D:\Primeton\eos702\apache-tomcat-5.5.20\webapps\default\WEB-INF\classes)。
- 修改系统配置文件user-config.xml(D:\Primeton\eos702\apps_config\default\config),修改数据源的驱动路径为:com.p6spy.engine.spy.P6SpyDriver。
- 修改spy.properties文件为如下:
#################################################################
- P6Spy Options File #
- See documentation for detailed instructions #
#################################################################
################################################################# - MODULES #
- #
- Modules provide the P6Spy functionality. If a module, such #
- as module_log is commented out, that functionality will not #
- be available. If it is not commented out (if it is active), #
- the functionality will be active. #
- #
- Values set in Modules cannot be reloaded using the #
- reloadproperties variable. Once they are loaded, they remain #
- in memory until the application is restarted. #
- #
#################################################################
module.log=com.p6spy.engine.logging.P6LogFactory
#module.outage=com.p6spy.engine.outage.P6OutageFactory
################################################################# - REALDRIVER(s) #
- #
- In your application server configuration file you replace the #
- "real driver" name with com.p6spy.engine.P6SpyDriver. This is #
- where you put the name of your real driver P6Spy can find and #
- register your real driver to do the database work. #
- #
- If your application uses several drivers specify them in #
- realdriver2, realdriver3. See the documentation for more #
- details. #
- #
- Values set in REALDRIVER(s) cannot be reloaded using the #
- reloadproperties variable. Once they are loaded, they remain #
- in memory until the application is restarted. #
- #
################################################################# - oracle driver
- realdriver=oracle.jdbc.driver.OracleDriver
- mysql Connector/J driver
- realdriver=com.mysql.jdbc.Driver
- informix driver
- realdriver=com.informix.jdbc.IfxDriver
- ibm db2 driver
- realdriver=COM.ibm.db2.jdbc.net.DB2Driver
- the mysql open source driver
realdriver=com.mysql.jdbc.Driver
#specifies another driver to use
realdriver2=
#specifies a third driver to use
realdriver3=#the DriverManager class sequentially tries every driver that is
#registered to find the right driver. In some instances, it's possible to
#load up the realdriver before the p6spy driver, in which case your connections
#will not get wrapped as the realdriver will "steal" the connection before
#p6spy sees it. Set the following property to "true" to cause p6spy to
#explicitily deregister the realdrivers
deregisterdrivers=false
################################################################ - P6LOG SPECIFIC PROPERTIES #
################################################################ - no properties currently available
################################################################ - EXECUTION THRESHOLD PROPERTIES #
################################################################ - This feature applies to the standard logging of P6Spy. #
- While the standard logging logs out every statement #
- regardless of its execution time, this feature puts a time #
- condition on that logging. Only statements that have taken #
- longer than the time specified (in milliseconds) will be #
- logged. This way it is possible to see only statements that #
- have exceeded some high water mark. #
- This time is reloadable. #
# - executionthreshold=integer time (milliseconds)
#
executionthreshold=
################################################################ - P6OUTAGE SPECIFIC PROPERTIES #
################################################################ - Outage Detection
# - This feature detects long-running statements that may be indicative of
- a database outage problem. If this feature is turned on, it will log any
- statement that surpasses the configurable time boundary during its execution.
- When this feature is enabled, no other statements are logged except the long
- running statements. The interval property is the boundary time set in seconds.
- For example, if this is set to 2, then any statement requiring at least 2
- seconds will be logged. Note that the same statement will continue to be logged
- for as long as it executes. So if the interval is set to 2, and the query takes
- 11 seconds, it will be logged 5 times (at the 2, 4, 6, 8, 10 second intervals).
# - outagedetection=true|false
- outagedetectioninterval=integer time (seconds)
#
outagedetection=false
outagedetectioninterval=
################################################################ - COMMON PROPERTIES #
################################################################ - filter what is logged
filter=false - comma separated list of tables to include when filtering
include = - comma separated list of tables to exclude when filtering
exclude = - sql expression to evaluate if using regex filtering
sqlexpression = - turn on tracing
autoflush = true - sets the date format using Java's SimpleDateFormat routine
dateformat=
#list of categories to explicitly include
includecategories=
#list of categories to exclude: error, info, batch, debug, statement,
#commit, rollback and result are valid values
excludecategories=info,debug,result,batch#allows you to use a regex engine or your own matching engine to determine
#which statements to log
#
#stringmatcher=com.p6spy.engine.common.GnuRegexMatcher
#stringmatcher=com.p6spy.engine.common.JakartaRegexMatcher
stringmatcher= - prints a stack trace for every statement logged
stacktrace=false - if stacktrace=true, specifies the stack trace to print
stacktraceclass= - determines if property file should be reloaded
reloadproperties=false - determines how often should be reloaded in seconds
reloadpropertiesinterval=60
#if=true then url must be prefixed with p6spy:
useprefix=false
#specifies the appender to use for logging
appender=com.p6spy.engine.logging.appender.Log4jLogger
#appender=com.p6spy.engine.logging.appender.StdoutLogger
#appender=com.p6spy.engine.logging.appender.FileLogger - name
of logfile to use, note Windows users should make sure to use forward
slashes in their pathname (e:/test/spy.log) (used for file logger only)
#logfile = spy.log - append to the p6spy log file. if this is set to false the
- log file is truncated every time. (file logger only)
append=true
#The following are for log4j logging only
#log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
#log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
#log4j.appender.STDOUT.layout.ConversionPattern=p6spy - %m%n
log4j.appender.SQLPROFILER_CLIENT=org.apache.log4j.net.SocketAppender
log4j.appender.SQLPROFILER_CLIENT.RemoteHost=localhost
log4j.appender.SQLPROFILER_CLIENT.Port=4445
log4j.appender.SQLPROFILER_CLIENT.LocationInfo=true
#log4j.logger.p6spy=INFO,STDOUT
log4j.logger.p6spy=DEBUG, SQLPROFILER_CLIENT#################################################################
- DataSource replacement #
- #
- Replace the real DataSource class in your application server #
- configuration with the name com.p6spy.engine.spy.P6DataSource,#
- then add the JNDI name and class name of the real #
- DataSource here #
- #
- Values set in this item cannot be reloaded using the #
- reloadproperties variable. Once it is loaded, it remains #
- in memory until the application is restarted. #
- #
#################################################################
#realdatasource=/RealMySqlDS
#realdatasourceclass=com.mysql.jdbc.jdbc2.optional.MysqlDataSource
################################################################# - DataSource properties #
- #
- If you are using the DataSource support to intercept calls #
- to a DataSource that requires properties for proper setup, #
- define those properties here. Use name value pairs, separate #
- the name and value with a semicolon, and separate the #
- pairs with commas. #
- #
- The example shown here is for mysql #
- #
#################################################################
#realdatasourceproperties=port;3306,serverName;ibmhost,databaseName;mydb#################################################################
- JNDI DataSource lookup #
- #
- If you are using the DataSource support outside of an app #
- server, you will probably need to define the JNDI Context #
- environment. #
- #
- If the P6Spy code will be executing inside an app server then #
- do not use these properties, and the DataSource lookup will #
- use the naming context defined by the app server. #
- #
- The two standard elements of the naming environment are#
- jndicontextfactory and jndicontextproviderurl. If you need #
- additional elements, use the jndicontextcustom property. #
- You can define multiple properties in jndicontextcustom, #
- in name value pairs. Separate the name and value with a #
- semicolon, and separate the pairs with commas. #
- #
- The example shown here is for a standalone program running on #
- a machine that is also running JBoss, so the JDNI context #
- is configured for JBoss (3.0.4). #
- #
#################################################################
#jndicontextfactory=org.jnp.interfaces.NamingContextFactory
#jndicontextproviderurl=localhost:1099
#jndicontextcustom=java.naming.factory.url.pkgs;org.jboss.nameing:org.jnp.interfaces
#jndicontextfactory=com.ibm.websphere.naming.WsnInitialContextFactory
#jndicontextproviderurl=iiop://localhost:900 - 打开命令行窗口,进入sqlprofiler所在的路径,我这里是:D:\Primeton\eos702\apache-tomcat-5.5.20\webapps\default\WEB-INF\lib,执行
java -jar sqlprofiler.jar命令,弹出如下窗口:
启动EOS服务器,调用数据库查询功能,sqlprofiler中会显示类似于如下的信息:
配置完成。
<__________________________本文系转载,特此声明——————————————>
所需资源:
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
Normal
0
7.8 磅
0
2
false
false
false
EN-US
ZH-CN
X-NONE
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Calibri",sans-serif;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
EOS下控制台以及图形界面打印sql语句的更多相关文章
- maven项目整合SSM配置log4j, 实现控制台打印SQL语句
在原有项目正常启动的情况下, 实现在控制台打印mapper包下SQL语句. 1.在pom.xml配置文件中添加两个依赖(缺一不可) <!--日志包--> <dependency> ...
- centOS7下安装GUI图形界面
1.如何在centOS7下安装GUI图形界面 当你安装centOS7服务器版本的时候,系统默认是不会安装GUI的图形界面程序,这个需要手动安装CentOS7 Gnome GUI包. 2.在系统下使用命 ...
- mybatis下使用log4j打印sql语句和执行结果
转载自:https://www.cnblogs.com/jeevan/p/3493972.html 本来以为很简单的问题, 结果自己搞了半天还是不行; 然后google, baidu, 搜出来各种方法 ...
- CentOS7 下安装GUI图形界面GNOME
在安装Gnome包之前,需要检查一下网络是否有网络(使用ping www.baidu.com) 一.先装X windows,-y表示参数同意所有软件安装操,当出现 Complete!说明这里安装成功了 ...
- Springboot中mybatis控制台打印sql语句
Springboot中mybatis控制台打印sql语句 https://www.jianshu.com/p/3cfe5f6e9174 https://www.jianshu.com/go-wild? ...
- 9、springcloud整合logback打印sql语句
Logback是由log4j创始人设计的又一个开源日志组件.logback当前分成三个模块:logback-core.logback- classic和logback-access.logback-c ...
- mybatis和redis整合 log4j打印sql语句
首先,需要在项目中引进jedis-2.8.1.jar包,在pom.xml里加上 <dependency> <groupId>redis.clients</groupId& ...
- Django---Django的ORM的一对多操作(外键操作),ORM的多对多操作(关系管理对象),ORM的分组聚合,ORM的F字段查询和Q字段条件查询,Django的事务操作,额外(Django的终端打印SQL语句,脚本调试)
Django---Django的ORM的一对多操作(外键操作),ORM的多对多操作(关系管理对象),ORM的分组聚合,ORM的F字段查询和Q字段条件查询,Django的事务操作,额外(Django的终 ...
- springboot打印sql语句及执行时间
有时候我们程序的接口比较耗时,需要优化,这时我们可能需要了解该接口执行了哪些sql语句以及耗时 1.引入jar包 <!--监控sql日志--> <dependency> < ...
随机推荐
- day 52 Django 的中间件加载顺序
前情提要: django的中间键的作用是进行加载 可以通过中间键进行辅助操作 1.中间件的概念 中间件顾名思义,是介于request与response处理之间的一道处理过程,相对比较轻量级,并且在全局 ...
- 【codeforces 24D】损坏的机器人
题目大意:有一只坏了的机器人站在一个n∗m的网格里,初始位置在(x,y).现在每个单位时间内它会随机选左右下三个方向走,如果它随机的方向会走出网格就不会往这个方向走.当然这个机器人也可能原地停留一个单 ...
- Java序列化接口Serializable接口的作用总结
一.Java序列化接口Serializable的作用: 一个对象有对应的一些属性,把这个对象保存在硬盘上的过程叫做”持久化”. 对象的默认序列化机制写入的内容是:对象的类,类签名,以及非瞬态和非静态字 ...
- python的字符串内建函数(方法)
原本总结一下,后来发现这个里面讲的很全,可以点进去参考:http://www.runoob.com/python/python-strings.html
- CSS3中的pointer-events
今天做项目中偶然误把元素加上了pointer-events属性,结果导致后来在js中给该元素加点击事件不能用,检查了半天才发现是这个属性的问题.之前没有好好研究,于是决定仔细研究一下. 一.定义及语法 ...
- SPSS学习系列之SPSS Modeler的功能特性(图文详解)
不多说,直接上干货! Win7/8/10里如何下载并安装最新稳定版本官网IBM SPSS Modeler 18.0 X64(简体中文 / 英文版)(破解永久使用)(图文详解) 我这里,是以SPSS ...
- golang协程池
type GoroutinePoll struct { Queue chan func() error Total, Num int Result chan error FinishCallBack ...
- java学习-zxing生成二维码矩阵的简单例子
这个例子需要使用google的开源项目zxing的核心jar包 core-3.2.0.jar 可以百度搜索下载jar文件,也可使用maven添加依赖 <dependency> <gr ...
- java-TreeSet进行排序的2种方式
TreeSet和HashSet的区别在于, TreeSet可以进行排序, 默认使用字典顺序排序, 也可以进行自定义排序 1, 自然排序 2, 比较器排序 自然排序: 1, 需要被排序的类实现Compa ...
- 面试题30:KMP 字符串查找
参考:http://www.ruanyifeng.com/blog/2013/05/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm.html自己写的很简单的K ...