December 3, 2010 at 10:11 am
Hi Friends,
I am developing tool to automate the bcp process. I need to run the bcp query using T-sql, due to security reasons xp_cmdShell has been disabled.Is there any other way to execute bcp using t-sql without using xp_cmdshell
Thanks,
December 3, 2010 at 10:50 am
BCP is an external command, xp_cmdshell is pretty much the only way to execute it. I am not sure if you could schedule a SQL job that will a CMD task (not sure if its linked to the disabled xp_cmdshell).
December 3, 2010 at 11:05 am
You could use CLR instead of xp_cmdshell. You could use a job that calls the command line. Either will work.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
December 3, 2010 at 11:11 am
You should also consider running it through an SSIS package.
December 3, 2010 at 11:38 am
if you are importing data, i think BULK INSERT can do anything that BCP was going to do;
writing to a file is a different matter.
Lowell
December 3, 2010 at 10:59 pm
Pam Brisjar (12/3/2010)
You should also consider running it through an SSIS package.
+1
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply