Practice Exams:

1z0-082 Oracle Database Administration – Configuring the Oracle Network Environment Part 2

  1. Using non-default port

Hi. In the previous lecture we did a very nice exercise. And we already know that the listener aura is not important in case you need to use the default port and the protocol TCP IP. Now the listener aura is very important if you want to use another port, which is mean non default port. Now, in the previous lecture, I changed the file to P-X-Y-Z listener. Now I will make a right click and I will make rename. And I will pack it to original value again. So it will be listener ora I will make rename. Okay, very nice. Now what I will do, I will open it. And now let’s try to change the port number to be for example, one, five, two. And I will put here nine. Okay. And I will make save. And I will close it.

Now I will make a right click, open a terminal. And I will make now listener stop. And I will make listener start. You can see now that there is exchanges. You can see here the port is 1529. Okay. And you can see the listener support no services. Actually. Now the L rigi process cannot register the services. Even if you wait for 60 seconds, it will not register it. You have to do more changes. So now what I will do, I will make for example SQL plus as DBA. I will make now alter system register. Then I will make exit. And I will make now listener status. Also the listener support no services. So in order to use another port, we have to do other steps. What we will do, we will go to the Tnnstems ora I will open it. Then I will change this to p nine. And also I will go to all these blogger build database and the main database.

And I will change it to nine, nine and nine. Then I will make save. Then I will close. Even these steps is not enough. So what I will do, I will go to the terminal. I will go to SQL plus as says DBA. Then I will make sure parameter local. I have to make alter system sit local listener. I will take it copy and paste equal. You have to define it again. I will take this copy and paste and I will press Enter. So system altered. Why I do this? Because any changes, you do it in the TNS name aura and you change it on the level for the listener or local listener. If you do any changes here, you have to alter the system again. Okay.

So I will close this one. Then I will go to the terminal. Now I will exit, then I will make now listener stop, then listener start. And you can see the listener support has no services. Wait 60 seconds or make SQL plus as says DBA. Alter system register, then make exit, then make listener status. Wow, everything is working fine. So you can see that now it is listening to the 1529 and the services already exist. Now if I go to my original machine and try to open the SQL developer and I will try now to make a connection. I will wait a little. Now if I go to this connection sys user and make right to click properties, you can see that this is the information. You can see test 1521 and the service name is orcl. com if I make now test connection it will give you error. Why? Because I change the port to p one five two. And I will put here mine now. And I will make this. Wow, it has been success.

So this is the steps in details in order to change the port number. So now let’s pack everything to the original. So now I will pack again to the virtual machine. I will close this one. I will go to the listener Aura. I will pack it again to P. Here one save. I will close. Then I will pack to the ten snaps at Aura. I will change this one to P one and this is one and this is one.

And also this one. Then save. Then I will make exit. I will open a terminal SQL plus as sisdba show parameter local altar system, sit local listener paste equal. And I will take this again. Why? Because any changes I do it in the TNS names related to the local listener. I have to alter the system again. I will take copy then paste, then I will make exit. Then I will make now listener stop, then listener start. Then you will find the listener support no services. Wait around 60 seconds and everything will be fine. I will wait a little. I will make now listener stay tuned. Still 20 seconds. Wait a little. I will try now. Still 46 seconds. I will wait a little again. I will try now. And everything is working fine. And you can see now that it is listening to one five to one. Thank you for listening and see you in the next video.

  1. creating dynamic listener example

Hello everyone. In this lecture we will learn how to create a new dynamic listener. Actually you can create many listeners. Now I just want you to focus with me. And you have to follow the same steps exactly. So in order to create a new listener, we have to do the following steps. First thing I will go to this path. Then I will go to the file tnmsnames or I will open it. Then I will take copy for the local listener. This one I will make copy and I will put it at the beginning of this file, I will make control of V. Now I will change the name to p listener two. Also I will change the port to P. For example 1527. Now this is logic. Because I create another listener to listen to another port. Okay. So this is the first step. Now I will make save and I will close this file. Second step I will go to listener ora I will open it. Then I will take this as copy control C. Then I will put it here control V for example. Okay, very nice. I will change it to p listener two. Now I will remove the second line. This one. Please remove it like this. Then I will remove this line which is the IPC. Then I will remove the last parenthesis.

