Domanda

I want view all conncetions inside in the table "MON$ATTACHMENTS", but can´t delete a especific record. When delete return error : "Operation not supported".

  DELETE FROM mon$attachments
   WHERE mon$attachment_id IN (
                               SELECT mon$attachment_id
                                 FROM mon$attachments
                                WHERE  mon$attachment_id = current_connection
                              )

Result is : "Operation not supported"

È stato utile?

Soluzione

This is not supported in Firebird 2.1, terminating connections by deleting from MON$ATTACHMENTS was added in Firebird 2.5 (The title says 2.1, but these are the 2.5 releasenotes). It requires that the database is ODS 11.2 (the database format version of Firebird 2.5).

The query you use is convoluted (why not just DELETE FROM mon$attachments WHERE mon$attachment_id = current_connection), but it also makes no sense: If you want to kill your current connection, then just close the connection (note: I don't know Delphi, but I assume there is way to close a connection)! It is easier, faster and better.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top