Write to Azure VM from Azure SQL database
You've got a few options to get data out of sql and into a CSV:
It's free, built in to every Windows Azure VM, and pretty easy to use. The two commandlets you're going to want to use are Invoke-Sqlcmd and Export-CSV.
I found a quick example here.
If your Azure VM is running a SQL instance, you could create a quick SSIS package that calls the procedure and dumps the output into a CSV.
Again, if your Azure VM has SQL on it you could call sqlcmd.exe to spit out your CSV file.
sqlcmd -S MyServer.database.windows.net -d yourdatabase -E -Q "EXEC usp_yourProcedure" -o "MyData.csv" -h-1 -s"," -w 4000
Choose the one that best fits your limitations. If you're not running SQL on that VM, Powershell, or some custom programming will be needed.Автор: Shannon Lowder Размещён: 31.08.2016 12:46