Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bcp command

Status
Not open for further replies.

dyan24

Technical User
Sep 7, 2004
56
CA
Need your help desperately!!

SQLserver 2000

I would like to use the bcp command utility at the end of the stored procedure when it run successfully, but i found out that i cannot use this utility to execute this thru the master..xp_cmdshell due to a security since i am not part of the sysadmin.

Is there a way to go around this? Please help.

My stored procedure is creating a temp table and after it has created it that's when i would like to use the bcp utility by saving it to a file as a comma delimited.
 
Check out DTS (Data Transformation Services) in the BOL. I think that will let you do what you need. Schedule your stored procedure to run, figure out how long it takes to create and populate the table, then build and schedule a DTS job to transform the data to an Excel format.

-SQLBill

Posting advice: FAQ481-4875
 
you might might be able to start the DTS from within the SQL package.

Or maybe schedule the SP as the first step of a job, and the DTS as the second.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top