Posts

DB2: To get role for a userid

 SELECT * FROM SYSCAT.ROLEAUTH WHERE GRANTEE = 'ESBGCPDB2PRDUSER';

Github : to check github status when tere are failures

  GitHub Status https://www.githubstatus.com/

Postgres: To get foreign key dependencies

SELECT     fk_tco.table_schema AS child_schema,     fk_tco.table_name AS child_table,     pk_tco.table_schema AS parent_schema,     pk_tco.table_name AS parent_table,     rco.constraint_name AS foreign_key_constraint_name FROM     information_schema.referential_constraints rco JOIN     information_schema.table_constraints fk_tco ON rco.constraint_name = fk_tco.constraint_name     AND rco.constraint_schema = fk_tco.table_schema JOIN     information_schema.table_constraints pk_tco ON rco.unique_constraint_name = pk_tco.constraint_name     AND rco.unique_constraint_schema = pk_tco.table_schema WHERE     fk_tco.constraint_type = 'FOREIGN KEY'     AND pk_tco.constraint_type = 'PRIMARY KEY' -- Or 'UNIQUE' for unique constraints     -- Optional: Filter by specific parent table or schema     -- AND pk_tco.table_name = 'your_parent_table_name'     ...

Oracle: When server IP changed for RMAN

  oracle-tbpromostgdb601:pmmstag:/usr/local/oracle/rman_PMMSTAG>rman target / catalog pmmstag/bkup_123@rmprod Recovery Manager: Release 12.2.0.1.0 - Production on Fri Nov 14 11:42:04 2025 Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved. connected to target database: PMMSTAG (DBID=4233984818) connected to recovery catalog database recovery catalog schema version 19.03.00.00. is newer than RMAN version RMAN>  unregister database; database name is "PMMSTAG" and DBID is 4233984818 Do you really want to unregister the database (enter YES or NO)? YES database unregistered from the recovery catalog RMAN>  register database; database registered in recovery catalog starting full resync of recovery catalog full resync complete RMAN>  resync catalog ; starting full resync of recovery catalog full resync complete RMAN> exit

Unix: to search from a directory for a string

 grep -r  "172\.31\.80\.166\."

DB2: transfer ownership of procedure

 $ db2 "transfer ownership of procedure wcs.TMW_BUNDLE_DELTA_INVENTORY_UPDATE to user wcs" DB20000I  The SQL command completed successfully. [prd1ins1@db2prd601  ~]