dbTalk Databases Forums  

DTS not executing at the Web server from ASP page.

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss DTS not executing at the Web server from ASP page. in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bona
 
Posts: n/a

Default DTS not executing at the Web server from ASP page. - 12-08-2003 , 11:04 PM






DTS package (MS SQL server 2000) reads data from a text
file, then populates a table, then from that table
populates five tables, depending of the values in each
record.
The package executes OK on developers PC from SQL
Enterprise Manager, as well as from ASP page running on
local host.
At web site it executes from SQL Enterprise Manager
without problems. But when trying to execute it from ASP
page, it failed. I cannot get error messages, so my only
guess that it because of user permissions?

I used in ASP pages two methods of running DTS:
1. Calling stored procedure, which contains single line:

EXEC
master..xp_cmdshell 'dtsrun /Smyserver /NImportData /Uus
er /Ppwd '

2. Creating package object and executing it.

Set oPkg = CreateObject("DTS.Package")

oPkg.LoadFromSQLServer

msDTSServer,msDTSUser, msPass,
DTSSQLStgFlag_Default,"","","", msDTSPkg

oPkg.Execute()

' Displaying results of execution
For Each oStep In oPkg.Steps
response.Write(" Pkg Step " & oStep.Name
& " " )

If oStep.ExecutionResult =
DTSStepExecResult_Failure Then
response.Write(" failed<br>" )
bStatus = False
Else
response.Write( " succeeded<br>" )
End If