So I have now this parentheses for the open of the description. And this is for the end of the description. Okay. And also I will change the port to be the same. So it will be here seven. Okay, very nice. So I will click now save. So I defined a new listener code listener two. And this listener listening to any connection from one five to seven, save and close.

Now I will make a right click open a terminal. I will make now SQL plus as cessdba. I will make show parameter local, then alter system set. I will take this copy. Then paste equal double quotation. I will take this value copy paste then comma. Then paste it again. Then paste it again. Pack space and make it two. Then double quotation, semicolon and execute and execute. So system altered. So now I change the system to be local listener, listener underscore ORCL comma listener two. Now I will make sure again show parameter local. You can see now that it is updated.

The next step I will exit the SQL. Then I will make lsnrctl. Now I will make a start. If you make a start without any option, this means that you will start the default listener. But in our case I need to start the new listener which is listener two. So I will make start listener two. I’ll press enter and you can see now it is started. And you can see that the port is one five to seven. The listener support no services. Just wait for 60 seconds and the services will be up and running. So what you will do. So now we will do the following command. After 60 seconds I will make stess.

Then listener two. I will wait little. I will press enter now. So you can see now all the services is up and running. For the port one five to seven I will exit. Nice. Now let’s log into SQL plus as Sasdba. Now let’s try to connect using the new residential. So what we will do, we will make connect for example system. Then the password for example welcome. And I will make@test. com. Then I will put the new port which is 1527. Then the service name. Orcl. com I’ll press Enter and I can see that I have a small error. Sorry I have to write connect. Then I will take this copy. Then I will paste. Then I will paste and I am connected to the new listener. Wow, wow. I will make the same.

I will take this copy and paste. I will use now the port 1521. Then slash orcl. com and I am connected. I will go to my SQL developer in my original machine. And I will try to connect remotely. I will open. I will go to Sys, user this one. And I will make properties right to click. Now if I make this connection on port 1521. I will make this. You can see success. If I change the port to p seven also it will be success without any issue. Wow wow. So in this lecture we learn how to create a new dynamic listener. Thank you for listening and see you in the next video.

  1. creating static listener example

Hello everyone and welcome back. So in the previous lectures we understand how to create dynamic listeners and we understand what is the meaning of dynamic registration. In this lecture we will understand how to create a static listener. When we say a static listener, this means that we have to manually add the services. Okay, very nice. So in order to create a static listener, first step we have to go to listener ora. So I will open this file and you can see that in the previous lecture I created this dynamic listener, which is listener two. Now what I will do, I will make like this control and C and I will repeat it again here. At the beginning of the file I will name the listener listener underscore PDPs. So make it a capital letter. So actually this listener is responsible for listening to the connection for bloggabil databases. Okay, very nice. So now I will change the port, for example to p five. So it will p 1525. So this is the first step. After that I have to put the services manually. For example, I want to add the orclpdb bloggabel database. So I will make Sid underscore list.

So this is the beginning. You have to make Sid underscore list. Then you have to make underscore and you have to put the listener name exactly. So I will make it control C and CTRL v. So said underscore list is a static then underscore. Then you have to mention the listener name. So this is the said list for this listener. Okay, variness. Then you have to make equal. After that you will open the brackets and close a brackets. Then here you will make Sid underscore list equal. You will open a bracket and close a bracket like this. Okay, then you have to make Sid underscore description equal. Then you have to put like this open bracket and close it again. Open bracket and close it again. Open the bracket and close it. Okay, very nice. So what I will do, I have to put here three parameters. The first parameter is the Oracle global name. So I will make global DB name equal.

