views:

84

answers:

1

Hi, i;m trying to automate the exporting of data from an sql server table to an excel using this script

EXEC sp_makewebtask 
    @outputfile = 'C:\testing.xls', 
    @query = 'Select * from HCIndonesia_20Jul2010..Combine_Final', 
    @colheaders =1, 
    @FixedFont=0,@lastupdated=0,@resultstitle='Testing details'

but i;m getting an error:

Msg 15281, Level 16, State 1, Procedure xp_makewebtask, Line 1 SQL Server blocked access to procedure 'sys.xp_makewebtask' of component 'Web Assistant Procedures' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Web Assistant Procedures' by using sp_configure. For more information about enabling 'Web Assistant Procedures', see "Surface Area Configuration" in SQL Server Books Online.

+2  A: 

This blog article might help you.

It sounds like you simply need to do:

sp_configure 'Web Assistant Procedures', 1
RECONFIGURE 

And your script should work (as long as you have permissions on the SQL server)

Kragen
hmm. now i another problem: Msg 17750, Level 16, State 0, Procedure xp_makewebtask, Line 1Could not load the DLL xpweb90.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.).is there a .dll i'll have to get?
marilyn
@marilyn - It looks like this error is due to attempting to run this SP on SQL Express - this stored procedure is (according to Google) deprecated, and so you should probably look into an alternative way of doing this.
Kragen
i guess you are right. thankyou. :)
marilyn