0

I am trying to do DB health checks with powershell script. I have automated these checks, but now i don't know how to retrieve those DB values from Oracle(The DB where i have stored these daily check's results) using powershell and then send the mail to me in the exact table format.

I know there are multiple formats to retrieve data from SQL Server and then use send mail, But i don't seem to find any formats for Oracle.

Thanks in advance.

5
  • But have you tried anything yet? Commented Oct 8, 2018 at 13:41
  • How about ODBC? Setup your oracle DB as DSN, connect to it (Get-ODBCConnection) and retrieve data (Get-ODBC-Data) Commented Oct 8, 2018 at 13:54
  • I could do that. But i already created powershell scripts to automate every checks. So it would take some extra time to retrieve data using (Get-ODBC-Data). Rather it would be best, i guess, if i create a single script to automate these checks and use that same script to send mail as well. Commented Oct 8, 2018 at 14:10
  • Yes. I tried to store these DB values and display it using Dataset. While in the powershell console, output is displayed in the table format. But when i invoke Send-mail command, the mail which i gets display only the code. Commented Oct 8, 2018 at 14:14
  • Have you taken a look at this similar question? stackoverflow.com/questions/11263538/… Commented Oct 8, 2018 at 18:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.