Giter VIP home page Giter VIP logo

oracle / db-sharding Goto Github PK

View Code? Open in Web Editor NEW
34.0 7.0 20.0 6.85 MB

Oracle Sharded database deployment automation and tools for use in client applications.

License: Universal Permissive License v1.0

CMake 0.07% C++ 2.19% Java 14.76% JavaScript 2.02% HTML 0.05% Dockerfile 0.72% HCL 26.32% Shell 17.13% CodeQL 0.28% Smarty 0.13% Python 36.23% Mustache 0.12%
oracle-database oracle-sharding middleware chunk shards scale-out cross-shard-queries fault-isolation mid-tier-routing terraform-modules

db-sharding's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

db-sharding's Issues

Password file decrypting fails with newer openssl client

In the files

  • oragsm.py
  • orapcatalog.py
  • orapshard.py
  • setupOshardEnv.sh

please add the option -md sha256 to every command like
openssl enc -d -aes-256-cbc -in <inputfile> -out <outputfile> -pass file:<keyfile>

otherwise with newer openssl versions we face the error
11/22/2022 09:19:23 PM ERROR: oracommon.py - check_os_err :OS command returned code : 1, returned error : bad decrypt 139884830422928:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:evp_enc.c:618: and returned output : no retruned output

also there is a typo in the last line

Password decrypt fails with "EVP_DecryptFinal_ex:bad decrypt" if password was generated on a newer openssl version than the one used in the base image (OL 7)

Hi Everyone,

If you use newer openssl version on the host OS where you are building the image, the decrypt will and the sharding setup will not complete.

Example:

My Host OS

[ec2-user@oracle-sharding ~]$ openssl version
OpenSSL 3.0.8 7 Feb 2023 (Library: OpenSSL 3.0.8 7 Feb 2023)

openssl enc -aes-256-cbc -salt -in /opt/.secrets/common_os_pwdfile -out /opt/.secrets/common_os_pwdfile.enc -pass file:/opt/.secrets/pwd.key

Inside the container

bash-4.2$ openssl version
OpenSSL 1.0.2k-fips 26 Jan 2017

bash-4.2$ openssl enc -d -aes-256-cbc -in "/run/secrets/common_os_pwdfile.enc" -out /tmp/common_os_pwdfile.enc -pass file:"/run/secrets/pwd.key"
bad decrypt
140257544615824:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:evp_enc.c:618:

The solution is of course straightforward, like spinning one time alpine container with openssl version 1.0.2 with one temporary volume mount, generate the password command inside this container and copy the password to the shared location /opt/.secrets

Best regards,
Lazar

ORA-03896: Unable to load the sharding wallet successfully.

Hi Everyone,

I've successfully deployed Oracle 21c Sharded Database using standalone Docker Containers. Everything works fine the first time and while the environment is not rebooted. The moment when I restart some of the containers or the complete VM, I am unable to perform any sharded ddl, because the wallet location somehow gets lots.

SQL> insert into my_table values (1,'test');
*
ERROR at line 1:
ORA-03896: Unable to load the sharding wallet successfully.
ORA-06512: at "SYS.DBMS_SESSION", line 155
ORA-06512: at "GSMADMIN_INTERNAL.DBMS_GSM_POOLADMIN", line 25013
ORA-03896: Unable to load the sharding wallet successfully.
ORA-06512: at "SYS.DBMS_SESSION", line 141
ORA-06512: at "GSMADMIN_INTERNAL.DBMS_GSM_POOLADMIN", line 24910
ORA-06512: at "GSMADMIN_INTERNAL.DBMS_GSM_POOLADMIN", line 25031
ORA-06512: at line 1

Below is the information about the wallet's location on the CATALOG, SHARD1 and SHARD2 containers.

CATALOG

#####################################################################################
SQL> select value from v$parameter where name='wallet_root';

VALUE

/opt/oracle/product/21c/dbhome_1/admin

SQL> select guid from v$pdbs where con_id = sys_context('userenv','con_id');

GUID

020CCE4FEE460AD6E0636614000A9A39

