dbTalk Databases Forums  

ActiveX Cannot Create Object

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


Discuss ActiveX Cannot Create Object in the microsoft.public.sqlserver.dts forum.



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

Default ActiveX Cannot Create Object - 05-10-2005 , 09:04 AM






I have a dts pacakge in which an ActiveX Script task probes outlook inbox
saves the excel attachment. This runs fine when I execute the package
manually, when I put the package on scheduler I get an error stating ActiveX
cannot create object(Outlook.Application) Access Denied.

What could be the problem?

Reply With Quote
  #2  
Old   
Helge C. Rutz
 
Posts: n/a

Default Re: ActiveX Cannot Create Object - 05-10-2005 , 12:41 PM






Hi Karunakaran,

"Karunakaran" <Karunakaran (AT) discussions (DOT) microsoft.com> schrieb im
Newsbeitrag news:59F67E74-79BC-433F-B56F-31FBCFFD87C5 (AT) microsoft (DOT) com...
Quote:
I have a dts pacakge in which an ActiveX Script task probes outlook inbox
saves the excel attachment. This runs fine when I execute the package
manually, when I put the package on scheduler I get an error stating
ActiveX
cannot create object(Outlook.Application) Access Denied.
when you run the packlage interactivly in designer, it is run in your user
context on your machine.
When you schedule the package it is executed by the sqlagent on the sql
server in the context of the agent service account.

Is Outlook installed on the server?
Which account runs the sql agent service under, is this a valid user
account?
Is the user executing the job member of the sysadmin role, or have you the
proxy account configured for the sql agent?
Has the user a valid mail profile to start outlook?
AFAIK outlook needs always a configured mail profile to run.
Login localy with this account and try to start Outlook and the script.

Helge




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

Default Re: ActiveX Cannot Create Object - 05-10-2005 , 02:49 PM



It is invariably to do with permissions or execution context


Have a look at this


http://support.microsoft.com/Default.aspx?kbid=269074





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


Quote:
I have a dts pacakge in which an ActiveX Script task probes outlook inbox
saves the excel attachment. This runs fine when I execute the package
manually, when I put the package on scheduler I get an error stating ActiveX
cannot create object(Outlook.Application) Access Denied.

What could be the problem?


Reply With Quote
  #4  
Old   
Karunakaran
 
Posts: n/a

Default Re: ActiveX Cannot Create Object - 05-11-2005 , 01:23 AM



This is the error I get:

I changed the job owner to the login which I used to execute the dts
manually. Still I get the same error.

DTSRun: Executing... DTSRun OnStart: DTSStep_DTSDynamicPropertiesTask_1
DTSRun OnFinish: DTSStep_DTSDynamicPropertiesTask_1 DTSRun OnStart:
DTSStep_DTSActiveScriptTask_3 DTSRun OnError: DTSStep_DTSActiveScriptTask_3,
Error = -2147220482 (800403FE) Error string: Error Code: 0
Error Source= Microsoft VBScript runtime error
Error Description: ActiveX component can't create object:
'Outlook.Application'
Error on Line 24
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp
Help context: 1100
Error Detail Records:
Error: -2147220482 (800403FE);
Provider Error: 0 (0)
Error string: Error Code: 0
Error Source= Microsoft VBScript runtime error
Error Description: ActiveX component can't create object:
'Outlook.Application' Error on Line 24
Error source: Microsoft Data Transformation Services (DTS) Package Help
file: sqldts80.hlp Help conte... Process Exit Code 1. The step failed.


"Allan Mitchell" wrote:

Quote:
It is invariably to do with permissions or execution context
Have a look at this
http://support.microsoft.com/Default.aspx?kbid=269074

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

Default Re: ActiveX Cannot Create Object - 05-11-2005 , 02:17 PM



OK So just because it is you as the job owner you still might not be the
person firing things.

The DTSStep_DTSDynamicPropertiesTask is a 2000 feature so what is the
box that run this as a scheduled job?



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


Quote:
This is the error I get:

