Wednesday, February 26, 2020

when you clone oracle DB from 1 server to another server ,will the DB id change?

when you clone oracle  DB from 1 server to another server ,will the DB id change?

When we clone the  oracle DB from one server to another server DBID wont change and remain same from Source database.

ERROR OGG-02091 Operation not supported because enable_goldengate_replication is not set to true

Issue:
we had recently upgraded the target database from 11202 to 11204 and after that replicate restarted and found replicate abended with below error.

2020-02-20 20:34:45  ERROR   OGG-02091  Operation not supported because enable_goldengate_replication is not set to true.

2020-02-20 20:34:45  ERROR   OGG-01668  PROCESS ABENDING.


Solution:
while checking with MOS find the below solution  which is solved the problem.


SQL> show parameter ENABLE_GOLDENGATE_REPLICATION

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
enable_goldengate_replication        boolean     FALSE
SQL> alter system set enable_Goldengate_replication=TRUE scope=both;

System altered.

SQL> show parameter ENABLE_GOLDENGATE_REPLICATION

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
enable_goldengate_replication        boolean     TRUE

Thursday, February 20, 2020

How to list the privileges inside the Role in oracle database?

Here is the 2 views used to list the privileges inside the roles:

ROLE_TAB_PRIVS==> used to list table level privilege
ROLE_SYS_PRIVS ==> used to list system level privilge


SQL> select PRIVILEGE from role_sys_privs where ROLE='RESOURCE';

PRIVILEGE
----------------------------------------
CREATE CLUSTER
CREATE SEQUENCE
CREATE TRIGGER
CREATE TABLE
CREATE PROCEDURE
CREATE TYPE
CREATE OPERATOR
CREATE INDEXTYPE


8 rows selected.

select TABLE_NAME,PRIVILEGE from role_tab_privs where ROLE='TEST';

Monday, February 17, 2020

step by step AWS Redshift database cluster encryption

step by step AWS Redshift database cluster encryption :


This process has 2 steps and it needs down  time from the application and during that time Redshift cluster will not be available for ETL  & its in Read ONLY mode.Encryption process will be time consuming based on the size  of data on it.AWS will try to recreate the cluster during encryption process and move to other cluster.

1)create encryption key using AWS KMS (Key Management System)
2)Apply KMS Key to Redshift cluster











How to change the master user password on Redshift cluster?

Here is the step to change the master user password on Redshift cluster:



How to recreate access_key_ID and secret_key for AWS user?

Here is the step to recreate  access_key_ID and secret_key for AWS user if you forget those:





Wednesday, February 12, 2020

How to Restore AWS redshift table alone using snapshot?

Step  to Restore AWS redshift  table alone using snapshot and you can do it using the AWS console.

if you have  cluster snapshot you can restore the  table from the snapshot.


pre-request:

Source DB:
source schema:
source table name:


Target DB:
Target schema:
Target table name:

If Target DB does not have table , restore will automatically create it.









How to Restore AWS redshift cluster using snapshot?

Step  to Restore AWS redshift cluster using snapshot and you can do it using the AWS console.
if you have  cluster snapshot you can restore the entire cluster:














How to Reboot a AWS Redshift Cluster?

Here is the steps to    Reboot a AWS Redshift Cluster:

cauition:Please do not reboot redshift cluster without business approval,all the running SQL's would  be cancelled






How to copy data from AWS Redshift table to S3 bucket?

Here is the steps to copy data from AWS Redshift table to S3 bucket

pre-request:
1)we  need user created with privilege to access AWS redshift +S3 bucket
2)we need access_key_ID & secret_access_key for the user

we have utility called UNLOAD used to  extract  data from redshift tables to S3 bucket




How To Load data from AWS S3 bucket to Redshift database?

Here is the steps to  Load data from AWS S3 bucket to Redshift database:

pre-request:
1)we  need user created with privilege to access AWS redshift +S3 bucket
2)we need access_key_ID & secret_access_key for the user


COPY utility used to load data from S3 bukcet to AWS redshift database tables ,if the file is CSV  or any delimeter format

How to delete snapshot from AWS Redshift?

Delete snapshot from AWS Redshift





How to create Manual snapshot for AWS Redshift?

create Manual snapshot for AWS Redshift




How to create AWS redshift cluster?

Here is the step by step to create AWS redshift Cluster:

1