RE: Python for Oracle Database

From: <post.ethan_at_gmail.com>
Date: Fri, 29 Jun 2018 16:47:32 -0500
Message-ID: <044d01d40ff2$c9ba7790$5d2f66b0$_at_gmail.com>



Agree but this doesn’t sound as though an informed mgmt. team has made an informed decision here as I think you suggest also.  

Balwanth should nudge back a little and request Python training to include unit testing, clean coding, source control and such. Make it an opportunity to advance yourself. Although this depends on where you work of course. There are those massive service providers who don’t give a lick about anyone working for them who would fire you in a heart beat if you did this. So proceed with caution.  

From: oracle-l-bounce_at_freelists.org <oracle-l-bounce_at_freelists.org> On Behalf Of niall.litchfield_at_gmail.com Sent: Friday, June 29, 2018 11:13 AM
To: andrew.kerber_at_gmail.com
Cc: balwanthdba_at_gmail.com; ORACLE-L <oracle-l_at_freelists.org> Subject: Re: Python for Oracle Database  

Andrew  

There are plenty of reasons why we might pick a modern(ish) language such as python (or perl or ruby or go or ...) for scripting/automation. I'm surprised that it would be mandated to go around all the existing scripts and rewrite them, that seems somewhat like make work (and make bug) to me.    

Balwanth  

 As well as the popen call referenced earlier, I'd imagine you'd want to make use of the Python logging facility (rather than print :( ) https://docs.python.org/2/library/logging.html and cx_oracle https://oracle.github.io/python-cx_Oracle/ for database access.  

You'll also need to choose (or work with whatever has been mandated) between Python2 and Python3 - don't assume scripts written for 2 will work unchanged and in the same way in Python3.  

On Fri, Jun 29, 2018 at 4:57 PM Andrew Kerber <andrew.kerber_at_gmail.com <mailto:andrew.kerber_at_gmail.com> > wrote:

Now I am curious if management gave a reason for no .sh/ksh any more?  

On Fri, Jun 29, 2018 at 10:31 AM, Balwanth B <balwanthdba_at_gmail.com <mailto:balwanthdba_at_gmail.com> > wrote:

Thanks Steve - will look into that .

HI Niall- Yes thats correct. My management says no for SH or KSH anymore. We need to make some changes in the current RMAN script, so I was asked to rewrite and push new RMAN script written in python.    

Sent from my iPhone

On Jun 29, 2018, at 7:55 AM, niall.litchfield_at_gmail.com <mailto:niall.litchfield_at_gmail.com> wrote:

What do you mean by "rewrite our RMAN backup script"?. Do you mean replace a working shell script with a python script, or something else?  

On Fri, Jun 29, 2018 at 2:40 AM Balwanth B <balwanthdba_at_gmail.com <mailto:balwanthdba_at_gmail.com> > wrote:

I am trying to learn some Python and rewrite our RMAN backup script in Python. Can someone guide me where I can get this started ?    

Thanks,  

Balwanth  

--

Niall Litchfield
Oracle DBA
http://www.orawin.info

--

Andrew W. Kerber

'If at first you dont succeed, dont take up skydiving.'  

--

Niall Litchfield
Oracle DBA
http://www.orawin.info

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jun 29 2018 - 23:47:32 CEST

Original text of this message