Quantcast
Channel: Donghua's Blog - DBAGlobe
Browsing latest articles
Browse All 604 View Live

Script to extract ROLE DDL and dbms_metadata.get_granted_ddl bug for Oracle 23c

 Script to extract ROLE DDLset long 8000set longchunksize 2000with role_name as (select'DBA'as name from dual) select dbms_metadata.get_ddl('ROLE', r.role) AS ddl from dba_roles r, role_name where...

View Article


Grants for new role DB_DEVELOPER_ROLE in Oracle 23c

 Granted ROLE PrivilegesSQL>set tab off SQL>column grantee for a17 SQL>select*from dba_role_privs where grantee='DB_DEVELOPER_ROLE'; GRANTEE GRANTED_ROLE ADM DEL DEF COM INH -----------------...

View Article


Use Oracle supported methods to clean up old/inactive patches and free up...

Check the patch store size after Apr2023 (19.19) RU patch[oracle@ol ~]$ du -sh $ORACLE_HOME/.*_storage 12K /u01/db19c/.opatchauto_storage 7.2G /u01/db19c/.patch_storage Check the patch...

View Article

Total 547 bugs fixed in Apr-2023 Oracle 19c updates (19.19RU + OJVM)

 Total 547 bugs fixed in Apr-2023 Oracle 19c updates (19.19RU + OJVM)BUG_IDDESCRIPTION22813401UNASSIGNED OUT BINDS FROM A PL/SQL BLOCK ARE NOT HANDLED BY TTC23220873BAD JOIN CARDINALITY WITH HYBRID OR...

View Article

Total 47 bugs fixed in Apr-2023 Oracle 21c updates (21.10RU)

 Total 47 bugs fixed in Apr-2023 Oracle 21c updates (21.10RU)BUG_IDDESCRIPTION26950182ConnectionWaitTimeout should exceed CONNECT_TIMEOUT31429692Optimize UCP timeout mechanisms31596817TRAIL FUNCTION...

View Article


PostgreSQL JDBC prepareThreshold Behaviour with Database setting plan_cache_mode

Source code: https://raw.githubusercontent.com/luodonghua/PostgreSQL/main/Development/Java/JdbcPreparedPlanCacheModeDemo.javaSummaryObservations:During testing, the first time execution with id=1000 is...

View Article

Impacts on MS-Replication or MS-CDC to enable CDC solution

 ConfigurationDML DurationDatafile (Allocated MB)Datafile (Free MB)Tlog (Allocated MB)Tlog Size (Free MB)No...

View Article

Install Oracle 23c free using docker in Amazon Linux 2023

 Install docker package and enable it[ec2-user@ip-10-1-1-152 ~]$ cat /etc/amazon-linux-release Amazon Linux release 2023 (Amazon Linux) sudo yum install docker -y sudo systemctl enable docker sudo...

View Article


Oracle 23c new feature: SQL Property Graphs

 Demo Environment$ sql hr/hr@192.168.0.200/FREEPDB1 SQLcl: Release 23.2 Production on Sat Oct 07 20:20:22 2023 Copyright (c) 1982, 2023, Oracle. All rights reserved. Connected to: Oracle Database 23c...

View Article


Oracle 23c new feature: default running background processes

 selectdistinct name,description,json_value(attributes,'$.instance_critical' returning varchar) critical, json_value(attributes,'$.restartable' returning varchar) restartable,...

View Article

PostgreSQL Large Object with Examples

 Create table with large object supportTable is optional. Even there is no table created, large object can still be created via these lo_ functions.createtable t (id intprimary key, loc oid); Populate...

View Article

Behavior in PostgreSQL after "kill -9" on backend server process

 In PostgreSQL, server (backend) process exits abnormally could cause PostgreSQL restart, and impacts all existing connections, not just the database client served by the server process.Check the...

View Article

How to keep PostgreSQL sequences' value in sync via script/automation

 Sample scripts to demonstrate how to generate DDLs to keep sequences in sync between 2 PostgreSQL databases.One assumption is made that both database contains same sequence definitions, and the only...

View Article


"ERROR: duplicate key value violates unique constraint" in PostgreSQL but not...

In both Oracle and SQL Server, these non-deferrable constraints are evaluated at the statement completion, and it does allow intermediate state which could break constraint rules as long as final state...

View Article

Install PostgreSQL Server or Client on MacOS for testing purpose

The default PostgreSQL installation for MacOS is via installer packaged by EDB, provides more features and easier for beginners. Personally I prefer to have PostgreSQL installed in specified folders,...

View Article


Performance validation for UUIDv7 implemented using SQL in PostgreSQL v16

Source code for UUIDv7 for PostgreSQL: https://gist.github.com/fabiolimace/515a0440e3e40efeb234e12644a6a346createor replace function uuid7() returns uuid as $$ declarebeginreturn...

View Article

UUIDv7 in PostgreSQL 18 (Still in dev phase as time of this post)

 Check these uuid functions are available mytest=# select version(); version ---------------------------------------------------------------------------------------------------------------------...

View Article


Understanding Index Behavior in PostgreSQL Partitioned Tables

PostgreSQL's partitioning feature becomes more powerful with each release, and understanding how indexes work with partitioned tables is crucial for optimal performance. Let's explore some interesting...

View Article

Optimize PostgreSQL Query with pg_hint_plan

 Query optimization in PostgreSQL can sometimes benefit from manual intervention. The pg_hint_plan extension provides developers with the ability to influence the query planner's decisions. Let's...

View Article

How to fix Yum/DNF issue in CentOS 8

 Symptom:[root@~]# yum update -yCentOS Stream 8 - AppStream                                                             0.0  B/s |   0  B     00:00Errors during downloading metadata for repository...

View Article

Safely drop temporary table without dropping regular table with same name

 In PostgreSQL, it allows to create temporary table with same name as existing regular table, in such case, temporary table has higher "visibility" than regular table.Once you drop the temporary table,...

View Article


Compare different PostgreSQL index types for text column

Prepare test case data-- Create the tableCREATETABLE website_data ( table_storage_id BIGINT, uri TEXT, page_viewer_counter INTEGER ); -- Function to generate a random number within a given...

View Article


Tips to minimize table lock for DDL on large tables for PostgreSQL

Here are some tips to minimize table lock for DDL on large tables:NOT VALID for FOREIGN KEY/CHECK CONSTRAINTCREATE INDEX CONCURRENTLYUNIQUE/PRIMARY KEY CONSTRAINT using pre-created...

View Article

Installing Oracle Database 23ai on Amazon Linux 2023

 This guide provides steps to install Oracle Database 23ai on Amazon Linux 2023 by resolving dependency issues with the Oracle preinstall package. The steps documented here are purely for testing...

View Article

Observation about PostgreSQL's Index Only Scan behavior

 Test Casemytest=# \dt pgbench_accounts; List of relations Schema | Name | Type | Owner --------+------------------+-------+---------- public | pgbench_accounts |table| donghual (1row)mytest=#...

View Article

Browsing latest articles
Browse All 604 View Live