teeDBA · Oracle with Tee
ไทย

All articles

15 articles

DBA

How Do Users and Schemas Differ, and Who Owns This Table?

If we can query the ORDERS table, does that mean the account we are using owns it? In this article, we will use one account to read a table in another schema and see the difference between a user and a schema owner in practice.

3 min read
DBA

Tablespace and Datafile: What Should You Check When Space Is Running Low?

When the system warns that a tablespace is nearly full, do we need to add a datafile or increase the file size immediately? Before deciding to add space, let's read the actual values in the system and distinguish what each number represents: actual usage, the current file size, or the maximum size the system allows it to reach.

3 min read
SQL

Why Do Two Sessions See Different Data?

Why does Session A read 100 while Session B reads 120, even though they use the same SELECT statement and run their queries at nearly the same time? Is Oracle reading the data incorrectly? Let's trace what actually happens through the sequence of UPDATE and COMMIT operations.

3 min read
PL/SQL

Is PL/SQL Reporting No Error Because We Accidentally Hid It?

Can PL/SQL report successful completion even though something went wrong inside the block or an error remains unresolved? The answer is yes, if an exception handler catches the error and lets the block finish silently. We'll try a query that returns no rows and compare three ways of handling the exception.

3 min read
DBA

Can't Connect to Oracle: What Should You Check for Host, Port, and Service Name?

Why can't you connect to Oracle Database even though you're using the same connection details that worked before? What information should you send to your DBA for help? This article explains the roles of Host, Port, and Service Name, then uses SQL commands from a working session to confirm the services on the database side.

3 min read
Performance

UPDATE Is Stuck: How Can You Tell Whether It Is Waiting for a Lock?

You run an UPDATE, but the screen seems frozen. No result comes back, and no error appears. Could your statement be waiting for a lock held by another session? In this article, we will reproduce the situation by having Session A hold a lock on a row while Session B tries to update the same row. We will then collect evidence and observe how the database behaves while the statement is waiting.

4 min read
SQL

If the App Already Validates Data, Do We Still Need Database Constraints?

The web form or application already validates data. But if a script, batch job, or another program writes to the same table, do those business rules still apply across every entry point? In this article, we'll add constraints to a table and run statements to see both what succeeds and what the database refuses to save.

4 min read