oracle / db-sharding Goto Github PK
View Code? Open in Web Editor NEWOracle Sharded database deployment automation and tools for use in client applications.
License: Universal Permissive License v1.0
Oracle Sharded database deployment automation and tools for use in client applications.
License: Universal Permissive License v1.0
In the files
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
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:
[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
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
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.
#####################################################################################
SQL> select value from v$parameter where name='wallet_root';
/opt/oracle/product/21c/dbhome_1/admin
SQL> select guid from v$pdbs where con_id = sys_context('userenv','con_id');
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';
#####################################################################################
SQL> select value from v$parameter where name='wallet_root';
/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');
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
#####################################################################################
SQL> select value from v$parameter where name='wallet_root';
/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');
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
db-sharding/docker-based-sharding-deployment/dockerfiles/21.3.0/scripts/oragsm.py:335
the parameter "-md sha256" must be added in order to prevent the error "EVP_DecryptFInal_ex: bad decrypt"
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.
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
Dear Sir
For benefit of of all oracle users can oracle create a video of deploying shard database on kubernetes connected to PV and a demo on how to connect from Sql developer.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.