-
Export/Zip and Unzip/Import using UNIX Pipes
Continue reading →: Export/Zip and Unzip/Import using UNIX PipesExport/Zip and Unzip/Import using UNIX Pipes If you are creating and using large dump (.dmp) files with Oracle’s export (exp) and import (imp) utilities, you can compress and uncompress the dump file as needed using gzip and gunzip (from GNU) or the unix compress and uncompress utilities. One problem with…
-
Example Data Pump Export script for Linux/Solaris
Continue reading →: Example Data Pump Export script for Linux/SolarisData Pump Export script for Linux/Solaris Data Pump is a command-line utility for importing and exporting objects like user tables and pl/sql source code from a Oracle database. It’s new since Oracle 10g, and it’s a better alternative for the “old” exp/imp utilities. However, do not use Data Pump to…
-
expdp full backup thru scheduler
Continue reading →: expdp full backup thru schedulerScheduler and data pump expdb Oracle Enterprise Edition 11.2.0.2Linux x86_64 I would like to routinely export some or all of my database as part of my DR strategy. I have always used crontab to call my expdp script on a routine basis. Now I want to change that from using…
-
Basic Linux commands
Continue reading →: Basic Linux commandsfind all files in directory older than 90days syntax find -type f -mtime +30 -print example find -type f -mtime +90 -print delete all files in directory older than 90dayssyntaxfind -type f -mtime +30 -deleteexample : find /u02/dump -type f -mtime +90 -delete Count files in current directory ls | wc -l…
-
ORA-28368: cannot auto-create wallet
Continue reading →: ORA-28368: cannot auto-create walletORA-28368: cannot auto-create wallet ORA-28368: cannot auto-create wallet ORA-28368: cannot auto-create wallet If you got this error simple create a directory named “wallet” on your $ORACLE_BASE/admin/$ORACLE_SID. SQL> alter system set encryption key identified by manager; alter system set encryption key identified by manager * ERROR at line 1: ORA-28368: cannot…
-
Finding out Last DML Activity on a Table
Continue reading →: Finding out Last DML Activity on a Tablecreate a function for the DML logging create or replace function scn_to_timestamp_safe(p integer) return timestamp is e_too_old_scn exception; pragma exception_init(e_too_old_scn,-8181);begin return case when p is not null then scn_to_timestamp(p) else null end;exception when e_too_old_scn then return null;end;/ now querying the last DML (insert,update,delete) for…
-
Find all tables without primarykey in Database
Continue reading →: Find all tables without primarykey in DatabaseAs a DBA we need to make sure that all the tables in your database are have their uniquesness so that the rows are not duplicate and we avoid the redundant data in our databases. below is the simple sql that can give you list of tables that don’t have any…
-
Easiest way to switch between schemas just with a click of button using sqqldeveloper
Continue reading →: Easiest way to switch between schemas just with a click of button using sqqldeveloperEasiest way to switch between schemas just with a click of button in sqldeveloper 3.2 or lower versions.This doesnt work with sqldev 4 or higher General : The Schema Select extension for Oracle SQL Developer provides a convenient drop-down list which lets you choose the current schema in a sql…
-
adding primary key to already existing table in oracle
Continue reading →: adding primary key to already existing table in oraclelets 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…
-
Performance – AWR report
Continue reading →: Performance – AWR reportPerformance – 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…