I changed the job owner to the login which I used to execute the dts
manually. Still I get the same error.

DTSRun: Executing... DTSRun OnStart: DTSStep_DTSDynamicPropertiesTask_1
DTSRun OnFinish: DTSStep_DTSDynamicPropertiesTask_1 DTSRun OnStart:
DTSStep_DTSActiveScriptTask_3 DTSRun OnError: DTSStep_DTSActiveScriptTask_3,
Error = -2147220482 (800403FE) Error string: Error Code: 0
Error Source= Microsoft VBScript runtime error
Error Description: ActiveX component can't create object:
'Outlook.Application'
Error on Line 24
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp
Help context: 1100
Error Detail Records:
Error: -2147220482 (800403FE);
Provider Error: 0 (0)
Error string: Error Code: 0
Error Source= Microsoft VBScript runtime error
Error Description: ActiveX component can't create object:
'Outlook.Application' Error on Line 24
Error source: Microsoft Data Transformation Services (DTS) Package Help
file: sqldts80.hlp Help conte... Process Exit Code 1. The step failed.


"Allan Mitchell" wrote:

It is invariably to do with permissions or execution context
Have a look at this
http://support.microsoft.com/Default.aspx?kbid=269074


Reply With Quote
  #6  
Old   
Karunakaran
 
Posts: n/a

Default Re: ActiveX Cannot Create Object - 05-11-2005 , 11:23 PM



The Box is a dedicated DB Server Running on Window 2003 Server. Sql Server
2000 Enterprise Edition, With MS Office and Outlook installed.

The DTS is on the same box. The functionality of DTS is:

1.Probe Outlook inbox for new message with attachment.
2.If any attachment is there, check the attachment for a predefined file
name format like MMDDYYYY.xls kind
3. Open the attachment with Excel Object attach a macro to it, run that
macro save the excel file in a folder.
4.Set the Excel file as the current datasource for the transformation to Sql
server
5. Transfer Data from Excel file to Sql server and do other manipulations in
Sql server.

Every step of this works fine If I execute manually put it on a scheduler it
fails to create object. I tried making the owner as the windows login I used
to log to the server/ tried with sa username, tried changing the user which
starts the sql server and sql server agent ...what else I could find in the
net, but still couldnt get this working...

Only thing which I havent tried is KB article posted on MS site, which talks
about dcomcnfg.exe but then I'm not sure how to configure it, when I run that
exe all i get is some list on the left pane.

Reply With Quote
  #7  
Old   
Helge C. Rutz
 
Posts: n/a

Default Re: ActiveX Cannot Create Object - 05-12-2005 , 04:53 AM



Hi Karunakaran,

"Karunakaran" <Karunakaran (AT) discussions (DOT) microsoft.com> schrieb im
Newsbeitrag news:B09BB568-C481-4921-9793-AAED8E7857FC (AT) microsoft (DOT) com...
Quote:
The Box is a dedicated DB Server Running on Window 2003 Server. Sql
Server
2000 Enterprise Edition, With MS Office and Outlook installed.
have you SP1 installed on that w2k3 server?
SP1 changed some security settings for DCOM & MSDTC which caused some
trouble.

Quote:
Only thing which I havent tried is KB article posted on MS site, which
talks
about dcomcnfg.exe but then I'm not sure how to configure it, when I run
that
exe all i get is some list on the left pane.
I think thats the right direction. Select Component Services\Computer\My
Computer and right klick, choose Properties and check the settings on the
"Default COM Security" page.

Helge




Reply With Quote
  #8  
Old   
Karunakaran
 
Posts: n/a

Default Re: ActiveX Cannot Create Object - 05-12-2005 , 07:26 AM



I tried changing the access and launch permissions to the nt domain account,
still I get the same error. "Cant create object Outlook.Application"

"Helge C. Rutz" wrote:

Quote:
Hi Karunakaran,

