Tuesday, January 5, 2021

Oracle19c LogMiner

ORA-01325 archive log must be enabled


archive log - copy of redo log

delete of data

suspend archive on datapump



CL SCR

automatic log file slecction by specifying time frame timestamps

sqlplus -s 

SET LINESIZE 200;

alter session sset nlf_date_format = 'DD-MON-YYYY HH24:MI:SS';

ALTER DATATBASE ADD  SUPPLEMENTAL LOG DATA;

select supppliemental)log_data)min from V$DATABASE;


EXECUTE DBMS_LOGMNR.ADD_LOGFILE( -

    LOGFILENAME => 'PATH/fast_recovery_area/LGDB/archivelog/DATA/*.arc'. -

    options =>   DBMS_LOGMNR.NEW);>>


EXECUTE DBMS_LOGMNR.ADD_LOGFILE( 'path/redo1.log');


EXECUTE DBMS_LOGMNR.START_LOGMINER( -

        OPTIONS=>DBMS_LOGMNR.DICT_FROM_ONLLINE_CATALOG);

    STARTTIME => '01-Jan-2021 00:00:00', 

        ENDTIME =>


CONTINUOUS MINE IS GONE IN 19C

USE



DESC V$LOGMNR_CONTENETS

COLUMN X FORMAT A##;



SELECT OPERATION,USERNAME,OS_USENAME, SQL_REDO, TIMESTAMP FROM VS LOGMNR_CONTENTS;


DATA DICTIONARY USES UTL_FILE_DIR




localhost:1158/em

alter dataabae add suplimental log data(pirmary key) columns

alter system switch logfile; -- to force checkpoint



1. create init param on oracle db pointing to path \

init param can be pfile INIT.ora or spfile (server binary)

SHOW PARAMETERS UTL_FILE_DIR;

SHOW PARAMETERS 

Issue this command to display the parameter values that are currently in effect.

V$PARAMETER view

Query this view to display the parameter values that are currently in effect.

V$PARAMETER2 view

Query this view to display the parameter values that are currently in effect. The output from this view is the same, but more readable, than the output from the V$PARAMETER view.

V$SPPARAMETER view

Query this view to display the current contents of the server parameter file. The view returns null values if a server parameter file is not being used by the instance.

alter system set UTL_FILE_DIR = path


then us the DBMS_LOGMNR_D.build in plsql 



to build dd

EXECUTE DBMS_LOGMNR_D.BUILD('datadict.ora', -

    'utl_file_dir_loc', -

    DBMS_LOGMNR_D.store_in-flat_file;>>


EXECUTE DBMS_LOGMNR.START_LOGMNR( -

    DICTFILENAME => 'PATH/datadict.ora');>



https://grepora.com/2020/05/13/19c-could-not-execute-dbms_logmnr-start_logmnr-ora-44609-continous_mine-is-desupported-for-use-with-dbms_logmnr-start_logmnr/



LogMiner dictionary provide table/column names



 

Wednesday, April 22, 2020

Oracle alter version control

create table fox_version
versionid number not null
version_date date default systimestamp

create unique index UK on fox_version ('1');

Monday, January 6, 2020

Oracle 19c

Oracle 19c (12.2.0.3)

install

DISPLAY=localhost:0.0
export DISPLAY

global database name= orcl.cgi.com
SID=CUCSDB

ORACLE_BASE /ora/cucs/root

ORACLE_HOME=$ORACLE_BASE/19c/software

ORACLE_ROOT=/ora/c/root/cdb/19c

data=$ORACLE_ROOT/data

https://docs.oracle.com/en/database/oracle/oracle-database/12.2/cncpt/introduction-to-oracle-database.html#GUID-2B1BADE1-C36F-4555-9867-3B15B6CE858C


Container CDB
Pluggable PDB (multi tennant) in CDB

Remote Standby Database with Observer


A file system enables disk space to be allocated to many files. Each file has a name and is made to appear as a contiguous address space to applications such as Oracle Database. The database can create, read, write, resize, and delete files.
A file system is commonly built on top of a logical volume constructed by a software package called a logical volume manager (LVM). The LVM enables pieces of multiple physical disks to combine into a single contiguous address space that appears as one disk to higher layers of software.


/etc/oratab mounts db startup
/etc/fstab mount points

adrci > show alert

lsnrctl LISTNER

yum inst zip/unzip/xauth/vim
install xming modify XO.hosts
start xming :0.0
/etc/ssh/sshd_config
X11Fowarding yes
X11DisplayOffset 10
XAuthLocation /usr/bin/xauth
sudo systemctl restart sshd
puty ssh>x11>enable x11 forwarding
Xdisplay location localhost:0.0
./runInstaller

/ud1/oradata
/ue1/datapump
/uf1/fast_recovery_area
/us1/app/oracle/product/19/db_1/runInstaller
/us1/software - patches
/us1/tmp_install





Monday, December 16, 2019



pvdisplay

pvcreate /dev/sdb1

-lvs
vgs

vgextend Volugroup /dev/sb1

lvcreate -L 40G -h lv_rarw volgroup




fdisk -
/dev/xvda1,2,3


https://www.linuxquestions.org/questions/linux-newbie-8/aborted-journal-and-volume-remounted-read-only-812216/


pvs /dev/xvdd


Tuesday, April 10, 2018

Jboss Developer Openshift MAC


Install Docker

brew install openshift-cli


OpenShift/Minishit on MAC

Quick notes to install openshit on mac -

openshift.org/vm
brew cask install minishift
\curl -sSL https://get.rvm.io | bash -s stable

Open your terminal and run

\curl -sSL https://get.rvm.io | bash -s stable
When this is complete, you need to restart your terminal for the rvm to work.

Now, run rvm list known

This shows the list of versions of the ruby.

Now, run rvm install ruby-2.3

If you type ruby -v in the terminal, you should see ruby 2.4.2.

If it still shows you ruby 2.0., run rvm use ruby-2.4.2 --default.


brew install docker-machine-driver-xhyve

sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve

minishift start

https://docs.openshift.org/latest/minishift/getting-started/quickstart.html