You can use any RDBMS you want, as long as you provide a jdbc driver to connect to the Glassfish server You have to put the jdbc driver on glass board domains and create a jdbc pool for it
Also, for sql server you have to enable tcp port (default: 1433)
source
to share