Database

Download files to Linux From Oracle site

Download files to Linux From Oracle site

Get the url link you want to download from oracle portal and use wget command on linux with your oracle credentials, once password prompts enter and file start download

wget –http-user=mithun@******.com –ask-password “https://updates.oracle.com/Orion/Services/download/p13390677_112040_Linux-x86-64_1of7.zip?aru=16716375&patch_file=p13390677_112040_Linux-x86-64_1of7.zip” -O file_name

IMPDP command

Command to create a new db user and dump

impdp system dumpfile=fullexpdp.dmp logfile=fullexpdpimp.log directory=DBBACKUP schemas=scott remap_schema=scott:tiger REMAP_TABLESPACE=scottts:tigerts transform=oid:n

use below for meta data or data only import

CONTENT=METADATA_ONLY
CONTENT=DATA_ONLY 

Query to check ASM disk and Diskgroup details

— ASM Disk Group Space —

select name, total_mb, free_mb from v$asm_diskgroup
/

Check candidate disk present for add disk —
SELECT name, header_status, path FROM V$ASM_DISK

Check the compatibility of a disk group —
SELECT name AS diskgroup, substr(compatibility,1,12) AS asm_compat,
substr(database_compatibility,1,12) AS db_compat FROM V$ASM_DISKGROUP
/

Check Diskgroup attribute —
SELECT SUBSTR(dg.name,1,12) AS diskgroup, SUBSTR(a.name,1,24) AS name,
SUBSTR(a.value,1,24) AS value, read_only FROM V$ASM_DISKGROUP dg,
V$ASM_ATTRIBUTE a WHERE dg.group_number = a.group_number
/

Check rolling patch mode —
SELECT SYS_CONTEXT(‘SYS_CLUSTER_PROPERTIES’, ‘CLUSTER_STATE’) FROM DUAL;

Check rolling patch level —
SELECT SYS_CONTEXT(‘SYS_CLUSTER_PROPERTIES’, ‘CURRENT_PATCHLVL’) FROM DUAL;

ACCESS REMOTE DATABASE VIA COMMAND LINE(From Oracle Client PC)

sqlplus system/PASSWORD@172.17.111.35:1521/mi18c

sqlplus “system/PASSWORD@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=172.17.111.35)(Port=1521))(CONNECT_DATA=(SID=mi18c)))”