So this is the first parameter. The second parameter said name equal. And the third parameter is oracle home equal. So that’s it. So again, Sid and the score list and the score listener and the score of PTB s equal open brackets and close the brackets. Then you have to make said list equal, open a bracket and close the bracket. Then you will make Sid description equal. And here you will have the global name, the Sid name and the Oracle home. Let’s start to fill this information. First thing I will make right click open a terminal. I will make now echo dollar sign, oracle home, capital letter. So this is the Oracle home. I will take this path. I will take this path copy. Then I will go here and I will paste it here. Okay very nice. Then I have to put the said name. The said name is the instance name. In my case it will be. ORCL to make sure from this I will open this and I will make SQL plus as SDBA. If I make now show per meter. Sorry show per meter. So you will find the instance name S-O-R-C-L. Okay after that I have to put the global database name. So what I will do first thing I will make sorry column name format a 20. Then I will make this select statement. Select name open mode from the dollar sign PDPs.

And you can see that I have these subuggable database or rclpdb PDB one PDB test one. Actually I will create the services for this sublugable. So I will make the following. I will make alter session sit container equal. Orclpdp to make sure I will make showcon name. So currently I am in the bloggable database. Orclpdb now what is the meaning of global database name? It is the database name concatenate with the domain name. Remember this.

So you can make for example show parameter domain. So you can see the domain is come. So the global will be. Orclpdb. com another way you can do the following. You can make select global name from global name and press enter. So this is the global database name. I will take it copy and I will paste it here. So that’s it. So I define the listener. And this is the set list. It will be underscore the listener name. Then said list, then set description. And you have to mention these parameters. Okay very nice. So now I will make save and I will close this file. Okay. Now I will make exit from SQL plus then I will make Lsnrctl. So I will move to the listener utility. Now I will start the new listener. So I will make start. Then I will put the listener name. So it will be listener underscore PDPs. I will execute. And I have a problem that the listener is already started. So I will stop it. First stop listener underscore PDPs. Then I will start it again. So I will take this comment copy and paste. As you can see now it is started. But I just want you to notice a very important note. This is the serviceorclpdb and the status is unknown. Why the status is unknown? Actually when you start a default listener using a dynamic registration, you will find the status is ready. But when you have a static listener, you will find the status unknown. Why? Because the listener cannot guarantee 100% that this is a valid service. Maybe you have mistake. Maybe you put a service that doesn’t exist. So that’s why you find the status is unknown. Okay very nice. Now let’s start to connect using this new listener.

So I will make exit. Then I will make SQLPlus system the password welcome at the hostname test. Then I will put the new port 1525. Then I will make slash. Then I will put the serviceorclpdb. com. So I will make o rclpdp. com. And you can see that I am connected using the new listener. You can see it is connected without any issue. Very nice. Now if I need to add another bloggabel databases, what I will do, I will open the listener. You can see like this. You have to copy from here to here. So you have to repeat the description again. So I will make contra. C then I will repeat it here. Okay. So it will be said description. Then I will put the global DB name. Actually I have a bloggable database called PDB one. So I will put PDP one and the sydname is ORCL and this is at the Oracle home.

So this means that this listener is connected using two bloggable databases. The first one is orclpdb  the second one is PDB one. Now what I will do, I will close it and save. And now I will open it again. I will make the following. I will connect first system as siesta. I will put the password. Now I will alter all the bloggable database to p open. So I will make alter bloggable data pays all open. I just want to make sure that all the bloggable database is opened. I will wait a little and it is open. Now let’s try to connect using the new listener using the blogger bell database BDB one. So I will make connect system 1525 PDP one. I will press and you can see that the listener doesn’t currently know the service requested. Why? Because I have to stop the listener and started again. So I will make exit. Then I will make Lsnrctl stop. Listener PDBs. So I stop it. Then I will make start and I will take this again. Copy then paste. And you can see now that I have two services. The first one is Orclpdb. com. And I have also Pdb. So now it will work. I will exit, then I will make SQL plus system welcome test. The new port is 1525 slash PDP one. com press and I am connected without any issue. So that’s it. It’s very simple and easy. So if I open the listener dot or you can see if you want to use the static listener, you have to define the following. So first thing you have to define a listener. Then you have to put the said list listener. Okay, very nice. So in order to create a new blogger, you have to repeat this option. Okay, very nice. So thank you for listening and see you in the next video.