any way to ucanaccess to supports HSQLtruncate schema PUBLIC and commit?
it doesn't work on UCanAccess version 4.0.4
Cheers
UCanAccess does support several HSQLDB features as extensions to the Access SQL dialect, but it cannot support TRUNCATE TABLE and TRUNCATE SCHEMA because of the way UCanAccess synchronizes changes between the HSQLDB backing database and the Access database file.
As stated in the HSQLDB documentation:
TRUNCATE TABLE
...
Delete all rows of a table without firing its triggers.
TRUNCATE SCHEMA
...
Performs the equivalent of a TRUNCATE TABLE ... AND COMMIT on all the
table in the schema.
UCanAccess relies on HSQLDB triggers to perform the synchronization.
Related
How can I (using PG-Admin) access or create a log (ideally timestamped) that displays the changes that have happened to a table?
First of the way enable pg_stat_statements on PostgreSQL.
create extension pg_stat_statements;
After then you can view all SQL queries executed on your DB. At this you can view when executed SQL, when finished, duration of execute times and etc.
For more details: PostgreSQL Documentation - pg_stat_statements
If you need history of updated or deleted records on the tables, you can do it for all tables manually writing triggers or own functions, using JSON(JSONB) data types.
(cross-posted from https://gis.stackexchange.com/q/320977/104667)
I've accidentally dropped geometry_columns and geography_columns tables from an existing PostgreSQL PostGIS database schema - let's call it mydb.myschema.
This post outlines how to restore using CREATE TABLE ... with .sql from PostGIS install (I am on a shared server and am having to get my devops to look for them because of permissions).
I wanted to check if this will work. Also, do these two tables (geometry_columns and geography_columns) contain data relating to the geometries held in existing tables in mydb.myschema. Or do geometry_columns and geography_columns hold reference information for spatial operations?
Advice from anyone who has gone through this before welcome.
Running Postgis 2.5.2 ON pg 11.x.
[NOTE: No backup available as snapshots weren't set up beforehand...]
When using JaVers, JaVers is creating its 4 tables in the public schema in Postgres (http://javers.org/documentation/repository-configuration/#connection-provider). I would like to configure it to save these tables in a new schema, example, AuditSchema. Is this possible to configure?
It's available now. Just set property javers.sqlSchema=AuditSchema
No, there is no such feature, see https://github.com/javers/javers/blob/0e21d83ada5678eb9b396606dd6bc926ddf87b23/javers-persistence-sql/src/main/java/org/javers/repository/sql/schema/FixedSchemaFactory.java
It might be a good candidate for contribution to JaVers but all supported SQL dialects should be concerned (MySql, Postgres, MS SQL, H2, Oracle)
I have a PostgreSQL Database that is setup using Liquibase. When I run liquibase:dropAll using maven it drop me everything but trigger functions. Is there a way that with that maven goal also triggerfunctions are dropped?
Since when I reapply my changeset after the dropAll it fails to create the already existing functions.
Unfortuantely no. The way dropAll is implemented is that it uses the liquibase snapshot function to find all objects to drop which works fine except for object types not looked for by snapshot. Snapshot handles standard types like tables, columns, views, and sequences but does not get into more database-specific types like triggers, functions, procedures, user defined types, etc. Since snapshot does not know about triggers, dropAll cannot know to drop them.
If you are using postgresql, the easiest way may be to just run
drop schema public cascade;
create schema public;
as described in "Drop all tables in PostgreSQL?" rather than use liqubase dropAll.
rollback;
doesn't seem to undo alter table changes.
Background:
I'm generating some .sql scripts (based on parsed Hibernate scripts) which are trashing my tables. Importing the full database for testing takes up to 30 minutes (also slowing my machine) and as much as I enjoy taking breaks, i'd prefer to just undo everything with a command such as rollback and try again.
btw this is Oracle 10g Express Edition Release 10.2.0.1.0
Is this even possible?
With the express edition, I'm not sure this is possible. You cannot rollback a DDL operation like ALTER TABLE because DDL is implicitly committed.
Oracle does have the option to create restore points that you can then flashback the entire database to a point in time relatively quickly. That will undo the effects of all committed transactions (DML and DDL) between the creation of the restore point and the point where you issued the flashback command. Here is an example of creating and flashing back to a restore point and here's another that does the flashback for the entire database. I'm just not sure that this functionality is available in the express edition.
This version of Oracle performs a commit on any ALTER TABLE statements.
See this post:
it possible to roll back CREATE TABLE and ALTER TABLE statements in major SQL databases?