![oracle database express edition oracle database express edition](https://static.filehorse.com/screenshots/developer-tools/oracle-sql-developer-screenshot-01.png)
The output of the above SELECT statement will show you the open mode along with the name of the database which you are currently connected to. To check the open mode of a pluggable database you can write a query on V$PDBS dynamic performance view, like this Chances are that the pluggable database over which you just switched may not be opened or in mount state. In order to perform any DDL or DML the database needs to be in open mode. Check if the pluggable database is opened? Like thisĪgain for this demonstration I am unlocking the HR user, whereas you can use these steps for unlocking any other sample user that you want. To switch from the container database CDB$ROOT to the desirable pluggable database ORCLPDB we can use ALTER SESSION DDL. So far, one thing which is very clear to all of us is that all the high privileged users like sys are placed inside a container database and all the sample schemas are placed inside the default pluggable database, which means in order to unlock them we need to switch from the container database to the pluggable database. Step 4: Switch from Container database to Pluggable database.
![oracle database express edition oracle database express edition](https://www.markusdba.net/wp-content/uploads/2018/11/dbca-18c-xe-create-non-cdb-00010-1024x775.jpg)
Just make sure to start your command prompt with administrative privileges You can do so just by writing this below given command into your command prompt. To bring the new changes that we just made into the tnsnames.ora file into action we need to restart the listener.
ORACLE DATABASE EXPRESS EDITION DOWNLOAD
I have also uploaded my tnsnames.ora file on the GitHub, which you can download from here.
ORACLE DATABASE EXPRESS EDITION HOW TO
The Entry will look something like this.įor more details on how to create a tnsnames.ora entry please watch my YouTube Video, here. Once you’ve located your tnsnames.ora file then create an entry at the end of the file and save it. Tnsnames.ora is a network configuration file thus you will find it inside the “Network” folder which in turn is located inside our DB_HOME. To create an entry for listener in TNSNAMES.ora file you first need to locate it. I found that manually creating an entry in TNSNAMES.ora file is less time consuming. There are two ways of doing that, we can either use NETCA utility or we can do it manually. Using the name of our pluggable database and its corresponding service we need to create an entry for our listener. Step 3: Create an entry in TNSNAMES.ora file. The service name for the pluggable database ORCLPDB is orclpdb. Using this query we are retrieving the service name corresponding to container ID 3 which is the container ID for the default pluggable database ORCLPDB which has all our sample schemas. To find out the service name corresponding to our pluggable database we can query v$active_services dynamic performance view. Usually, pluggable database and its service shares the same name, but its good practice to check it beforehand. Now using the container ID of ORCLPDB pluggable database we will find out its service name. I suggest you not to tamper with this.įor this demonstration the name of the default pluggable database where sample schemas are located is ORCLPDB and its corresponding con_id is 3. PDB$SEED is the seed pluggable database & a system supplied template which a container database uses for creating user defined pluggable databases. Usually the name of that default pluggable database in Oracle Database 18c is ORCLPDB. Default pluggable database is the one which we created during the installation. From that list you will need to note down the name and container ID of the default pluggable database. The result of the above query will give us the list of all the pluggable databases created inside the root container with which you are currently connected. Which pluggable database has all our sample schema? The output of this SQL query will show us the names and the container ids of all the pluggable databases created inside the CBD$ROOT container database. Once you are successfully connected to your database using sys user then you can query the v$PDBS dynamic performance view to see the names and the container IDs of all the pluggable databases created inside the container database with which you are currently connected. To find out the container ID you first need to connect to your database using sys user. For this we require the container ID of that pluggable database. In order to unlock the user we need to find out the database service corresponding to our pluggable database which contains our sample schemas.
![oracle database express edition oracle database express edition](http://1.bp.blogspot.com/-e4m-bor0ZGE/UXHq_Kx1B9I/AAAAAAAAAew/eM7SZJ_Ctxs/s1600/Captura+de+pantalla+2013-04-19+a+la(s)+19.44.29.png)
Switching from Container database to Pluggable database.Creating an entry in “TNSNAMES.ora” file.Unlocking a sample schema in Oracle Database 18c is a five step process. So I would suggest you to go ahead and watch the installation video first.
![oracle database express edition oracle database express edition](https://i.ytimg.com/vi/Fr4pPlZnbFI/maxresdefault.jpg)
In this video we will be using the same settings that we did in the previous video while installing 18c.