Search code examples
sql-serveroracle10gdatabase-migration

SQL Server equivalent of UTL_FILE.putline


I'm trying to convert an Oracle function to SQL Server 2012. My Oracle experience is very limited and I've came across something that SSMA couldn't convert automatically and I'm not sure what the SQL Server equivalent is.

UTL_FILE.put_line ( g_hFile, '    -<> <calling>: FN_STREAM.');

I've read that you can replicate some of the UTL_FILE functionality by using XP_Cmdshell but I'm really not sure where to go with this.

Hope someone can help or point me in the right direction.

Thanks

Alex


Solution

  • Ended up using a stored proc created by the migration assistant that mimics the behaviour of UTL_FILE.putline.

    Cheers

    Alex