This entry is part 4 of 6 in the series Setting up an Oracle 12c R2 Lab

Finally – we are getting to the home stretch here with this series.  So far we’ve installed Oracle Linux, prepped the server with some prereqs and configurations, and installed an instance of Oracle Database Server 12C – Today it’s time to create some databases! Being new to Oracle the only thing that has really made sense to me thus far is Linux – that said, databases I get, I should be good right – well, things are little different within the Oracle world – I’ll try to explain as we go along here 😉

Oracle gives the option to create a database during the instance installation – In Part 3 I advised against this as we were going to do it here but if you missed that step, it doesn’t really matter – you can use the following instructions to create another database if you wish. Firstly, log in to your Oracle Linux server as the oracle user, drop to a terminal and run dbca.  DBCA is a database management utility that allows us to manage our installed Oracle databases, including deleting and creating. If you get some sort of command not found error then most likely you didn’t export your PATH environment variable correctly – I’ll point you to that section in Part 2 in that case.

For the rest of us, we are presented with the following screen – since this is our first database our options are a little limited at this point – we can create databases and manage templates – go ahead, select ‘Create a database’ and click Next.

At this point, let’s select Advanced Configuration so we can explore some of the features presented.

As far as Deployment Type, select Oracle Single Instance database and General Purpose for the template.

On the Database Identification Details screen is where things start to go south for me.  My main background is built around MS SQL, so seeing things like SIDs and Container Databases confuses me a bit. Let me try and explain the little bit that I know.  First up, SID, this maps to the environment variable we set up in Part 2, but what exactly is it? Well, think of an Oracle Database SID as basically a unique name that identifies the Oracle Instance or Database. This is used by clients in order to connect remotely into the instance and achieve access to the proper database. Now on to this container stuff 🙂 Basically, 12C of Oracle was built around this idea of multi-tenancy. You can think of a container database almost like a tenant – A holder to place many other databases called Pluggable Databases (PDBs) and provide further restrictions and access, all while sharing some of the same system tables. Just know it’s really the PDB database that we will care about when connecting here, in our case shown below, the cdb1pdb database.  That said, if you want to go ahead and create an old-school database, simply uncheck the ‘Create as Container’ – but the remainder of this series will go through managing CDBs and PDBs.

We can go ahead and change the defaults on the storage options if we want, or, leave it at default – it’s basically just asking where the data files should live on the filesystem.

As far as Fast Recovery goes, enable it and leave the defaults. This is basically used for fast backup and recovery operations.

From the Network Configuration section, we will need to create a new listener – this is what is going to allow us to communicate with the database remotely. Create a listener similar as shown below.

Leave the Vault and Label Security Options disabled. These are simply options which help to restrict access to data and prevent threats.

From the configuration options, we only need to change one option, which is the option to install the Sample schemas to the database. Think of this as a copy of Microsoft’s AdventureWorks to use for testing, just disabled – we will look at how to enable this in the next section.

Go ahead and leave the option to configure Enterprise Manager – this will simply enable a web page we can connect to in order to manage our database.

Oracle creates a number of user accounts each with different access into the database being created.  From the User Credentials screen, we are able to customize the passwords for these users. Being a lab environment I’ve just selected to use the same password for each account.

The Database Creation screen allows for a number of options including saving our configurations as database templates which can be used to create more databases or to generate creation scripts based off of our supplied information.  Just leave things default here – we just want to simply create the database right now!

From the Summary page, go ahead and click ‘Finish’ to begin the database creation (Yeah, Finish probably not the best title for this button) 🙂

After a short (sometimes long) wait your database should be successfully created! In the next part of this series, we will look at how to configure clients to connect into some of these databases to get that SSMS feel we are all used to 🙂  Thanks for reading!

Series Navigation<< Setting up an Oracle 12c R2 Lab for the Administration Certified Associate Certification – Part 3 – Installing Oracle Database 12C SoftwareSetting up an Oracle 12c R2 Lab for the Administration Certified Associate Certification – Part 5 – Connecting to Oracle Databases with SQL Developer >>