July 17, 2008 at 3:06 am
Is it possible to execute a batch query which is stored on the server from a Store Procedure? The query is in directory "E:\Live_restore\queries"
July 17, 2008 at 5:35 am
Yes, you can using xp_cmdshell and OSQL / sqlcmd. If xp_cmdshell is disable you can configure it using sp_configure /from SAC.
July 20, 2008 at 2:34 am
karen.rogers (7/17/2008)
Is it possible to execute a batch query which is stored on the server from a Store Procedure? The query is in directory "E:\Live_restore\queries"
thats right, you can use
xp_cmdshell 'dir /S E:\Live_restore\queries'
🙂
July 20, 2008 at 2:34 am
karen.rogers (7/17/2008)
Is it possible to execute a batch query which is stored on the server from a Store Procedure? The query is in directory "E:\Live_restore\queries"
thats right, you can use
xp_cmdshell 'dir /S E:\Live_restore\queries'
🙂
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply