Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 sp_grantlogin

Author  Topic 

Johnho008
Starting Member

24 Posts

Posted - 2008-06-04 : 07:36:33
Hi Everyone

I am trying to grant a network user onto the SQL box.
EXEC sp_grantlogin '{domainname}' with result 'Granted login access to '{domainname}' but when I check it
SELECT * FROM sysusers WHERE name like '%{domainname}%' its not there, nor is it there when I use the SQL management. Can add {domainname} manually. Why isn't the script working?

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-06-04 : 09:23:39
It has to be in Domain before you can grant.
Go to Top of Page

Johnho008
Starting Member

24 Posts

Posted - 2008-06-04 : 10:02:03
The user is already part of the domain. I can add the user manually via sql management console.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-06-04 : 10:05:40
Then what is the issue? Did you assign proper rights to him?
Go to Top of Page

Johnho008
Starting Member

24 Posts

Posted - 2008-06-05 : 04:41:25
I am trying to do it via script and wondering if I am doing it wrong.
Go to Top of Page

Johnho008
Starting Member

24 Posts

Posted - 2008-06-05 : 05:02:46
I have to Apologise for this post as I have just realised what I have done wrong. The sp_grantlogin did work but it was when I tried to check it and use 'SELECT * FROM sysusers WHERE name like '%{domainname}%' it was only check the user on the database I was on and not the SQL secuirty!! hence why it wasn't there! Would blame it being a monday but it was posted on a tuesday!
Thank, sodeep, for replying
Go to Top of Page
   

- Advertisement -