SQL export allows output to be piped to disconnected sessions

superspace posted 5 years ago in General
I've just noticed that in the current version ( of heidiSQL (and introduced sometime in the past), it's possible to export data to a disconnected session.

I think this is dangerous.

I disconnect my production session when not in use, but to see it in the list of candidates for my export in my dev session, is disturbing.

What are your thoughts?

ansgar posted 5 years ago
I'm not sure why you think you need to be connected to session you want to export to something. HeidiSQL's export dialog does not make use of your connected sessions. Instead, when you select a target session, the dialog creates its own session for exporting. That way, exporting is totally independent of the opened sessions in HeidiSQL.
superspace posted 5 years ago
Well a long time ago you had to create two HeidiSQL windows (with diff sessions) to export data from one to the other.

Re-visiting this feature today, I found you don't need to have the session open to export data (just as you had described).

I believe exporting *should* be dependent on opened sessions.

That way limiting accidental export to a production DB, for example.
superspace posted 5 years ago
Some options that could be implemented easily (i think) to mitigate this:

* Tick box to display only connected sessions
* Bold connected sessions and order them on top of disconnected sessions
ansgar posted 5 years ago
Sorry, no go. That would again add an artificial limitation we had before, but noone wanted! The connected sessions have nothing to do with the target to where you want to export. Even making connected sessions bold is not possible in a combobox.
kalvaro posted 5 years ago
I've created folders in my session manager to tell apart development and production sites. Those folders show up in the "Output" combo:

Server: Development\Acme Inc.
Server: Development\Bar GmbH
Server: Development\Foo Ltd.
Server: Production\Acme Inc.
Server: Production\Foo Ltd.

I works quite well for me.

Please login to leave a reply, or register at first.