Home All Groups Group Topic Archive Search About

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

Author
18 Aug 2005 7:48 PM
ninel gorbunov via SQLMonster.com
I am trying to execute a DTS package from vb.net.
On my local machine I had no issues, but as soon as I uploaded to my
company's server I received the following error "Login failed for user 'NT
AUTHORITY\NETWORK SERVICE'".

I searched on google and found someone's solution:
I executed this statement: exec sp_grantlogin N'NT AUTHORITY\NETWORK SERVICE'


I don't receive the 'NT AUTHORITY\NETWORK SERVICE' error anymore, but now get
this error: "Cannot open database requested in login 'timeControl'. Login
fails."

Does anyone have any ideas????


--
Message posted via http://www.sqlmonster.com

Author
18 Aug 2005 7:58 PM
Mike Jansen
From context of database, execute:
    EXEC sp_grantdbaccess N'NT AUTHORITY\NETWORK SERVICE'

Also give whatever permissions beyond public that are needed to do the work.

To access something a user must:
1. Be given access to the Server via sp_grantlogin.  This creates the SQL
server "login"
2. Be given access to the Database via sp_grantdblogin.  This creates a
database "user" and maps the login to the user
3. Be given specific permissions to objects that must be accessed via GRANT.

You can also do all this graphically via Enterprise Manager.

Mike


Show quote
"ninel gorbunov via SQLMonster.com" <fo***@SQLMonster.com> wrote in message
news:530A7FA8C4856@SQLMonster.com...
>I am trying to execute a DTS package from vb.net.
> On my local machine I had no issues, but as soon as I uploaded to my
> company's server I received the following error "Login failed for user 'NT
> AUTHORITY\NETWORK SERVICE'".
>
> I searched on google and found someone's solution:
> I executed this statement: exec sp_grantlogin N'NT AUTHORITY\NETWORK
> SERVICE'
>
>
> I don't receive the 'NT AUTHORITY\NETWORK SERVICE' error anymore, but now
> get
> this error: "Cannot open database requested in login 'timeControl'. Login
> fails."
>
> Does anyone have any ideas????
>
>
> --
> Message posted via http://www.sqlmonster.com
Author
18 Aug 2005 8:02 PM
Mike Jansen
> 2. Be given access to the Database via sp_grantdblogin.  This creates a
> database "user" and maps the login to the user

Sorry -- typo.  Should be sp_grantdbaccess.
Author
18 Aug 2005 8:12 PM
pmud
Hi Ninel,

The NT Authority\Network Service Account should have sufficient persmissions
on the database.
--
pmud


Show quote
"Mike Jansen" wrote:

> > 2. Be given access to the Database via sp_grantdblogin.  This creates a
> > database "user" and maps the login to the user
>
> Sorry -- typo.  Should be sp_grantdbaccess.
>
>
>

AddThis Social Bookmark Button