macOS Catalina - Oracle Instant Client and SQL Plus To Autonomous Database On Oracle Cloud

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello in this video I'm going to demonstrate how to use the Oracle instant client sequel plus tools to connect to your autonomous database on the Oracle cloud infrastructure so a prerequisite is that you have a database created on the Oracle cloud infrastructure well begin by downloading the Oracle instant client and the sequel plus tool and then configuring it to connect to the database so begin by going to OD n oracle.com and from the downloads page section of the page click on Oracle instant client I'll be demonstrating today with the Mac so let's go to the Mac OS and you notice that the couple packages here the basic package and the basic light package we can do with the basic light package since we're going to demonstrate this for the US and additionally we're going to download sequel plus package because we want sequel plus client when you scroll down to the bottom you'll see some instructions that tell you how to configure and set up sequel plus to connect to any database so we'll follow these instructions and we'll create an instant client 19 underscore 19 underscore 3 directory inside our users home directory and we'll put the instant client files there as well as a sequel plus library files in there so let's go look at our downloads the first file that we downloaded already got extracted into this 19:3 folder when you look in here you'll see all the instant client files when the second file downloaded the same name it obtained the appended that - - file at the end you notice this has a sequel + files in it I'm going to drag these into the users home directory so I'm going to open either Finder window and I'm going to navigate to the users home directory so Macintosh hard disk users and this is my current user I'm just gonna drag the innocent client into this home directory oops give me to grab both I'll just grab this one and then we'll open the sequel plus files highlight those files right click copy the six items and paste them in here now what I have is this a client underscore 19 underscore 3 directory that has the organism client files as well as the sequel + additions let's go back to our instruction to see what the next step is ok so we completed steps step 2 here after we downloaded the files now we're gonna create a library folder and we're gonna skip the user local bin we'll use a library folder and basically these are the two commands that we need to issue so let's go ahead and do those on the terminal window let's do a present working directory notice that we are at our home directory here CB a dual owner so this is our home directory we'll make directory so I have a library directory now and we're gonna make a symbolic link from an innocent client library files into this library for though we just created I'm just going to copy and paste that rather than typing it so copy terminal window paste it enter now look what we have we'll do long LS dash L here's our instant client 19:3 and this is the library folder we just created if we go into that library folder and do directory listing there's a symbolic link we just created alternatively we could have made this directory and copied all these library files in there but we followed the first step okay the next step is to get the connection information into a local database so this is a DNS name sequel not Ora and so on so the best way to get these in order to connect to our they sped up the video here basically go to the Oracle cloud infrastructure to your database and download the wallet you into our innocent client network admin directory so instant client network admin we need to put wallet files in here so let's go ahead and open this wallet and by double-clicking on it it unzipped and I create another folder here let's open that and let's grab all these files copy them paste them into the network admin directory of the instant client and there are two readme files get says readme file it's over gonna write the existing one I don't need both so I can just replace the father we want to look at here is a TNS names that or a file I already have that RA associated with that text writer so I'm going to double click on this thing and open it with text writer now look these are the connection strength I can use when I use my sequel plus to connect to Oracle and I don't want to type a sure DB underscore hi every time I connect to the database or ashlar DB underscore lo and so on so I'm gonna copy this ashen or hi and paste it above here you've missed my copy so let me redo that copy and taste and I'm just gonna rename this as hi sign of the time ups excuse me couple of typos fat fingering it alright tie the difference between the high low and medium are is that the high focuses on sequel commands and performance whereas low focuses on concurrent connections but for class purposes it doesn't really make a difference so let's close that and let's see where we are with our instructions so we have completed step 4 now now the next step is to we can skip this DNS admin - is basically we're putting all the files in this network admin directory so let's go ahead and create in our we're gonna add the instant client 19 3 to our path so sequel plus in the library file and so on can be recognized from the terminal window so let me copy this and go to our terminal and piece that path let's hit enter and now we should be able to type sequel plus to launch sequel plus however sequel plus cannot be opened because Mac OS Catalina does not recognize this software so it thinks it could be malware so we need to go into our system preferences and allow it to execute this or look to it from the apple system preferences security and privacy and we will click on this lock provide our credentials and goto you notice there's an app store and there's app and identify developers will need to go in here and the last sequel plus to execute so let's not move us a trash let's hit cancel and notice that and the security and privacy and lets us know that sequel plus wanted to execute then I'll say allow anyway okay and now let's try this again now we have a library that actually saves that sequel plus wants to run do you want to open it say yes we do you want to open it but we have a library here that's trying to run now and that's the next one we're going to need to allow the security of privacy to let it execute so we'll hit cancel here let's say allow anyway and try to run this again and say yes we want to open this you need to repeat this process for about five six times four different libraries I want to execute you could change the setting in your operating system to ignore this but let's just go through this real quickly and sped up the video here a little bit just continue doing a till you get through all the libraries to open and finally we're able to run this program so we'll put our username is admin at hi remember I changed on the TNS names to just say hi and provide your password and we're connected if you recall we had a table called table 1 so let's see if it's here and here it is we could describe table 1 and here it is with the two attributes so you're connected from your Mac on sequel + to the Oracle database now there's one more thing you need to do however notice if I exit here and I exit terminal and I run another terminal command and I type sequel plus it doesn't know where it is if you look in our path we lost the path to the Oracle is the clients elation this path that we created here so I could go ahead and run this again and I can run sequel Plus and you see that it does run and if we look at the path notice that it does append the location with instant client to underscore 19 underscore 3 there however we don't want to type this every time so how do we get around this what we need to do is we need to create in the startup of the seashell we need to have this command executed so the way you do that is you modify a file called dot Z shell RC so basically any text editor you want I'm gonna do with nano nano dot c sh RC this is the file that will execute basically every time z shell is a is initiated so we're gonna edit that and we could go ahead and just copy and paste that path however i like to put that path at the end so I'm going to type export path equal I'm gonna take my existing path first and then I'm going to append the instant client path to that so I'm going to append the users current directory slash instant client underscore 19 underscore 3 make sure to make any typos instant client underscore 19 underscore 3 and now you do ctrl o to save that so ctrl o and it's going to say the file name - right - I'll say yes this is the file I want and the ctrl X to get out so I'm gonna do ctrl X and notice that if I type the file out if I do a cat dot Z SHRC I now have that file there so let me exit this terminal and start a new terminal and I'll echo the path here and notice that appended to the previous path we now have the user see be a loner instant client to so on so when I typed sequel + indeed it does run and I will connect one last time just to show that it does connect so admin at high and password for the database and that's it we're connected
Info
Channel: Asher Educate
Views: 10,109
Rating: undefined out of 5
Keywords:
Id: 2btVupGXRtM
Channel Id: undefined
Length: 14min 57sec (897 seconds)
Published: Mon Apr 13 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.