Minimum user rights for connecting MS Sql database remotedly I have followed this tutorial for getting connected to a Microsoft SQL Server. I connect with ping functionality of Glassfish Server and thus I have to give some user rights to be able to even ping the Database.
My problem is that probably my user has not rights to take external connections to the database or even more sad, not any permissions. What kind of user permissions there should be applied before I can connect to my database with my user?
(I suppose there are needed some GRANTS before accessing the database, because making that on Mysql needed quite many of them. Now the actual problem is I could not apply the same queries here 'cause the SQL scripts are incombatible)
Check for "CONNECT" rights

SELECT SUSER_NAME(grantee_principal_id), * 
FROM sys.server_permissions WHERE type = 'COSQ'
GO
USE MYDB
GO
SELECT USER_NAME(grantee_principal_id), * 
FROM sys.database_permissions WHERE type = 'CO'


To fix as needed

USE master
GO
GRANT CONNECT SQL TO myLogin
GO
USE MYDB
GO
GRANT CONNECT TO MyUser
GO