They are simply the up and down SQL statements divided by a magic comment ... and password in the config file or as program arguments and Tern will tunnel the database connection through that server.
Server hardware Licensing costs SQL Server and OS maintenance for Windows Server. The overall cost would be higher with add-on security, backup, and storage services. Windows dedicated server ...