"Karunakaran" <Karunakaran (AT) discussions (DOT) microsoft.com> schrieb im
Newsbeitrag news:B09BB568-C481-4921-9793-AAED8E7857FC (AT) microsoft (DOT) com...
The Box is a dedicated DB Server Running on Window 2003 Server. Sql
Server
2000 Enterprise Edition, With MS Office and Outlook installed.
have you SP1 installed on that w2k3 server?
SP1 changed some security settings for DCOM & MSDTC which caused some
trouble.


Only thing which I havent tried is KB article posted on MS site, which
talks
about dcomcnfg.exe but then I'm not sure how to configure it, when I run
that
exe all i get is some list on the left pane.
I think thats the right direction. Select Component Services\Computer\My
Computer and right klick, choose Properties and check the settings on the
"Default COM Security" page.

Helge




Reply With Quote
  #9  
Old   
Helge C. Rutz
 
Posts: n/a

Default Re: ActiveX Cannot Create Object - 05-12-2005 , 11:48 AM



Hi Karunakaran,

"Karunakaran" <Karunakaran (AT) discussions (DOT) microsoft.com> schrieb im
Newsbeitrag news:E2CEEBC1-DB12-4EEC-A6C1-41B8D619A40A (AT) microsoft (DOT) com...
Quote:
I tried changing the access and launch permissions to the nt domain
account,
still I get the same error. "Cant create object Outlook.Application"
there are three articles you should check
http://support.microsoft.com/default...b;en-us;237913
http://support.microsoft.com/?scid=k...57757&x=4&y=15
http://support.microsoft.com/default...b;en-us;828550

Just to clarify what you have done exactly :
You logged in as a domain user, configured Outlook with mailprofile ...,
and also tested your vbscript to process an incoming mail, and it worked?
You logged of, logged in with a different user.
Then you configured SQL Server and SQL Server Agent to run under the
configured domain account, restarted both, scheduled the DTS package, and
it failed?

If your problem is related to outlook limitations - I never tried to
automate outlook from a service - then you shoul try the excel automation
only.
If that works, you could workaround with SQL Mail
With SQL Mail you have the Outlook Mail support embedded in SQL Server.
The xp_readmail proc gives you the mail and also gives you the pathes to
the temporary stored attachements, which you can then copy to the desired
location.
The only thing to worry is, that the attachement name could be lost, and
you have to identify them by mail text.

Helge




Reply With Quote
  #10  
Old   
Karunakaran
 
Posts: n/a

Default Re: ActiveX Cannot Create Object - 05-17-2005 , 12:48 AM



Finally what I did is write a batch file as below:
DTSRun /Sservername /E /NPackageName

Put that batch file on WINDOWS SCHEDULER, then it did worked. Still I dont
know why its not running from sql scheduler...

"Helge C. Rutz" wrote:

Quote:
Hi Karunakaran,

"Karunakaran" <Karunakaran (AT) discussions (DOT) microsoft.com> schrieb im
Newsbeitrag news:E2CEEBC1-DB12-4EEC-A6C1-41B8D619A40A (AT) microsoft (DOT) com...
I tried changing the access and launch permissions to the nt domain
account,
still I get the same error. "Cant create object Outlook.Application"

there are three articles you should check
http://support.microsoft.com/default...b;en-us;237913
http://support.microsoft.com/?scid=k...57757&x=4&y=15
http://support.microsoft.com/default...b;en-us;828550

Just to clarify what you have done exactly :
You logged in as a domain user, configured Outlook with mailprofile ...,
and also tested your vbscript to process an incoming mail, and it worked?
You logged of, logged in with a different user.
Then you configured SQL Server and SQL Server Agent to run under the
configured domain account, restarted both, scheduled the DTS package, and
it failed?

If your problem is related to outlook limitations - I never tried to
automate outlook from a service - then you shoul try the excel automation
only.
If that works, you could workaround with SQL Mail
With SQL Mail you have the Outlook Mail support embedded in SQL Server.
The xp_readmail proc gives you the mail and also gives you the pathes to
the temporary stored attachements, which you can then copy to the desired
location.
The only thing to worry is, that the attachement name could be lost, and
you have to identify them by mail text.

Helge




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.