Skip to main content

Posts

TransparentDataEncryption (TDE) column implementation

Here are the TDE column implementation steps: ð  Run below statements sequentially: One sqlplus session is enough for entire action plan. Database : orcl Server : xxxxxxxxx OS User : tdeuser conn / as syskm define tde_wallet_full_path=&tde_wallet_full_path define password=&password col WRL_PARAMETER for a60 col WRL_TYPE for a8 col STATUS for a20 col WALLET_TYPE for a10 set lines 200 select * from gv$encryption_wallet; administer key management create keystore '&&tde_wallet_full_path' identified by "&&password"; select * from v$encryption_wallet; administer key management set keystore open identified by "&&password"; select * from v$encryption_wallet; administer key management create key identified by "&&password" with backup; select * from v$encryption_wallet; select key_id,activation_time from v$encryption_keys; administer key management use key ...

Renaming/Relocating/Move Data Files ONLINE from Release 12.1

Note: Online move only works with  Enterprise Edition(EE). When we try to perform online move in SE it will fail with below error. SYS@EPMDEV > ALTER DATABASE MOVE DATAFILE '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev' TO '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev.dbf'; ALTER DATABASE MOVE DATAFILE '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev' TO '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev.dbf' * ERROR at line 1: ORA-00439: feature not enabled: online move datafile SYS@EPMDEV > !oerr ora 439 00439, 00000, "feature not enabled: %s" // *Cause:  The specified feature is not enabled. // *Action: Do not attempt to use this feature. In SE we have to perform datafile rename in same old traditional way (OFFLINE).. Renaming an Online Data File: SYS@EPMDEV > ALTER DATABASE MOVE DATAFILE '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev' TO '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev_1.dbf'; Relocating an...

Renaming/Relocating/Move Data Files ONLINE from Release 12.1

Note: Online move only works with  Enterprise Edition(EE). When we try to perform online move in SE it will fail with below error. SYS@EPMDEV > ALTER DATABASE MOVE DATAFILE '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev' TO '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev.dbf'; ALTER DATABASE MOVE DATAFILE '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev' TO '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev.dbf' * ERROR at line 1: ORA-00439: feature not enabled: online move datafile SYS@EPMDEV > !oerr ora 439 00439, 00000, "feature not enabled: %s" // *Cause:  The specified feature is not enabled. // *Action: Do not attempt to use this feature. In SE we have to perform datafile rename in same old traditional way (OFFLINE).. Renaming an Online Data File: SYS@EPMDEV > ALTER DATABASE MOVE DATAFILE '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev' TO '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev_1.dbf'; Relocating an Onlin...

Renaming/Relocating/Move Data Files ONLINE from Release 12.1

Note: Online move only works with  Enterprise Edition(EE). When we try to perform online move in SE it will fail with below error. SYS@EPMDEV > ALTER DATABASE MOVE DATAFILE '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev' TO '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev.dbf'; ALTER DATABASE MOVE DATAFILE '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev' TO '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev.dbf' * ERROR at line 1: ORA-00439: feature not enabled: online move datafile SYS@EPMDEV > !oerr ora 439 00439, 00000, "feature not enabled: %s" // *Cause:  The specified feature is not enabled. // *Action: Do not attempt to use this feature. In SE we have to perform datafile rename in same old traditional way (OFFLINE).. Renaming an Online Data File: SYS@EPMDEV > ALTER DATABASE MOVE DATAFILE '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev' TO '/u05/odb/ORADATA_2/EPMDEV/epm_hfm_dev_1.dbf'; Relocating an Online D...

Database Security Assessment Tool

The Oracle Database Security Assessment Tool (DBSAT) analyzes database configurations and security policies to uncover security risks and improve the security posture of Oracle Databases within your organization. You can use DBSAT to implement and enforce security best practices in your organization. DBSAT reports on the state of user accounts, role and privilege grants, and policies that control the use of various security features in the database. You can use report findings to: • Fix immediate short-term risks • Implement a comprehensive security strategy This tool released just few days back(May 2016) .. You can run the DBSAT tool on Oracle Database 10.2.0.5 and later releases. Technical Steps(How to use): Download & unzip DBSAT.ZIP     :  Doc ID 2138254.1 DBSAT Collector : ./dbsat collect system/oracle12c@dgmgcdb '/home/oracle/dbsat_out/report' DBSAT Reporter :  ./dbsat report -a -n /home/oracle/dbsat_out/report -a =>  include all the databas...

Wrapper script to run sql statements

Wrapper script to run any sql statement in all databases hosted on that server runsql.sh #!/bin/bash echo " <___________enter your title here___________> " export ORAENV_ASK='NO' for ORACLE_SID in  <___________enter all SIDs, space seporated___________> do export ORACLE_SID . oraenv > /dev/null echo " =============== $ORACLE_SID : ===============" sqlplus -s / as sysdba @<___________enter your .sql file___________>  #it runs as sysdba, change login details as per your requirement. echo " =============================== Completed for the database $ORACLE_SID. " read -p "Press Enter to continue or Ctrl+c to exit ..." done unset ORAENV_ASK

Patching using Datapatch from 12c

From 12c on wards we don’t need to run Patching post  installation scripts  postinstall.sql  &  @catbundle.sql psu apply   and validate log files manually .. All we need to do is just run   datapatch   after applying patch. ****************************** *********************** In 11G  After applying patch we need to run like following order .. postinstall.sql    =>  for OJVM in upgrade mode @catbundle.sql psu apply  =>  for PSU in normal startup mode ****************************** *********************** But from 12c datapatch will take care of post scripts work. ./datapatch –verbose Please see log for datapatch. [oracle@s24-oratl15  OPatch ]$  ./datapatch -verbose SQL Patching tool version 12.1.0.2.0 on Tue May  3 01:50:33 2016 Copyright (c) 2015, Oracle.  All rights reserved. Log file for this invocation: /u01/app/oracle/base/ cfgtoo...