Posts

Showing posts with the label Tutorial

Oracle Multitenant Architecture Explained: CDB vs PDB vs CDB$ROOT

Oracle Multitenant Database: What the Heck Are All These Containers? So you're diving into Oracle multitenant databases and you keep hearing about CDB this, PDB that, and a bunch of confusing container names? Yeah, I've been there. Let me break this down in a way that actually makes sense. The Apartment Building Analogy (Because Who Doesn't Love a Good Analogy?) Imagine Oracle multitenant architecture like an apartment building. Seriously, just bare with me here. When Oracle talks about a CDB (Container Database) , they're talking about the whole building. It's not a room you can walk into; it's the entire structure. All the plumbing, electricity, the foundation, the roof everything that makes the building work. Here's the thing though: you can't just "be in the building." You're always in a specific room or apartment. The CDB is just the name for the whole setup. CDB$ROOT: ...

Oracle Bequeath Connection Explained: Complete Guide with SQLcl and ORDS Examples

Image
Everything About Oracle Bequeath Connections What's a Bequeath Connection? A bequeath connection is an Oracle-specific connection method (protocol) that allows a client to connect directly to a database instance, bypassing the TNS listener. Instead of using TCP/IP, the client requests a dedicated server process locally using IPC (inter-process communication). 📌 Key Requirement The client and the database must be on the same server (same OS). 📌 Why Use Bequeath Connections? Improved performance: The connection does not use TCP/IP. Communication happens via local IPC, which is faster for local connections. OS authentication (no database password required): Since the connection is local, the database checks the OS user account instead of a database password. The user must belong to the OSDBA group (for example, the dba group on Linux). How It Works: Connectio...

ORDS REST-Enabled SQL Service: How to Customize Response Format (Complete Guide)

Hello fellas!! 👋 Today's topic: Understanding the REST-Enabled SQL Service in ORDS and How to Customize its Response Format. REST-Enabled SQL Service in ORDS What is it? The REST-Enabled SQL service is an HTTPS web service that provides access to the Oracle Database SQL engine. You can POST SQL statements to the service. The service then runs the SQL statements against Oracle Database and returns the result to the client in a JSON format. Example: Making a Request When making a request to the REST-Enabled SQL Service, you typically get a response by default that looks like this: Sample Request curl --location 'http://localhost:8086/ords/<schema_alias>/_/sql' \ --header 'Content-Type: application/json' \ -u "user:dummySecret" \ --data '{ "statementText": "select sysdate from dual" }' Default Response Format ...

ORDS vs C# for REST APIs: Which is Easier? (Side-by-Side Comparison)

ORDS vs C# for Building REST APIs: Which is Easier? If you've ever built REST APIs using commonly used programming languages, you know the drill: create models, wire up a controller, connect to a database, map DTOs, validate, inject dependencies… and that's before you even touch the security aspect of the API. 😅 Being a past C# lover, I started questioning how easy it was to build REST APIs in ORDS compared to C#. Spoiler: ORDS is crazy simple for the basics. Let me show you a side-by-side comparison using the same use case, managing a Country table, without diving into security (we'll ignore auth and tokens and just focus on the REST experience). Use Case We want to expose the following operations via REST: GET /countries — list all countries GET /countries/{id} — get one country POST /countries — create a new country ...