Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. nancyd1111

    xp_cmdshell

    Worked like a charm! Thank You!
  2. nancyd1111

    xp_cmdshell

    Nope. This is incorrect syntax neat '+'. :(
  3. nancyd1111

    xp_cmdshell

    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 =...
  4. nancyd1111

    Identifying a TraceID

    Denny, Thank you once again for your assistance. It's all working. Appreciate it! nancyd
  5. nancyd1111

    Identifying a TraceID

    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...
  6. nancyd1111

    Using variables in built-in stored procedures

    To mrdenny, Thanks! You solved the mystery! The placement of N is what made all the difference: This will work: set @filename = N'c:\path\to\file' exec @rv = sp_trace_create @rs output, 0,@filename This will NOT work: set @filename = 'c:\path\to\file' exec @rv = sp_trace_create @rs...
  7. nancyd1111

    Using variables in built-in stored procedures

    To NoCoolHandle, Your supplied code doesn't really work. Although you get a Return Code = 0, this return code applies to TraceID, but doesn't apply to the success of creating the FILE . If you rerun your code and ask for a return value of file creation, you will get Return Code = 12 (File...
  8. nancyd1111

    Using variables in built-in stored procedures

    I assume your suggestion of: output, 0, N'@filename you really mean to end the quote after filename as: '@filename' - otherwise, it won't compile. I also tried your suggestion of Nvarchar(255), but to no avail. Have you ever used sp_Trace_create, passing in variables? P.S. How do I color...
  9. nancyd1111

    Using variables in built-in stored procedures

    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...

Part and Inventory Search

Back
Top