SQL USE DatabaseName overwrites Data ?

Answered

Comments

3 comments

  • Official comment
    Avatar
    Yaremi Miranda Lopez

    Hello Nadav,

    We don't have a specific behaviour for the query report, it is like you're running the Query manager.

    What I would suggest is to avoid the USE command and only use the SQL syntax Database.[dbo].Table I´ve worked with that before with good results.

    Here is an example:

     

    Comment actions Permalink
  • Avatar
    Nadav Caridi

    Hi Yaremi , 

    I understand the workaround, but I'm bringing this up to prevent a lot of pain for other B1up users that has duplicate test env. 

    Unfortunately it's an easy mistake to make when coming from sql managment studio , and it reproduces if some one accidentally uses USE command on the TEST database . 

    E.g. 

    USE [prodDB]

    Select top 10 t0.* from OITM 

     

    If I run this accidentally on the TestDB the entire B1up DB on the prodDB is overwritten with the data from the TestDB. 

    please try to see if this reproduces on your system. maybe it's only an issue with old versions of B1UP 

    I'm running 2019.04.01.0

     

    Thank you !

     

     

    Comment actions Permalink
  • Avatar
    Yaremi Miranda Lopez

    Hello Nadav,

    For further investigation in this case, please contact your local partner, they will follow up this case with us.

    Thank you!

    Comment actions Permalink

Please sign in to leave a comment.