response.Write( "<br>Task """ & oPkg.Tasks
(oStep.TaskName).Description & """<br>" )
Next

Both methods are working on developers PC, but failed at
the web server.
Calling stored procedure manually succeeded at developers
database, but failed at web server.
Interestingly, the very first step was succeeded and that
step did not required SQL server authentication.

I would appreciate any suggestions. Thanks.

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS not executing at the Web server from ASP page. - 12-09-2003 , 03:39 AM






What errors do you get ?

Execute a package from Active Server Pages (ASP)
(http://www.sqldts.com/default.aspx?207)

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Bona" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
DTS package (MS SQL server 2000) reads data from a text
file, then populates a table, then from that table
populates five tables, depending of the values in each
record.
The package executes OK on developers PC from SQL
Enterprise Manager, as well as from ASP page running on
local host.
At web site it executes from SQL Enterprise Manager
without problems. But when trying to execute it from ASP
page, it failed. I cannot get error messages, so my only
guess that it because of user permissions?

I used in ASP pages two methods of running DTS:
1. Calling stored procedure, which contains single line:

EXEC
master..xp_cmdshell 'dtsrun /Smyserver /NImportData /Uus
er /Ppwd '

2. Creating package object and executing it.

Set oPkg = CreateObject("DTS.Package")

oPkg.LoadFromSQLServer

msDTSServer,msDTSUser, msPass,
DTSSQLStgFlag_Default,"","","", msDTSPkg

oPkg.Execute()

' Displaying results of execution
For Each oStep In oPkg.Steps
response.Write(" Pkg Step " & oStep.Name
& " " )

If oStep.ExecutionResult =
DTSStepExecResult_Failure Then
response.Write(" failed<br>" )
bStatus = False
Else
response.Write( " succeeded<br>" )
End If

response.Write( "<br>Task """ & oPkg.Tasks
(oStep.TaskName).Description & """<br>" )
Next

Both methods are working on developers PC, but failed at
the web server.
Calling stored procedure manually succeeded at developers
database, but failed at web server.
Interestingly, the very first step was succeeded and that
step did not required SQL server authentication.

I would appreciate any suggestions. Thanks.



Reply With Quote
  #3  
Old   
Bona
 
Posts: n/a

Default Re: DTS not executing at the Web server from ASP page. - 12-09-2003 , 05:56 AM



Thanks for your reply, Allan.
I downloaded a sample from
http://www.sqldts.com/default.aspx?207. Here is the exact
output of the execution:
' output start:

Executing ImportData_FCF from MYServer

Step [DTSStep_DTSExecuteSQLTask_1] succeeded
Task "Create test_stem"

Step [DTSStep_DTSDataPumpTask_1] failed
Task "Transform Data Task: undefined"

Step [DTSStep_DTSExecuteSQLTask_2] failed
Task "Dev HStemID"

Step [DTSStep_DTSExecuteSQLTask_3] failed
Task "Pop ao53"

Step [DTSStep_DTSExecuteSQLTask_4] failed
Task "Pop AO54"

Step [DTSStep_DTSExecuteSQLTask_5] failed
Task "Pop AO52"

Step [DTSStep_DTSExecuteSQLTask_6] failed
Task "Pop A056"

Package [ImportData_FCF] failed

Done

' -- output end

The very first task succeeded: it is creating temporary
table. The next steps requires connection, using SQL
server authentication. It seems that it failed. Although I
can run the package from Enterprise Manager, logging with
the same user name/password as I supplied from ASP page.




Quote:
-----Original Message-----
What errors do you get ?

Execute a package from Active Server Pages (ASP)
(http://www.sqldts.com/default.aspx?207)

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Bona" <anonymous (AT) discussions (DOT) microsoft.com> wrote in
message
news:fa5501c3be11$ed85db80$a601280a (AT) phx (DOT) gbl...
DTS package (MS SQL server 2000) reads data from a text
file, then populates a table, then from that table
populates five tables, depending of the values in each
record.
The package executes OK on developers PC from SQL
Enterprise Manager, as well as from ASP page running on
local host.
At web site it executes from SQL Enterprise Manager
without problems. But when trying to execute it from ASP
page, it failed. I cannot get error messages, so my only
guess that it because of user permissions?

I used in ASP pages two methods of running DTS:
1. Calling stored procedure, which contains single
line:

EXEC

master..xp_cmdshell 'dtsrun /Smyserver /NImportData /Uus
er /Ppwd '

2. Creating package object and executing it.

Set oPkg = CreateObject("DTS.Package")

oPkg.LoadFromSQLServer

msDTSServer,msDTSUser, msPass,
DTSSQLStgFlag_Default,"","","", msDTSPkg

oPkg.Execute()

' Displaying results of execution
For Each oStep In oPkg.Steps
response.Write(" Pkg Step " & oStep.Name
& " " )

If oStep.ExecutionResult =
DTSStepExecResult_Failure Then
response.Write(" failed<br>" )
bStatus = False
Else
response.Write( " succeeded<br>" )
End If

response.Write( "<br>Task """ & oPkg.Tasks
(oStep.TaskName).Description & """<br>" )
Next

Both methods are working on developers PC, but failed at
the web server.
Calling stored procedure manually succeeded at
developers
database, but failed at web server.
Interestingly, the very first step was succeeded and
that
step did not required SQL server authentication.

I would appreciate any suggestions. Thanks.


.


Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS not executing at the Web server from ASP page. - 12-09-2003 , 02:18 PM



It would definitiely appear that the problem is in your authentication and
permissions then. I would go back and retrace the steps. Also look at
Profiler and monitor Logon Failed events. This will tell you who is getting
bounced

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Bona" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Thanks for your reply, Allan.
I downloaded a sample from
http://www.sqldts.com/default.aspx?207. Here is the exact
output of the execution:
' output start:

Executing ImportData_FCF from MYServer

Step [DTSStep_DTSExecuteSQLTask_1] succeeded
Task "Create test_stem"

Step [DTSStep_DTSDataPumpTask_1] failed
Task "Transform Data Task: undefined"

Step [DTSStep_DTSExecuteSQLTask_2] failed
Task "Dev HStemID"

Step [DTSStep_DTSExecuteSQLTask_3] failed
Task "Pop ao53"

Step [DTSStep_DTSExecuteSQLTask_4] failed
Task "Pop AO54"

Step [DTSStep_DTSExecuteSQLTask_5] failed
Task "Pop AO52"

Step [DTSStep_DTSExecuteSQLTask_6] failed
Task "Pop A056"

Package [ImportData_FCF] failed

Done

' -- output end

The very first task succeeded: it is creating temporary
table. The next steps requires connection, using SQL
server authentication. It seems that it failed. Although I
can run the package from Enterprise Manager, logging with
the same user name/password as I supplied from ASP page.




-----Original Message-----
What errors do you get ?

Execute a package from Active Server Pages (ASP)
(http://www.sqldts.com/default.aspx?207)

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Bona" <anonymous (AT) discussions (DOT) microsoft.com> wrote in
message
news:fa5501c3be11$ed85db80$a601280a (AT) phx (DOT) gbl...
DTS package (MS SQL server 2000) reads data from a text
file, then populates a table, then from that table
populates five tables, depending of the values in each
record.
The package executes OK on developers PC from SQL
Enterprise Manager, as well as from ASP page running on
local host.
At web site it executes from SQL Enterprise Manager
without problems. But when trying to execute it from ASP
page, it failed. I cannot get error messages, so my only
guess that it because of user permissions?

I used in ASP pages two methods of running DTS:
1. Calling stored procedure, which contains single
line:

EXEC

master..xp_cmdshell 'dtsrun /Smyserver /NImportData /Uus
er /Ppwd '

2. Creating package object and executing it.

Set oPkg = CreateObject("DTS.Package")

oPkg.LoadFromSQLServer

msDTSServer,msDTSUser, msPass,
DTSSQLStgFlag_Default,"","","", msDTSPkg

oPkg.Execute()

' Displaying results of execution
For Each oStep In oPkg.Steps
response.Write(" Pkg Step " & oStep.Name
& " " )

If oStep.ExecutionResult =
DTSStepExecResult_Failure Then
response.Write(" failed<br>" )
bStatus = False
Else
response.Write( " succeeded<br>" )
End If

response.Write( "<br>Task """ & oPkg.Tasks
(oStep.TaskName).Description & """<br>" )
Next

Both methods are working on developers PC, but failed at
the web server.
Calling stored procedure manually succeeded at
developers
database, but failed at web server.
Interestingly, the very first step was succeeded and
that
step did not required SQL server authentication.

I would appreciate any suggestions. Thanks.


.




Reply With Quote
  #5  
Old   
Bona
 
Posts: n/a

Default Re: DTS not executing at the Web server from ASP page. - 12-09-2003 , 04:23 PM



Thanks, Allan. I will do that.

Quote:
-----Original Message-----
It would definitiely appear that the problem is in your
authentication and
permissions then. I would go back and retrace the
steps. Also look at
Profiler and monitor Logon Failed events. This will tell
you who is getting
bounced

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Bona" <anonymous (AT) discussions (DOT) microsoft.com> wrote in
message
news:ffa501c3be4b$6a550fd0$a601280a (AT) phx (DOT) gbl...
Thanks for your reply, Allan.
I downloaded a sample from
http://www.sqldts.com/default.aspx?207. Here is the
exact
output of the execution:
' output start:

Executing ImportData_FCF from MYServer

Step [DTSStep_DTSExecuteSQLTask_1] succeeded
Task "Create test_stem"

Step [DTSStep_DTSDataPumpTask_1] failed
Task "Transform Data Task: undefined"

Step [DTSStep_DTSExecuteSQLTask_2] failed
Task "Dev HStemID"

Step [DTSStep_DTSExecuteSQLTask_3] failed
Task "Pop ao53"

Step [DTSStep_DTSExecuteSQLTask_4] failed
Task "Pop AO54"

Step [DTSStep_DTSExecuteSQLTask_5] failed
Task "Pop AO52"

Step [DTSStep_DTSExecuteSQLTask_6] failed
Task "Pop A056"

Package [ImportData_FCF] failed

Done

' -- output end

The very first task succeeded: it is creating temporary
table. The next steps requires connection, using SQL
server authentication. It seems that it failed.
Although I
can run the package from Enterprise Manager, logging
with
the same user name/password as I supplied from ASP page.




-----Original Message-----
What errors do you get ?

Execute a package from Active Server Pages (ASP)
(http://www.sqldts.com/default.aspx?207)

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Bona" <anonymous (AT) discussions (DOT) microsoft.com> wrote in
message
news:fa5501c3be11$ed85db80$a601280a (AT) phx (DOT) gbl...
DTS package (MS SQL server 2000) reads data from a
text
file, then populates a table, then from that table
populates five tables, depending of the values in
each
record.
The package executes OK on developers PC from SQL
Enterprise Manager, as well as from ASP page running
on
local host.
At web site it executes from SQL Enterprise Manager
without problems. But when trying to execute it from
ASP
page, it failed. I cannot get error messages, so my
only
guess that it because of user permissions?

I used in ASP pages two methods of running DTS:
1. Calling stored procedure, which contains single
line:

EXEC


master..xp_cmdshell 'dtsrun /Smyserver /NImportData /Uus
er /Ppwd '

2. Creating package object and executing it.

Set oPkg = CreateObject("DTS.Package")

oPkg.LoadFromSQLServer

msDTSServer,msDTSUser, msPass,
DTSSQLStgFlag_Default,"","","", msDTSPkg

oPkg.Execute()

' Displaying results of execution
For Each oStep In oPkg.Steps
response.Write(" Pkg Step " & oStep.Name
& " " )

If oStep.ExecutionResult =
DTSStepExecResult_Failure Then
response.Write(" failed<br>" )
bStatus = False
Else
response.Write( " succeeded<br>" )
End If

response.Write( "<br>Task """ & oPkg.Tasks
(oStep.TaskName).Description & """<br>" )
Next

Both methods are working on developers PC, but
failed at
the web server.
Calling stored procedure manually succeeded at
developers
database, but failed at web server.
Interestingly, the very first step was succeeded and
that
step did not required SQL server authentication.

I would appreciate any suggestions. Thanks.


.



.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.