HSQLDB Junit tes failing for DB2 and SQL Server NOLOCK queries - sql-server

for our sprinboot application for junit we have used HSQL and actual database that we are using is DB2 or MS SQL Server, unfortunately in the DB2 queries we are supposed to use NOLOCK which is failing my dao related junits as HSQLDB does not support nolock.
My HSQLDB version is 2.3.3 and I guess there is some provision for ignoring no lock if so how to go about it .Or is there any work around like using some #primary bean where I can put my queries so that junit reads no lock related queries.
I am using sprinbootest runner for my junits. Aplogies as I am unable to paste my code.

HSQLDB supports the DB2 syntax for no lock. You need to use the latest version 2.4.1. The NOLOCK keyword is for SQL Server. DB2 uses UR
SELECT * FROM atable WITH UR

Related

Connect SQL Server database to PostgreSQL

I want to connect a SQL Server database by using pgAdmin4. I already have data in the SQL Server database and want to connect this database in PostgreSQL. I have tried with foreign data also but not working.
If anyone knows the solution it would be really appreciated.
There are two solutions that I've used:
Solution 1: tds_fdw
You can install tds_fdw that is a foreign data wrapper to MSSQL to postgreSQL and, with this foreign data wrapper, you can use your MSSQL tables and schemas as foreign tables inside postgresql. More details here.
As you not provisioned which OS you are using, is better to se inside the project and apply as your needs.
Solution 2: Apache Kafka and Debezium
A little bit complicated than installing a fdw, you can do a streaming replication enabling CDC on MSSQL Server and collecting via Debezium the tables that you need and real-time replicating to you PostgreSQL database connecting via JDBC so, you need what is your scenario and decide what is the best option.
tds_fdw is good, but maybe you should find the windows install package.
Otherwise, if you just want to use one tool that you can query data from both Databases, you should try dbeaver or navicat.

How to find latest Sybase ASE queries within DB?

I have a PB application connecting to Sybase ASE; Is there a way we can trace the DB calls when the application is running.
I used to do that in Oracle 10/11G but unable to figure out in sybase ase.
It will be immensely helpful if I am able to run a module in PB application and check the queries executed after that.
I am using either DBVisualizer or RapidSQL.
Use the MDA tables. For example, monSysStatement and monSysSQLText. See the ASE documentation and/or www.sypron.nl/mda.

MS SQL and tideSDK

I want to query with tideSDK a MS-SQL database. How can I realize this in tideSDK?
My approach was to extend PHP with PDO SQLSRV. But I do not come on.
I understand what you want however there was no native support for MSSQL in TideSDK. Our recent effort TideKit has native support for MSSQL along with other SQL and no SQL databases including Mongo and CouchDB. TideKit is releasing soon. You can find out more at http://tidekit.com or following on twitter at https://twitter.com/tidekit.

Is there a way to connect to a hsqldb database (via a tool) during unit testing?

My question is quite simple, I use DBUnit to test my DAO.
I've got a quite complex query to test. I have created a dataset using flatxml format to test.
My query does not return any results but I expect one. My thoughs is that I have forgotten some data in the dataset.
I would like to query against the hsql database to look at its data and do some simple queries to look at what is missing.
Is there a way to connect to a hsql database during a test (which has a breakpoint on it) via a tools like oracle sql developper to look at the database state ?
Yes. The best way to use HSQLDB for development is running an HSQLDB server. You can connect to this server with the HSQLDB DatabaseManager app or any other database access tool to view the contents.
See the Guide:
http://hsqldb.org/doc/2.0/guide/deployment-chapt.html#dec_app_dev_testing

Is there a type of Database Server that don't support parameterized query (or prepared statement) by their most recent version?

I am writing a report about parameterized query (or prepared statement) technique. And I must write in it if all Database now by their most recent version support this technique or no. I know mysql, sql server and oracle support this. What about others?
Others that support prepared statements: PostgreSQL, DB2, Sybase, HSQL, H2, Apache Derby

Resources