Creating a user in Oracle Autonomous Database for Dummies

Creating an additional user in your Oracle Cloud Infrastructure (OCI) is not the same thing as creating an additional user in your Autonomous Database (ADB). I spent about two days (on and off) last week, wrapping my head around this. Maybe you knew this…I did not.

If however, you want to create an additional OCI user; one that would be able to access various resources in OCI, then please bookmark this page. This is all you need to get started.

However, you may not even need to create this additional user (as was the case with me). While I followed the steps in that documentation (very simple/straightforward actually), it wasn’t till after I finished, did I realize that doing it was completely unnecessary. What I was really trying to do was create a new database user, not an OCI user. The steps are different, simpler.

Federations

Another area that I got really hung up was with “Federations”. This was a relatively new concept for me. And I’m not sure if I should even do a deep dive on how Federations work. However, let it be known, if I receive even one (legitimate) comment on this subject, I will put together a treatise on Federations in OCI.

It took me about a day and a half to educate myself on how Federations and Identity Providers work in OCI. So, if you are reading this, and you think you’d benefit from a standalone article, then let me know. Otherwise, this page and this page are both very helpful for learning more about Federations in OCI.

Are you me?

If so, then you are acting as an administrator in your Always Free OCI account, as well as the database administrator. Being both is confusing for me, and maybe it is for you too. Since I don’t consider myself a traditional user (I’m blurring the lines when it comes to the different roles), I’m tasked with managing my OCI tenancy and also setting up my development environment. All this so I can begin to work on some applications/proofs of concepts (POCs) for interacting with my Autonomous Database via ORDS (Oracle REST Database Services aka our REST APIs).

Don’t be like me and allow yourself to get too weighed down with all the technical jargon thrown your way. Naturally, our docs read like they are geared toward the System or Database Administrator. And this makes sense; remember when you are in your tenancy you’re the de-facto admin for everything. At a larger organization/enterprise a developer would probably never do any of this setup. You’d just sign in to the database directly or connect via a command line.

Workflow for the “Every Person”

But for me (with my limited experience), the workflow looks something like this:

  1. Sign-up for an Oracle Cloud Account.
    You’ll be provided a Cloud Account Name and credentials. You’ll hear this account being referred to as your Tenancy name (you can modify the name later if you want).
  2. Next, create an Autonomous Database and create “ADMIN” credentials* for said database. You can see how to do that in Lab 1 of this workshop.
    Choosing the Autonomous Data Warehouse will be sufficient for development and POCs. *This administrator is different that the OCI tenancy administrator.
  3. Add a new user to your database by navigating to Database Actions > Administration > Database Users > Create User
  4. At a minimum, you’ll want to enable “Web Access” for this user. This will automatically grant two roles for the user: CONNECT and RESOURCE. You can always go back and edit the roles if more are required. Both are needed for the developer though.
  5. Once complete, you’ll see a URL in that user’s newly-created tile. This will link you out to a login page, for accessing the Database Actions console. Since you are the only user, you’ll just want to document the URL. Otherwise, as the admin, I’m assuming you’d share with the respective recipient.

Reference Images

The formatting on Medium is a little weird, so I’m going to include the images here, rather then in the numbered list above (but it should make sense for where they correspond):

When you sign in, you can quickly tell if you are the administrator by seeing if the “Service User Console” option is available. This is the administrator for the Oracle Cloud Infrastructure. Your tenancy.
This on is just a tip: when you sign in, you can quickly tell if you are the administrator by seeing if the “Service User Console” option is available.
Once you’ve created your Autonomous Database, navigate to Database Actions. This is where you need to go to create a new user.
Once you’ve created your Autonomous Database, navigate to Database Actions
Navigate to the Administration tile, and click it. It will take you to a dashboard of all current users, along with an option to create a new user.
Navigate to the Administration tile, and click it. It will take you to a dashboard of all current users, along with an option to create a new user.
Create a new user. Afterward, you’ll be provided an URL that allows a user to directly log into the Oracle Autonomous Database Actions Launchpad.
Create a new user. Afterward, you’ll be provided an URL that allows a user to directly log into the Database Actions Launchpad. You can see the example URLs here too.
Enabling Web Access allows a user to access the Autonomous Database from a web browser.
Doing this also, automatically select the Granted Roles of: CONNECT and RESOURCE. Just click Apply Changes to create this user.

Next up

From here on out, I’ll do all my development work with this account (I called mine “appdev”), to mimic what a typical user might encounter in a practical setting.

Right now, I’ m wrapping up a python + flask + database course on LinkedIn Learning. So far, its been pretty informative. If you are interested, you can take a look as well (to see the direction I’m headed). My goal will be to use the templates in this course as a resource for connecting to my database, but with ORDS. I hope to have something small in the next week or so. And I’ll be sharing here, and on my GitHub as well. So stay tuned.

Helpful resources

What I did here was very simplified, a distillation for creating a new user in your Autonomous Database. But I’ll include some of the resources that helped get me to this level of understanding:

And that’s it for now. But if you want to follow along then check me out at these places…

Find me

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store