Hi,
I am trying to erase a file using xp_cmdshell and my filename is stored in a variable. Can you tell me how I allow xp_cmdshell to interpret my filename instead of taking it as a literal?
Thanks in advaince!
-------------------------------------------------------
set @filename =...
If I have executed a stored procedure to create a trace file, how is it that at a later point I identify the TraceID of this newly created file so that I can stop and close the trace?
If I try to delete a .trc file and it hasn't been closed, I get a sharing violation message, which is expected...
I'm trying to pass in a varible to a stored proc and I'm not having success.
If I don't use a variable, a trace file is created. If I use a variable, the trace file is not created. Any idea why?
This works when I hard code the drive and filename:
exec @rs = sp_trace_create @traceid output...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.