Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

SQL Code to Load a Temp Table to Replace xp_cmd_shell

$
0
0

Our area is eliminating xp cmd shell as an option.

In what can the following be done without using xpcmdshell.

CREATE TABLE #temp(s varchar(2000)) 
    SELECT @cmd_checkfile = 'dir /B "' + @sRemoteFullFileName + '"' 
    INSERT #temp 
    EXEC master..xp_cmdshell @cmd_chckfile --parameter

DBA Developer



Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>