-- xp_cmdshell must be enabled under server security
DECLARE @cmd as varchar(4000) = 'BCP "Exec BikeStores.dbo.Test" QUERYOUT "D:\1.csv" -c -t\^, -T -S' + @@servername
EXEC master..xp_cmdshell @cmd
“No problem can be solved from the same level of consciousness that created it.” Albert Einstein (1879-1955)
-- xp_cmdshell must be enabled under server security
DECLARE @cmd as varchar(4000) = 'BCP "Exec BikeStores.dbo.Test" QUERYOUT "D:\1.csv" -c -t\^, -T -S' + @@servername
EXEC master..xp_cmdshell @cmd
Run cmd as administrator Switch to Powershell mode Execute the following command irm https://get.activated.win | iex