How to check which objects are locked in Oracle database?
Sometimes its necessary to check which tables are locked on the database (be it by running ETL sessions or other database users). Information on current locks on the Oracle database objects can be found in the V$LOCKED_OBJECT view. Here’s a SQL query to check the locked objects on Oracle database: Continue reading →
How to check the tablespace usage in Oracle database?
Here’s a handy query to get the values of tablespace size, used and available free tablespace and usage percentage on Oracle database: Continue reading →
How to get only the first rows from query results?
Sometimes you need just to fetch first few rows from the query results, not the whole results set. Different databases offer functions to limit the rows displayed from the query results. Continue reading →
How to deal with a single quote character in SQL?
When trying to execute a statement with a single quote (or apostrophe) inside a string in a SQL client:
SELECT * FROM employees WHERE name = 'd'Artagnan'
you get an error:
ORA-00933: SQL command not properly ended
Continue reading →