bash-4.2$ pwd
/opt/oracle/admin/CATCDB/xdb_wallet
bash-4.2$ ls -ltr
total 8
-rw-------. 1 oracle oinstall 3835 Aug 4 15:11 ewallet.p12
-rw-------. 1 oracle oinstall 3880 Aug 4 15:11 cwallet.sso

SQL> select value from v$parameter where name='wallet_root';

SHARD1

#####################################################################################

SQL> select value from v$parameter where name='wallet_root';

VALUE

/opt/oracle/oradata/dbconfig/ORCL1CDB/admin

SQL> alter session set container=ORCL1PDB;

SQL> select guid from v$pdbs where con_id = sys_context('userenv','con_id');

GUID

020CEA753FD90AEEE0636714000AF57F

bash-4.2$ pwd
/opt/oracle/oradata/dbconfig/ORCL1CDB/admin/020CEA753FD90AEEE0636714000AF57F/shard

bash-4.2$ ls -ltr
total 4
-rw-------. 1 oracle oinstall 2877 Aug 4 15:27 cwallet.sso

bash-4.2$ pwd
/opt/oracle/oradata/dbconfig/ORCL1CDB/admin/shard

bash-4.2$ ls -ltr
total 4
-rw-------. 1 oracle oinstall 2661 Aug 3 22:01 cwallet.sso

SHARD2

#####################################################################################

SQL> select value from v$parameter where name='wallet_root';

VALUE

/opt/oracle/oradata/dbconfig/ORCL2CDB/admin

SQL> alter session set container=ORCL2PDB;

SQL> select guid from v$pdbs where con_id = sys_context('userenv','con_id');

GUID

020D07702D360AF0E0636814000A24E5

bash-4.2$ pwd
/opt/oracle/oradata/dbconfig/ORCL2CDB/admin/020D07702D360AF0E0636814000A24E5/shard

bash-4.2$ ls -ltr
total 4
-rw-------. 1 oracle oinstall 2877 Aug 4 15:27 cwallet.sso

bash-4.2$ pwd
/opt/oracle/oradata/dbconfig/ORCL2CDB/admin/shard

bash-4.2$ ls -ltr
total 4
-rw-------. 1 oracle oinstall 2661 Aug 3 22:09 cwallet.sso

Can you please take a look into this?

Thank you,
Lazar

Oracle Sharded Database Disaster Recovery across data centre in Kubernetes

Hello,

Is it possible to implement replication of Oracle Sharded Database in Kubernetes for cluster to cluster replication of Oracle Databases on Kubernetes

Scenario:

If we have a Sharded Database in Cluster-1 in Data Centre 1 and if we have to set up a Disaster Recovery of the Sharded Database in Cluster-2 in Data Centre 2 and then replicate the Shards in Data Centre1 using Oracle Data Guard or Oracle Active DataGuard.

All the shards in PR will be replicated to DR. At present we plan to have 1 shard per microservice and all these shards will be replicated to DR. All writes will go to one data centre only. All shards will have 2 replica in PR and a mirror replica in DR . If shard 1 fails in PR, it will failover to replica of the shard in the same data centre. When we switchover to DR we shall work on the Shard Replica in DR. So there will be 3 copies of the data at any point of time (2 in PR and one in DR)

Please inform us if the same is possible using Kubernetes. Please provide the YAML. In case it is not possible , please inform what approaches of switchover from PR to DR are possible in Shard Database for Kubernetes.

Whenever we switch over to DR, the applications in Data Centre 2 will access the DataCentre 2 DB which would have all the data as it is being synced by Oracle DataGuard.

Building Oracle Database 21c Sharding extensions image fails

Hi Everyone,

While building the docker image for the Oracle Database 21c Sharding extensions, the build fails at the Dockerfile line "su oracle -c "$INSTALL_DIR/install/$INSTALL_GSM_BINARIES_FILE" && "

It works if you add these to lines in the setupLinuxEnv.sh script:

docker-based-sharding-deployment/dockerfiles/21.3.0/setupLinuxEnv.sh

sed -i 's/^#oracle hard memlock/# #oracle hard memlock/' /etc/security/limits.d/oracle-database-preinstall-21c.conf
sed -i 's/^session\sinclude\ssystem-auth/# session include system-auth/' /etc/pam.d/su

Best regards,
Lazar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.