Questions tagged [show-sql]
10 questions
12
votes
3 answers
How to audit JPA without Hibernate Envers
I need to make an audit module to my Java Web App. I use EclipseLink, not Hibernate (can't use Envers). I searched a lot some way to get the SQL or JPQL that JPA is executing, so I could log something like this:
System.out.println("User " + user + "…

André
- 444
- 1
- 7
- 13
2
votes
0 answers
Spring JPA show sql - Is the query printed before or after executing
We are facing an issue with an API that is consuming a bit of time. In the log, it's showing the delay with a query.
[INFO ] 2022-06-01 13:38:51.122 (DataBuilder.java:294)
[DEBUG] 2022-06-01 13:38:52.927 (SqlStatementLogger.java:128)…

Arun Sudhakaran
- 2,167
- 4
- 27
- 52
2
votes
2 answers
Show generated SQL in toplink in eclipse
I am using EclipseLink libraries in eclipse (at dev time) and deploy on TopLink, I need to show the generated sql statement.
I am using the following persistence.xml:

Muhammad Hewedy
- 29,102
- 44
- 127
- 219
2
votes
3 answers
How to execute a SHOW statement with OleDb, C#?
Tried following c# code to get all tablenames in the database,
but I get an error-message saying:
"System.Data.OleDb.OleDbException (0x80040E14): Invalid SQL statement;
expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or…

bonell96
- 23
- 2
2
votes
1 answer
TOP clause applied in @NamedQuery
I have named query
@NamedQuery(name="CustomerMarket.findByMarketId", query="SELECT DISTINCT c.marketid FROM CustomerMarket c WHERE c.marketid LIKE :mask")
in my class CustomerMarket definition.
I want to take first 1_000 of 350_000 results so I…

Jan Stanicek
- 1,201
- 1
- 14
- 30
1
vote
0 answers
How to set show-sql to true once the Spring Boot Application has been started
How to set show-sql to true once the Spring Boot Application has been started
We start application with spring.jpa.show-sql=false in src/main/resources/application.properties
If we need to momentarily turn on show-sql, how should we do it?

Rpj
- 5,348
- 16
- 62
- 122
1
vote
1 answer
NHibernate not outputting SQL to console
I have configured NHibernate to output the SQL it generates to the console. I have added the following to the app.config of the DLL containing the integration tests I want to run from NUnit:

Ben Aston
- 53,718
- 65
- 205
- 331
0
votes
2 answers
Sl4j doesn't log sql statements from JPA
I'm developing an app with JPA, Hibernate and Sl4j. I can'm make my sl4j to log sql statements.
Here is my code:
persistence.xml
…

Eugene_Z
- 235
- 2
- 12
0
votes
1 answer
How to show/enable logs of queries executed in spring boot data for igniterepository ? Do we have any specific property for Apache ignite repository?
logging.level.org.hibernate.SQL=debug
logging.level.org.hibernate.type.descriptor.sql=trace
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
Tried with above properties but those are not working out.

Soumya Sarkar
- 95
- 1
- 6
0
votes
2 answers
use 'not like' in mySQL show statements
I have a dropdownlist which is being populated by column names based on the table name selected by user in the previous dropdown. I am using the following query
SHOW columns from abcTableName LIKE '%name' which works
I want all to include all the…

Jagruti
- 312
- 4
- 18