Link to home
Start Free TrialLog in
Avatar of Starr Duskk
Starr DuskkFlag for United States of America

asked on

How to give Network Service account permission to use sql server database

In another post I was told:
>>sp uses the IUSER account while asp.net using uses AUTHORITY\Network Service  account under windows 2000.
>> give the Network Service  account  permission to use the sql server databases

How do I do that? On the sql server2000 box or the web server box? Please give me more details on this. thanks!

Avatar of Sammy
Sammy
Flag of Canada image

Try this,
the commands worked ok on sql05 I think they will on 2000

exec sp_grantdbaccess 'NT AUTHORITY\NETWORK SERVICE'

exec sp_addsrvrolemember 'NT AUTHORITY\NETWORK SERVICE', 'securityadmin'

exec sp_addsrvrolemember 'NT AUTHORITY\NETWORK SERVICE', 'processadmin'
exec sp_addsrvrolemember 'NT AUTHORITY\NETWORK SERVICE', 'dbcreator'

exec sp_grantlogin 'NT AUTHORITY\NETWORK SERVICE'

go
ASKER CERTIFIED SOLUTION
Avatar of Sammy
Sammy
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Starr Duskk

ASKER

yay! you are a genius! thanks!
always do your best to stay away from ODBC, it too damn slow to do anything.
I usually do not consider ODBC unless I am 100% sure its the only option and I have yet to see that happen.
Now that I have sqlclient working, I wouldn't dream of using odbc. That was my last ditch effort to get anything to work just for debugging. My ultimate goal was getting the sqlclient to work. thanks!