Friday, December 1, 2023

ORA-00800: soft external error, arguments: [Set Priority Failed], [VKTM], [Check traces and OS configuration],

 issue:

ORA-00800: soft external error, arguments: [Set Priority Failed], [VKTM], [Check traces and OS configuration], [Check Oracle document and MOS notes], [] error reported on oracle database 64 bit 19.16.0.0


Root cause:

looks like oradism  (file located under cd $ORACLE_HOME/bin) permission issue.


Solution:

1) check if the below parameter set to _highest_priority_processes=VKTM in DB level ,if not set

alter system set _highest_priority_processes=VKTM scope=spfile;

2) check cd $ORACLE_HOME/bin oradism  and make sure it has Sticky bit set,if not set the sticky bit and reboot the DB.


cd $ORACLE_HOME/bin ls -lrt oradism (see the sticky bit)

-rwxr-x--- 1 oracle oinstall 147848 Apr 17  2019 oradism  >>>>>>>>>>>>>>>>>> wrong one

-rwsr-x--- 1 root oinstall 147848 Apr 17 2019 oradism >>>>>>>>>>>>>>>>>>>> Correct one

Tuesday, July 18, 2023

script to find what are the users having CREATE privilege's on AWS Redshift database

 script to find what are the users having CREATE privilege's on AWS Redshift database:


SELECT u.usename AS username,

       nsp.nspname AS schema_name,

       has_schema_privilege(u.usename, nsp.nspname, 'CREATE') AS has_create_privilege

FROM pg_user u

CROSS JOIN pg_namespace nsp

WHERE nsp.nspname NOT LIKE 'pg_%' AND nsp.nspname not in ('information_schema','public') and u.usename not in('admin')

  AND has_schema_privilege(u.usename, nsp.nspname, 'CREATE') = true

ORDER BY u.usename, nsp.nspname;

Tuesday, January 3, 2023

How to migrate the data between AWS Redshift clusters ? or steps to configure the datashare in aws Redshift cluster?

 pre-request:

******************


get the cluster_name_space of source & Target cluster.



[source_cluster_name_space]==>source_DB


[target_cluster_name_space]==>Target_DB


source_cluster (Producer)

**********************


 create datashare Data_share_copy_source_2_target publicaccessible=false; --create Datashare


 alter datashare Data_share_copy_source_2_target add schema  schema_name; --- add schema to migrate the tables


 alter datashare Data_share_copy_source_2_target set includenew=true for schema schema_name;--add future object


 alter datashare Data_share_copy_source_2_target add all tables  in  schema schema_name;--current objects



 grant usage on datashare Data_share_copy_source_2_target to namespace '[target_cluster_name_space]';




Target_cluster (consumer)

********************


--create new datashare  to import the data to current/target cluster


create database import_DS_target from datashare Data_share_copy_source_2_target of  namespace '[source_cluster_name_space]';


--copy the data from imported Datashare  to  target DB tables


Move data  from source to Target:

***************************

create the empty table1 with same structure on target DB and insert the data.

insert into schema_name.table1 select * from  Data_share_copy_source_2_target.schema_name.table1