Sql server

xp command shell to create file on server

xp command shell to create file on server
Exec Master.dbo.Sp_Configure ‘Show Advanced Options’, 1
RECONFIGURE WITH OVERRIDE
Exec Master.dbo.Sp_Configure ‘XP_CmdShell’, 1
RECONFIGURE WITH OVERRIDE

exec master..xp_cmdshell ‘bcp
select * from sys.tabels -o > c:\file.txt’

master..xp_cmdshell ‘bcp ..sys.objects out c:\file.sql -S -U -P -c ‘

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.