Start a new topic

Client-Side Commands sent to DB

[This topic is migrated from our old forums. The original author name has been removed]
[Attachment has been removed.]

This is something that's bugged me for a while, but I hadn't taken the time to troubleshoot it before. In DbVis 9.1.12 if I try to run a script like the attached against an Oracle DB I'll get an "Invalid SQL statement" error from the DB and DbVis will identify the first "@echo" statement as the source of the error. I enabled debug and noticed that DbVis is interpreting the semicolon at the end of the first "@echo" statement as a SQL statement terminator, and is submitting the block comment and the first "@echo" client-side command to the DB to be run as a SQL statement. I would have thought that DbVis would consume the client-side command rather than send it to the DB. What's interesting is that DBVis _*does*_ appear to consume the second "@echo" statement and echoes the text to the log as expected. Shouldn't DbVis remove the text of client-side commands before sending SQL statements to the DB? Should it not also consume a semicolon that's used to end a client-side command?

[This reply is migrated from our old forums.]

Re: Client-Side Commands sent to DB
Steve, Client-side commands beginning with @ and ending with a delimiter is consumed by DbVisualizer. Does it work if you turn on SQL Commander->Strip Comments when Executing? If it doesn't work what information is listed in the Log tab after execution? Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: Client-Side Commands sent to DB
> {quote:title=Roger Bjarevall wrote:}{quote} > Steve, > > Client-side commands beginning with @ and ending with a delimiter is consumed by DbVisualizer. > > Does it work if you turn on SQL Commander->Strip Comments when Executing? > > If it doesn't work what information is listed in the Log tab after execution? Yes, it does appear to consume the client-side command when SQL Commander->Strip Comments is enabled.
[This reply is migrated from our old forums.]

Re: Client-Side Commands sent to DB
Jakob, Does your response mean that none of the @echo statements run having Strip Comments enabled or does it mean all works fine now? What is the content of the Log? Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]
[Attachment has been removed.]

Re: Client-Side Commands sent to DB
Hi Roger, > {quote:title=Roger Bjarevall wrote:}{quote} > Jakob, > > Does your response mean that none of the @echo statements run having Strip Comments enabled or does it mean all works fine now? > > > > What is the content of the Log? I'd prefer to be addressed by my given name rather than my surname, or perhaps "Mr. Jakob". :-) My response means that client-side commands like "@echo" appear to be consumed correctly when "Strip Comments" is enabled, but are NOT being consumed properly otherwise. I've attached debug logs for two separate runs of my test script: * dbvis_debug_no_strip.txt: comments are not stripped * dbvis_debug_strip_comments.txt: "Strip Comments" is enabled Note that I've modified the logs to replace the all of the timestamps with "99:99:99" in order to facilitate comparison with a diff tool. Edited by: Steve Jakob on 8-Dec-2014 10:50 AM
[This reply is migrated from our old forums.]

Re: Client-Side Commands sent to DB
Hi Steve, Thanks for reporting this. It will be fixed in the next maintenance release. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Client-Side Commands sent to DB
Thanks Hans.
[This reply is migrated from our old forums.]

Re: Client-Side Commands sent to DB
Steve, This issue is now fixed in the just released 92.2339 beta version. http://www.dbvis.com/download/beta/ Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: Client-Side Commands sent to DB
Thanks Roger. I've been trying to find some time to run some tests to confirm the fix, but it hasn't happened yet. I'll follow up once I've had a chance to do so.
[This reply is migrated from our old forums. The original author name has been removed]

Re: Client-Side Commands sent to DB
I finally had a chance today to re-test this using DbVisualizer 9.2. I can confirm that the problem appears to be fixed. Thanks!
[This reply is migrated from our old forums.]

Re: Client-Side Commands sent to DB
Hi Steve, Great, thanks for confirming. Best Regards, Hans