Wednesday, August 29, 2018

Testing SQL connection using file.udl trick

Besides the usual
>telnet SQLname 1433

One can create a file and open it (note: show the extention in your File Explorer settings)
TestDatabase.udl 


Source
https://dougrathbone.com/blog/2013/11/18/testing-connectivity-to-microsoft-sql-server-without-any-tools-installed

Friday, August 24, 2018

Set Default template for SSMS New Query button by editing SQLFile.sql




  1. Go to SQL install path, for me it's "C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\SqlWorkbenchProjectItems\Sql"
  2. Edit the SQLFile.sql in Admin mode
  3. Type in whatever you want for default
  4. Save and try in SSMS [New Query] button



Source
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b56b9ed6-1786-4ad6-87c9-7e4e81068672/how-to-set-the-default-query-for-the-ssms-new-query-button?forum=transactsql