Need Power shell script to run on all databases.

Hi,

I have a stored procedure to generate report, using power shell script want to get all databases, run stored procedure on each database and generate the results as .csv file, output the file with database name (place it on directory) and  email .csv file.

looking for script, can any one help pls?

April 23rd, 2015 7:56pm

Dear N_14

Is it better to write a console program (e.g C sharp) and using script to call that executable file.

There are more libraries that helps to complete the generate csv and email part.

Free Windows Admin Tool Kit Click here and download it now
April 23rd, 2015 10:46pm

Can you please share with me the codes
April 23rd, 2015 11:13pm

N_14 - Just a thought, you can use SSIS packages to achieve this functionality wherein you can create workflow based tasks, execute query and then mail the CSV file to whoever you want
Free Windows Admin Tool Kit Click here and download it now
April 24th, 2015 12:56am

Check this http://jeffmurr.com/blog/?p=142

http://blogs.msdn.com/b/kebab/archive/2014/04/28/executing-powershell-scripts-from-c.aspx

April 24th, 2015 1:58am

Can you please share with me
Free Windows Admin Tool Kit Click here and download it now
April 24th, 2015 9:27am

Hi Manu,

Can you pls share sample codes..

Nav

April 25th, 2015 5:17pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics