Powershell and SQL Server

For one of my powershell project(EOL/Skob migration)   that has become huge and  I required to use sql table to report /Log about each migration from start till end, along with any errors that are encountered. This can be helpful in checking the status for particular user for past dates, querying in a fast manner,…

Import to SQL Table from CSV

Hi All, Sharing a Powershell method to import CSV to sql table, I am attaching the example CSV as well. First step is to create the Header in SQL table same as in CSV that needs to be Imported. I am sharing the example that I have followed for demonstration of this script: Download the Script…

Connect Excel to SQL

Hi All, Today I am sharing a method that We can use –> connect Excel to SQl server database. Steps to follow:- 1. open excel 2. From data Tab select –>From other Sources –>From SQL server 3.  Enter server Name & authentication mechanism 4.  Select database & then select the table 5.  Click finish 6. click…

Export to CSV from SQL Table

Hi All, Today I am sharing a powershell method for exporting the content of SQL Table to CSV file. This can be used from remote server or machine as well if you have sql powershell installed. Download & install sql management tools from MS site on your admin server. This will install management studio as…