Howto execute a sql command inside transaction - orientdb

I am using OrientDb Version 2.0 M2 with PLocal connections.
The javadoc of
OCommandRequest com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.command(OCommandRequest iCommand)
says
"Executes commands against the graph. Commands are executed outside transaction."
Now i am wondering, if it is possible to execute my SQL commands inside a transaction.

With current version it's not possible if you use "remote" connections.

Related

Postgres alter system command fails using Hibernate fails

I want to make a change to the postgres.conf file at runtime. However, when I execute the sql with "alter system" via hibernate I get an error
Transaction is marked for rollback only or has timed out
I think this has something to do with alter system commands not allowed to execute inside a transaction block as per the documentation
Only superusers can use ALTER SYSTEM. Also, since this command acts directly on the file system and cannot be rolled back, it is not allowed inside a transaction block or function.
Im trying to understand if its possible to execute this type of command with hibernate and what I need to do to be able to do that?

PSQL_HISTORY ignored by PyCharm

I have a Django project connecting to a PostgreSQL database which I develop in PyCharm, and I want to enable PostgreSQL history logging.
There is PSQL_HISTORY env variable set to /home/user/apps/postgres/logs/.pycharm_log, but when I start the project in PyCharm and update some data via the Django Admin (which certainly hits the database) -- nothing gets logged and the file is not created at all.
Is there a way to make PyCharm and PSQL_HISTORY work together as I expected?
'psql' is the name of a specific client tool. Why would a completely different tool use psql's configuration options? If you want to log every statement sent to the server, you could configure that in the server side with log_statement=all.

What does **$$** mean when configuring PowerShell Command Line for DB2?

I found this article that shows how you can set up PowerShell to act as your command line for processing DB2 commands.
In the article, it says that you can use the following command to configure PowerShell to run DB2 commands:
Set-Item -Path env:DB2CLP -Value "**$$**"
In the above command, what does the "**$$**" mean?
Thanks!
It has a function, as distinct from a meaning, and the **??** is meant for the Db2 clp (db2.exe). Even if you are not using PowerShell (i.e. you are using db2cmd.exe or cmd.exe) this environment variable can be useful.
It tells the Db2 CLP to configure the current PowerShell session to be able to communicate with the background process db2bp.exe (the communication is IPC based) . Such communication is necessary because it is that background process db2bp.exe which maintains your connection to the database when you run db2 connect to $your_database, or equivalent cmdlet. The db2.exe manages the db2bp.exe so you don't have to worry about it.
The Db2 CLP knows which db2bp.exe it starts for your Powershell session and uses the environment variable DB2CLP as part of that.
Each individual db2 ... command line (or cmdlet) may quickly complete , and will act on the currently connected database, and you can run many db2 commands one after the other, or run scripts - but all the time, it is the background task db2bp.exe that keeps your Db2 connection alive without needing to be reconnected (as long as the Db2 server does not itself end or kill the connection).
The db2bp.exe process will disappear when you run db2 terminate or end the process. You need to run db2 terminate when reconfiguring the node directory, or database directory, or when switching between different Db2-instances that are running on the same hostname, or optionally after db2 connect reset.

How to get all history of CLPPLUS SQL command?

I am using CLPPlus: Version 1.6 to connect my IBM Db2 on cloud.
I have written several sql queries back long ago.
And I am willing to refer my queries which I had fired that time.
So basically I want the history of my clpplus terminal.
Up & down arrow keys allow you to list command history.
You may save the results and history of commands with the SET ECHO ON; and SPOOL full_path_to_logfile; commands as well.

Start firebird backup from sql

In Sybase sqlAnywhere you could do:
BACKUP DATABASE DIRECTORY 'directory'
to trigger a backup.
Is there a similar solution in Firebird?
It would be easier with a sql-command, than having to distribute gbak.exe.
There is no SQL statement to perform a backup, you either need to use gbak.exe, or your application (or a companion application) needs to use the Firebird service API to perform the backup.
For example Jaybird (the Java/JDBC driver for Firebird) and the Firebird ADO.net provider implement this functionality, but it might be simpler just to include gbak.exe and call it from within your application with the right command line options.