Hello,
I have some trouble understanding what the connectionName setting in the project.config.json is actually used for. Why does the project command check my active connection and the connectionName when I run a subcommand like stage?
Stage is essentially supposed to do a diff between two branches. What is the purpose of having an active connection (matching the connectionName setting) for this use case?
Apparently having a connection is optional. If I run the stage subcommand with defined namedConnection, but without active connection like this:
SQL> disconn
SQL> project stage
SQLcl will tell me to connect to my DB as defined in namedConnection, but run the stage nonetheless:
Stellen Sie zuerst eine Verbindung zu myNamedConnection her, wie in project.config.json angegeben
English warning translation: “Connect to myNamedConnection first, as defined in project.config.json”.
In this case, SQLcl will also show some errors:
…
ERROR: Fehler beim Ausf├╝hren der SQL-Abfrage mit der aktuellen Verbindung.
ERROR: Fehler beim Ausf├╝hren der SQL-Abfrage mit der aktuellen Verbindung.
ERROR: Fehler beim Ausf├╝hren der SQL-Abfrage mit der aktuellen Verbindung.
ERROR: Fehler beim Ausf├╝hren der SQL-Abfrage mit der aktuellen Verbindung.
ERROR: Fehler beim Ausf├╝hren der SQL-Abfrage mit der aktuellen Verbindung.
ERROR: Fehler beim Ausf├╝hren der SQL-Abfrage mit der aktuellen Verbindung.
ERROR: Bei der Verarbeitung Ihrer Anforderung ist ein Fehler aufgetreten:
ORA-17008: Geschlossene Verbindung
English translation: “Error while running SQL query with active connection…ORA-17008: closed connection”.
What kind of SQL queries are being run there?
When I run the stage subcommand without any connectionName in project.config.json, it will show a warning, but then run just the same:
SQL> disconn
SQL> project stage
WARN: In project.config.json ist "sqlcl.connectionName" nicht festgelegt.
Aktualisieren Sie project.config.json, oder verwenden Sie PROJECT CONFIG SET
English translation: “sqlcl.connectionName is not set in project.config.json. Update project.config.json or use PROJECT CONFIG SET.”
Maybe someone can clarify this, since I was not able to get a good understanding based on the documentation and other posts I found here in the forum.
Edit: Some clarification and highlighting. Added the second case (no connectionName set).