473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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
Nov 18 '05 #1
3 5079
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
http://msdn.microsoft.com/library/de...SecNetAP05.asp

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

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"Peter Afonin" <pe***@gudzon.net> wrote in message
news:uV*************@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

Nov 18 '05 #2
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" <he************@CAPS.AND.DOTS.hotmail.com> wrote in message
news:uD**************@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
http://msdn.microsoft.com/library/de...SecNetAP05.asp
code project article which has snippet to allow aspnet account (worker
process in 2003 runs under Network Server) to the database
http://www.codeproject.com/cs/databa..._in_csharp.asp

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"Peter Afonin" <pe***@gudzon.net> wrote in message
news:uV*************@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


Nov 18 '05 #3
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
(http://hdave.blogspot.com)
"Peter Afonin" <pe***@gudzon.net> wrote in message
news:e9**************@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" <he************@CAPS.AND.DOTS.hotmail.com> wrote in message
news:uD**************@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

http://msdn.microsoft.com/library/de...SecNetAP05.asp

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

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"Peter Afonin" <pe***@gudzon.net> wrote in message
news:uV*************@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



Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rich Tasker | last post by:
My goal is to execute a DTS package that calls multiple child DTS packages from a C# (2003) app and display the progress of the entire process to the user. I have followed the model defined in...
10
by: bdwgarth | last post by:
I have created a functioning DTS package inside Enterprise Manager and now I want to be able to execute it outside of EM. The package imports data from an SQL dbase to a Visual FoxPro dbase. I...
0
by: Jean-Marc Blaise | last post by:
Hi, A "grant control" on a package used by a stored procedure, implies execute permission ... However, how can USER2 drop and modify a procedure created by USER1 - there is no "GRANT DROP" ......
0
by: CodeRazor | last post by:
How can I execute a DTS package from an asp.net page? I found the code below online, and altough it throws no errors, it doesnt execute the dts package either? What am i missing? ...
0
by: Peter Afonin | last post by:
Hello: I've got another problem executing DTS package from ASP.Net. I use this code: Dim oPkg As DTS.Package oPkg = CreateObject("DTS.Package") oPkg.LoadFromSQLServer("WIN2000", "UID",...
2
by: Ray5531 | last post by:
Hello, I'm calling a DTS package from my asp.net application.Apparently because of permission issue I canot run the package within the sql server ,because when I set it to call a package from my...
6
by: amoldiego | last post by:
Dear all, 1) I have created package ref test for declaring ref cursor as shown ..... create or replace package ref_test as type empty is ref cursor; end; 2)
0
by: Alan Isaac | last post by:
This is really a repackaging of an earlier question, probably illustrating that I still do not understand relative imports. Suppose I have the package structure (taken from the example at...
2
by: pvong | last post by:
I'm new to SSIS. Can someone point me in the right direction on how to execute an SSIS package from a button OnClick? With DTS in SQL2000, I just created a job that ran the DTS package and then...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.