connect db by protect query sql