The problem I have is that we can't use the xp_cmdshell in the productive envirement. We don't have the permission for it. But what else can I use instead of xp_cmdshell for creating a file on a different server?
SELECT @path = RTRIM(sys_value) FROM system_ZZDB WHERE sys_key = 'bisKey83'
SET @cmd = 'sqlcmd -SCHW20037619 -E -dzentraleDatenbank -s "" -Q "SET NOCOUNT ON; SELECT * FROM sync_BisKey ORDER BY per_nummer" -o "'
SET @cmd = @cmd + @path + '\exportzzdb.txt" -w 1000'
exec master..xp_cmdshell @cmd
This is the code I can't use in the future. What else can i do to create files directly from de DB server? We are limited in server rights
Thank you alot.
You could: