sql output configuration and accessing