November 25, 2015 at 12:08 pm
Comments posted to this topic are about the item Stairway to SQL PowerShell Level 10: Getting data in and out of SQL Server using SQL Server PowerShell
December 2, 2015 at 6:37 am
Thanks for another good article in the series.
December 2, 2015 at 7:28 am
I have been using this frequently to import data to SQL Server from Powershell.
https://gallery.technet.microsoft.com/scriptcenter/4208a159-a52e-4b99-83d4-8048468d29dd
It works very well with only a few limitations. Definitely worth checking out.
December 2, 2015 at 8:47 am
I have never used these techniques to date, but definitely am interested in using PS to at least get data out of SQL Server.
And not to be pedantic, I noticed that the figure referred to as listing 10.5 has no caption. Thank you.
December 2, 2015 at 8:53 am
Yes, I use it as well. I used invoke-sqlcmd2 -As DataTable in this case, but I regularly use Out-DataTable for many things. Glad you get use out of it too.
December 2, 2015 at 8:54 am
Thanks. I will file a bug on the article to get it fixed. I have a caption in my article, but on the web page it does not. Good eyes.
December 2, 2015 at 10:36 am
I kind of stop using invoke-sqlcmd for multi-line scripts due to its unexpected and ugly bug which I mentioned here
http://www.sqlservercentral.com/blogs/jeffrey_yao/2015/10/25/be-cautious-about-invoke-sqlcmd-bug/
I usually have to run long and complex scripts (running quite a few hours during the ETL process) and using invoke-sqlcmd is a nightmare if these scripts break in the middle due to various reasons.
This is just a kind reminder to our sql community.
April 27, 2018 at 9:50 am
the new SQL Server powershell module, installed by the SSMS 2016 installer, has a parameter/option for Invoke-sqlcmd to output data to a DataTable as well. It's nice, and does save a few steps.
There's other goodness in this module compared to sqlps as well, including much faster script startup times.
April 27, 2018 at 10:18 am
The SQLPS PowerShell module referenced in this article is no longer being updated by Microsoft. It has been superseded by the newer SqlServer module. See https://docs.microsoft.com/en-gb/sql/powershell/download-sql-server-ps-module?view=sql-server-2017 for details.
April 27, 2018 at 12:08 pm
Yes, I know all of these things. Thanks for the posts. These articles were written years ago. I will see if I can get with Red-Gate and get these updated for current state.
.
April 27, 2018 at 12:59 pm
Sometimes the old stuff is needed, so I hope the new versions get done with this in mind...
I'm currently working on a Windows 7 computer at work, with only Powershell 2.0 on it (phew...as in, not Powershell 1.0).
But it'd sure be nice to use Powershell 3.0+ instead (especially Powershell ISE 3.0).
I'd ask to upgrade it, but we still have Windows Server 2008 (no, not 2008 R2) servers, so... being able to work only in Psh 2.0 is probably still a useful skill for me to work in if I write scripts that might deploy on those servers.
So it goes.
It's even more interesting working with Oracle & Powershell along with either the MS or old Oracle ADO libraries...
Thank you for your original postings, btw.
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply