-
adding primary key to already existing table in oracle
lets assume that there was a table ABC that was already existing in the database and you want to add an additional column with unique primary key values. sql to create table abc : CREATE TABLE “ABC” ( “USERNAME” VARCHAR2(30 BYTE) NOT NULL ENABLE, “USER_ID” NUMBER NOT NULL ENABLE, “CREATED” DATE…
-
Performance – AWR report
Performance – AWR Display a list of snapshots Produce a report To see the snapshot interval and retention period Change the snapshot interval Change the retention period Manually take a snapshot List all baselines Create a baseline Remove a baseline Enable/Disable automatic snapshots Time model queries Produce an Active Session History (ASH) report Display a…
-
datapump basic’s
CONN / AS SYSDBAALTER USER scott IDENTIFIED BY tiger ACCOUNT UNLOCK; CREATE OR REPLACE DIRECTORY test_dir AS ‘/u01/app/oracle/oradata/’;GRANT READ, WRITE ON DIRECTORY test_dir TO scott; Note. Data Pump is a server-based technology, so it typically deals with directory objects pointing to physical directories on the database server. It does not write to the local file…
-
scheduling crontab jobs in Linux or Unix
1. Scheduling a Job For a Specific Time The basic usage of cron is to execute a job in a specific time as shown below. This will execute the Full backup shell script (full-backup) on 10th June 08:30 AM. Please note that the time field uses 24 hours format. So, for 8 AM use 8,…
-
some basic sql’s for beginners in Oracle database
Oracle Database Commands and Queries: 1.To view all the table from dictionary :SQL> select table_name from dictionary; 2.To identify the database name :SQL> select name from v$database; 3.To identify the instance name :SQL> select instance from v$thread; 4.To know the size of the database blocks SQL> select value from v$parameter where name =’db_block_size’; 5.List the…






