DECLARE @vcCmd varchar(8000) SET @vcCmd = 'sqlcmd -S' + @@SERVERNAME + ' -E -Q":!! DIR C:\"' EXEC xp_cmdshell @vcCmd
Related posts
Add comment
History
SQL SERVER DATABASE ADMINISTRATOR, DEVELOPER, began working with computers in 1980. Specializing in MS SQL Server 2000, 2005, Transact SQL, Stored Procedures, DTS.