• opc.three (12/21/2011)


    There are many better ways (IMHO) to get XML from a database to disk than from within a T-SQL context. Have you exhausted all other options? What is your client language? Writing to the file system from a T-SQL context (xp_cmdshell and SQLCLR originate from a T-SQL context) is ill-advised for too many reasons to list here. Using SQLCLR will not allow you mark the assembly as SAFE, a red flag that you should look for alternatives.

    What will be invoking the process that exports XML? A user pushing a button on a front-end somewhere? A batch process?

    bcp.exe can extract xml columns to disk.

    hi

    i will start searchin on (IMHO) , my idea is im tryin to get the last inserted record out of sql to a folder so there is another another program (MIRTH) will read wat comes to the folder so it send it to a specific system . thats my idea and i mentioned wat i did with bcp command in my previous post i got it workin to export but it failed to recognize the last inserted record so i thought its a bad idea , but i have no clue about the disadvantages of doin this bcp or CLR , anything with security ? and any suggestions ?

    thank you 🙂