Currently browsing category

Oracle

How To Move OR Rename An Oracle Datafile?

How to move a datafile from one location to another in Oracle: At times , to fix the space crunch in a filesystem or to follow the filesystem standards or proper naming conventions , a DBA might have to move/rename an oracle datafile. The datafile movement can be performed without …

15 Basic SQL Queries For A Beginner DBA

SQL Queries for Dummies! Yes – Some of the basic Oracle queries/commands which might turn out extremely helpful to the beginners of Oracle database. 1. To check the name of the database: SQL> select name from v$database; 2. To check the version of a database: SQL> select * from v$version; 3. …

How To Make a Table READ ONLY in Oracle 11g?

Read Only tables in Oracle 11g: Read-only table is a  good enhancement introduced in Oracle 11g , using which we can safeguard the tables from DML operations. This new feature helps to switch a table to READ ONLY mode by executing a single ALTER TABLE command. SQL > Alter table table_name …

How To Drop A Table Permanently From Oracle Database?

Dropping table permanently: SQL> drop table test_tab purge; Table dropped. SQL> select OBJECT_NAME, ORIGINAL_NAME, DROPTIME from recyclebin; no rows selected. Purging of table from recycelbin: SQL> drop table test_tab; Table dropped. SQL> select OBJECT_NAME, ORIGINAL_NAME, DROPTIME from recyclebin; OBJECT_NAME           ORIGINAL_NAME           DROPTIME —————————— —————-     —— BIN$dD1ZsEvnDTHgRAADujKrxQ==$0 TEST_TAB 2010-09-23:12:40:58 SQL> purge table …

Flashback Table in Oracle Database – Query Recyclebin

What happens when we drop a table in Oracle 10g? Whenever we drop a table in Oracle 10g, internally Oracle will rename the table and all the associated objects like index, constraints etc with a prefix of “BIN$” and stores in the recyclebin. We  can either read the data directly …

How To Run ADDM in an Oracle Database?

ADDM or Automatic Database Diagnostic Monitor is a tool which helps in automatic database performance monitoring. Run the below script to run ADDM. @?/rdbms/admin/addmrpt.sql The following is a sample  output you get if you Run the ADDM  when there is no significant database activity. DETAILED ADDM REPORT FOR TASK ‘TASK_416’ …