Posts

Showing posts with the label SQL

Oracle Locks - ORA00054

Most of the self-help website outthere would suggest that whenever you encounter the ORA-00054 error message; just go check the tables like DBA_BLOCKERS and the likes to weed out the root cause. Well for typical users like me, every time I run the command "select * from DBA_BLOCKERS" the only reply I get from the DB would be something like "object does not exist". Bummer. That is until I found out that you actually had to run a script for all of those "DBA lock"-related table to be created. Simply go to $ORACLE_HOME/rdbms/admin directory and run catblock.sql script. And owh yeah - you might need to have admin privileges for this to work.

SQLplus basics

Several useful commands. Basic Retrieval from single table SELECT [DISTINCT] display_fields FROM tables WHERE field_conditions ORDER BY field_name [ASC | DESC]; e.g: select * from MethodParameter; e.g: select * from MethodParameter where NAME=DUNHAM; Delete the whole content of table DROP TABLE tablename ; e.g: drop table MethodParameter; Delete one or more records from a table DELETE FROM table_name WHERE record_retrieval_conditions ; e.g: delete from MethodParameter where NAME='DUNHAM BUSH';