Cannot execute DTS package

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Cannot execute DTS package

    Hello,

    Our SQL server used to run under System account, and I had no problems
    executing DTS packages from the ASP.NET:

    Dim oPkg As DTS.Package
    oPkg = CreateObject("DTS.Package")
    oPkg.LoadFromSQLServer("WIN2000", , ,
    DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrus tedConnection, , , ,
    "Import DPCK")
    oPkg.Execute()
    oPkg.UnInitialize()
    oPkg = Nothing

    Then we switched to the different account, and I cannot execute packages
    anymore. I tried all accounts, including thos that have full access and
    rights. If I use

    DTSSQLStgFlag_UseTrustedConnection

    I get this error

    System.Runtime.InteropServices.COMException (0x80040E4D): Login failed for
    user 'NT AUTHORITY\NETWORK SERVICE'. at
    DTS._Package.LoadFromSQLServer(String ServerName, String ServerUserName,
    String ServerPassword, DTSSQLServerStorageFlags Flags, String
    PackagePassword, String PackageGuid, String PackageVersionGuid, String
    PackageName, Object& pVarPersistStgOfHost) at
    MakeXeroxFiles.MakeFiles.btnMake_Click(Object sender, EventArgs e)

    If I use the flag DTSSQLStgFlag_Default and specify user name and password,
    I still get similar message:

    System.Runtime.InteropServices.COMException (0x80040E4D): Login failed for
    user 'SPECIALTY\pafo'. at DTS._Package.LoadFromSQLServer(String ServerName,
    String ServerUserName, String ServerPassword, DTSSQLServerStorageFlags
    Flags, String PackagePassword, String PackageGuid, String
    PackageVersionGuid, String PackageName, Object& pVarPersistStgOfHost) at
    MakeXeroxFiles.MakeFiles.btnMake_Click(Object sender, EventArgs e)

    If I add <identity impersonate="true" /> to the Web.config, I don't get an
    error anymore, but the package doesn't execute either.

    What can I do? I would appreciate your help very much.

    Thank you,


    --
    Peter Afonin


    Peter Afonin Guest

  2. Similar Questions and Discussions

    1. execute var from PHP in FLA
      Hi guys! I've made a form from where a user can sign up. Now I want to tjeck in the MySQL db if the email already exists. How is this done? I...
    2. [PHP] cannot execute?
      The path mogrify is in PATH for webserver user? Try exec("/path/to/mogrify ... Also, the webserver user have write (not only read) the file ? ...
    3. cannot execute?
      -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, can anyone tell me why following script does not resize image? It calls ImageMagick...
    4. Cannot execute ASP
      Dear all I got the warning message from event log after executing the asp page. Source: W3SVC Event ID: 36 The server failed to load...
    5. execute DTS package
      dtsrun is a command line utitlity which runs the DTS package. you can call this utitlity using xp_cmdshell inside a stored procedure. you can get...
  3. #2

    Default Re: Cannot execute DTS package

    good old asp.net.
    Whats happening is that it is trying to execute the Query with context of NT
    AUTHORITY\NETWORK SERVICE
    since you are using trusted connection.

    so either set up the above user to access SQL & the database.
    or just use impersonate identity tag to impersonate a fixed user.

    matrix detailing the execution context with asp.net
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetAP05.asp[/url]

    code project article which has snippet to allow aspnet account (worker
    process in 2003 runs under Network Server) to the database
    [url]http://www.codeproject.com/cs/database/sql_in_csharp.asp[/url]

    --

    Regards,

    Hermit Dave
    ([url]http://hdave.blogspot.com[/url])
    "Peter Afonin" <peter@gudzon.net> wrote in message
    news:uV0th3omEHA.592@TK2MSFTNGP11.phx.gbl...
    > Hello,
    >
    > Our SQL server used to run under System account, and I had no problems
    > executing DTS packages from the ASP.NET:
    >
    > Dim oPkg As DTS.Package
    > oPkg = CreateObject("DTS.Package")
    > oPkg.LoadFromSQLServer("WIN2000", , ,
    > DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrus tedConnection, , , ,
    > "Import DPCK")
    > oPkg.Execute()
    > oPkg.UnInitialize()
    > oPkg = Nothing
    >
    > Then we switched to the different account, and I cannot execute packages
    > anymore. I tried all accounts, including thos that have full access and
    > rights. If I use
    >
    > DTSSQLStgFlag_UseTrustedConnection
    >
    > I get this error
    >
    > System.Runtime.InteropServices.COMException (0x80040E4D): Login failed for
    > user 'NT AUTHORITY\NETWORK SERVICE'. at
    > DTS._Package.LoadFromSQLServer(String ServerName, String ServerUserName,
    > String ServerPassword, DTSSQLServerStorageFlags Flags, String
    > PackagePassword, String PackageGuid, String PackageVersionGuid, String
    > PackageName, Object& pVarPersistStgOfHost) at
    > MakeXeroxFiles.MakeFiles.btnMake_Click(Object sender, EventArgs e)
    >
    > If I use the flag DTSSQLStgFlag_Default and specify user name and
    password,
    > I still get similar message:
    >
    > System.Runtime.InteropServices.COMException (0x80040E4D): Login failed for
    > user 'SPECIALTY\pafo'. at DTS._Package.LoadFromSQLServer(String
    ServerName,
    > String ServerUserName, String ServerPassword, DTSSQLServerStorageFlags
    > Flags, String PackagePassword, String PackageGuid, String
    > PackageVersionGuid, String PackageName, Object& pVarPersistStgOfHost) at
    > MakeXeroxFiles.MakeFiles.btnMake_Click(Object sender, EventArgs e)
    >
    > If I add <identity impersonate="true" /> to the Web.config, I don't get an
    > error anymore, but the package doesn't execute either.
    >
    > What can I do? I would appreciate your help very much.
    >
    > Thank you,
    >
    >
    > --
    > Peter Afonin
    >
    >

    Hermit Dave Guest

  4. #3

    Default Re: Cannot execute DTS package

    Thank you very much, Hermit, it worked.

    The problem was that when I tried to add 'NT AUTHORITY\NETWORK SERVICE'
    manually in Enterprise Mgr - I couldn't find it (I don't understand why),
    but when I ran
    EXEC sp_grantlogin 'NT AUTHORITY\NETWORK SERVICE' - it worked.

    Peter

    "Hermit Dave" <hermitd.REMOVE@CAPS.AND.DOTS.hotmail.com> wrote in message
    news:uDzkzKpmEHA.1844@TK2MSFTNGP12.phx.gbl...
    > good old asp.net.
    > Whats happening is that it is trying to execute the Query with context of
    NT
    > AUTHORITY\NETWORK SERVICE
    > since you are using trusted connection.
    >
    > so either set up the above user to access SQL & the database.
    > or just use impersonate identity tag to impersonate a fixed user.
    >
    > matrix detailing the execution context with asp.net
    >
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetAP05.asp[/url]
    >
    > code project article which has snippet to allow aspnet account (worker
    > process in 2003 runs under Network Server) to the database
    > [url]http://www.codeproject.com/cs/database/sql_in_csharp.asp[/url]
    >
    > --
    >
    > Regards,
    >
    > Hermit Dave
    > ([url]http://hdave.blogspot.com[/url])
    > "Peter Afonin" <peter@gudzon.net> wrote in message
    > news:uV0th3omEHA.592@TK2MSFTNGP11.phx.gbl...
    > > Hello,
    > >
    > > Our SQL server used to run under System account, and I had no problems
    > > executing DTS packages from the ASP.NET:
    > >
    > > Dim oPkg As DTS.Package
    > > oPkg = CreateObject("DTS.Package")
    > > oPkg.LoadFromSQLServer("WIN2000", , ,
    > > DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrus tedConnection, , , ,
    > > "Import DPCK")
    > > oPkg.Execute()
    > > oPkg.UnInitialize()
    > > oPkg = Nothing
    > >
    > > Then we switched to the different account, and I cannot execute packages
    > > anymore. I tried all accounts, including thos that have full access and
    > > rights. If I use
    > >
    > > DTSSQLStgFlag_UseTrustedConnection
    > >
    > > I get this error
    > >
    > > System.Runtime.InteropServices.COMException (0x80040E4D): Login failed
    for
    > > user 'NT AUTHORITY\NETWORK SERVICE'. at
    > > DTS._Package.LoadFromSQLServer(String ServerName, String ServerUserName,
    > > String ServerPassword, DTSSQLServerStorageFlags Flags, String
    > > PackagePassword, String PackageGuid, String PackageVersionGuid, String
    > > PackageName, Object& pVarPersistStgOfHost) at
    > > MakeXeroxFiles.MakeFiles.btnMake_Click(Object sender, EventArgs e)
    > >
    > > If I use the flag DTSSQLStgFlag_Default and specify user name and
    > password,
    > > I still get similar message:
    > >
    > > System.Runtime.InteropServices.COMException (0x80040E4D): Login failed
    for
    > > user 'SPECIALTY\pafo'. at DTS._Package.LoadFromSQLServer(String
    > ServerName,
    > > String ServerUserName, String ServerPassword, DTSSQLServerStorageFlags
    > > Flags, String PackagePassword, String PackageGuid, String
    > > PackageVersionGuid, String PackageName, Object& pVarPersistStgOfHost) at
    > > MakeXeroxFiles.MakeFiles.btnMake_Click(Object sender, EventArgs e)
    > >
    > > If I add <identity impersonate="true" /> to the Web.config, I don't get
    an
    > > error anymore, but the package doesn't execute either.
    > >
    > > What can I do? I would appreciate your help very much.
    > >
    > > Thank you,
    > >
    > >
    > > --
    > > Peter Afonin
    > >
    > >
    >
    >

    Peter Afonin Guest

  5. #4

    Default Re: Cannot execute DTS package

    yeah i tried it through enterprise manager as well and finally i went the
    query analyser way to execute the stored procs :)

    --

    Regards,

    Hermit Dave
    ([url]http://hdave.blogspot.com[/url])
    "Peter Afonin" <peter@gudzon.net> wrote in message
    news:e9c1xAqmEHA.1692@TK2MSFTNGP10.phx.gbl...
    > Thank you very much, Hermit, it worked.
    >
    > The problem was that when I tried to add 'NT AUTHORITY\NETWORK SERVICE'
    > manually in Enterprise Mgr - I couldn't find it (I don't understand why),
    > but when I ran
    > EXEC sp_grantlogin 'NT AUTHORITY\NETWORK SERVICE' - it worked.
    >
    > Peter
    >
    > "Hermit Dave" <hermitd.REMOVE@CAPS.AND.DOTS.hotmail.com> wrote in message
    > news:uDzkzKpmEHA.1844@TK2MSFTNGP12.phx.gbl...
    > > good old asp.net.
    > > Whats happening is that it is trying to execute the Query with context
    of
    > NT
    > > AUTHORITY\NETWORK SERVICE
    > > since you are using trusted connection.
    > >
    > > so either set up the above user to access SQL & the database.
    > > or just use impersonate identity tag to impersonate a fixed user.
    > >
    > > matrix detailing the execution context with asp.net
    > >
    >
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetAP05.asp[/url]
    > >
    > > code project article which has snippet to allow aspnet account (worker
    > > process in 2003 runs under Network Server) to the database
    > > [url]http://www.codeproject.com/cs/database/sql_in_csharp.asp[/url]
    > >
    > > --
    > >
    > > Regards,
    > >
    > > Hermit Dave
    > > ([url]http://hdave.blogspot.com[/url])
    > > "Peter Afonin" <peter@gudzon.net> wrote in message
    > > news:uV0th3omEHA.592@TK2MSFTNGP11.phx.gbl...
    > > > Hello,
    > > >
    > > > Our SQL server used to run under System account, and I had no problems
    > > > executing DTS packages from the ASP.NET:
    > > >
    > > > Dim oPkg As DTS.Package
    > > > oPkg = CreateObject("DTS.Package")
    > > > oPkg.LoadFromSQLServer("WIN2000", , ,
    > > > DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrus tedConnection, , , ,
    > > > "Import DPCK")
    > > > oPkg.Execute()
    > > > oPkg.UnInitialize()
    > > > oPkg = Nothing
    > > >
    > > > Then we switched to the different account, and I cannot execute
    packages
    > > > anymore. I tried all accounts, including thos that have full access
    and
    > > > rights. If I use
    > > >
    > > > DTSSQLStgFlag_UseTrustedConnection
    > > >
    > > > I get this error
    > > >
    > > > System.Runtime.InteropServices.COMException (0x80040E4D): Login failed
    > for
    > > > user 'NT AUTHORITY\NETWORK SERVICE'. at
    > > > DTS._Package.LoadFromSQLServer(String ServerName, String
    ServerUserName,
    > > > String ServerPassword, DTSSQLServerStorageFlags Flags, String
    > > > PackagePassword, String PackageGuid, String PackageVersionGuid, String
    > > > PackageName, Object& pVarPersistStgOfHost) at
    > > > MakeXeroxFiles.MakeFiles.btnMake_Click(Object sender, EventArgs e)
    > > >
    > > > If I use the flag DTSSQLStgFlag_Default and specify user name and
    > > password,
    > > > I still get similar message:
    > > >
    > > > System.Runtime.InteropServices.COMException (0x80040E4D): Login failed
    > for
    > > > user 'SPECIALTY\pafo'. at DTS._Package.LoadFromSQLServer(String
    > > ServerName,
    > > > String ServerUserName, String ServerPassword, DTSSQLServerStorageFlags
    > > > Flags, String PackagePassword, String PackageGuid, String
    > > > PackageVersionGuid, String PackageName, Object& pVarPersistStgOfHost)
    at
    > > > MakeXeroxFiles.MakeFiles.btnMake_Click(Object sender, EventArgs e)
    > > >
    > > > If I add <identity impersonate="true" /> to the Web.config, I don't
    get
    > an
    > > > error anymore, but the package doesn't execute either.
    > > >
    > > > What can I do? I would appreciate your help very much.
    > > >
    > > > Thank you,
    > > >
    > > >
    > > > --
    > > > Peter Afonin
    > > >
    > > >
    > >
    > >
    >
    >

    Hermit Dave Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139