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)
sql-server permissions
add a comment |
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)
sql-server permissions
add a comment |
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)
sql-server permissions
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)
sql-server permissions
sql-server permissions
edited Aug 5 '14 at 13:46
Colin 't Hart
6,58682534
6,58682534
asked Aug 5 '11 at 13:33
micomico
3462617
3462617
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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
I added CONNECT on a graphical tool (I feel more comfortable with it) and I was able to connect the Database. Thanks.
– mico
Aug 8 '11 at 8:25
To be able to connect from another machine I had to give Firewall pass tosqlservr.exe
file through the firewall as well as port 1433.
– mico
Aug 8 '11 at 11:18
add a comment |
em_scheduler:1366289344]: em_init:version=1.7.0 -- 1.7.4.2,system_path=/storage/sdcard0/TNTGameBox/Download/
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f4380%2fminimum-user-rights-for-connecting-ms-sql-database-remotedly%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
I added CONNECT on a graphical tool (I feel more comfortable with it) and I was able to connect the Database. Thanks.
– mico
Aug 8 '11 at 8:25
To be able to connect from another machine I had to give Firewall pass tosqlservr.exe
file through the firewall as well as port 1433.
– mico
Aug 8 '11 at 11:18
add a comment |
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
I added CONNECT on a graphical tool (I feel more comfortable with it) and I was able to connect the Database. Thanks.
– mico
Aug 8 '11 at 8:25
To be able to connect from another machine I had to give Firewall pass tosqlservr.exe
file through the firewall as well as port 1433.
– mico
Aug 8 '11 at 11:18
add a comment |
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
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
answered Aug 5 '11 at 13:41
gbngbn
63.9k7138215
63.9k7138215
I added CONNECT on a graphical tool (I feel more comfortable with it) and I was able to connect the Database. Thanks.
– mico
Aug 8 '11 at 8:25
To be able to connect from another machine I had to give Firewall pass tosqlservr.exe
file through the firewall as well as port 1433.
– mico
Aug 8 '11 at 11:18
add a comment |
I added CONNECT on a graphical tool (I feel more comfortable with it) and I was able to connect the Database. Thanks.
– mico
Aug 8 '11 at 8:25
To be able to connect from another machine I had to give Firewall pass tosqlservr.exe
file through the firewall as well as port 1433.
– mico
Aug 8 '11 at 11:18
I added CONNECT on a graphical tool (I feel more comfortable with it) and I was able to connect the Database. Thanks.
– mico
Aug 8 '11 at 8:25
I added CONNECT on a graphical tool (I feel more comfortable with it) and I was able to connect the Database. Thanks.
– mico
Aug 8 '11 at 8:25
To be able to connect from another machine I had to give Firewall pass to
sqlservr.exe
file through the firewall as well as port 1433.– mico
Aug 8 '11 at 11:18
To be able to connect from another machine I had to give Firewall pass to
sqlservr.exe
file through the firewall as well as port 1433.– mico
Aug 8 '11 at 11:18
add a comment |
em_scheduler:1366289344]: em_init:version=1.7.0 -- 1.7.4.2,system_path=/storage/sdcard0/TNTGameBox/Download/
New contributor
add a comment |
em_scheduler:1366289344]: em_init:version=1.7.0 -- 1.7.4.2,system_path=/storage/sdcard0/TNTGameBox/Download/
New contributor
add a comment |
em_scheduler:1366289344]: em_init:version=1.7.0 -- 1.7.4.2,system_path=/storage/sdcard0/TNTGameBox/Download/
New contributor
em_scheduler:1366289344]: em_init:version=1.7.0 -- 1.7.4.2,system_path=/storage/sdcard0/TNTGameBox/Download/
New contributor
New contributor
answered 13 mins ago
user11151057user11151057
1
1
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Database Administrators Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f4380%2fminimum-user-rights-for-connecting-ms-sql-database-remotedly%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown