Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cann't load multiple schema from oracle database in the readwrite-splitting scenario #33921

Open
wuwenyao opened this issue Dec 5, 2024 · 0 comments

Comments

@wuwenyao
Copy link

wuwenyao commented Dec 5, 2024

Bug Report

For English only, other languages will not accept.

Before report a bug, make sure you have:

Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Which version of ShardingSphere did you use?

5.51

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-JDBC

Expected behavior

load multiple schema from oracle database in the readwrite-splitting scenario

Actual behavior

only load one schema(same as databaseName)

Reason analyze (If you can)

Single Table only load the schema same as databaseName from oracle database.

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

I tried every way I found from the single table document , but every time the second schema don't load in the ShardingSphereDatabase. Is It my config error or a limitation on oracle ?

Example codes for reproduce this issue (such as a github link).

databaseName: schema1
mode:
  type: Standalone
  repository:
    type: JDBC
dataSources:
  master:
    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
    jdbcUrl: jdbc:oracle:thin:@xx.xx.xx.xx:1521:xxxxxx
    username: schema1
    password: 
    driverClassName: oracle.jdbc.OracleDriver
    maximumPoolSize: 50
  slaver:
    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
    jdbcUrl: jdbc:oracle:thin:@xx.xx.xx.xx:1521/xxxxx
    username: schema1
    password: 
    driverClassName: oracle.jdbc.OracleDriver
    maximumPoolSize: 50
rules:
  - !READWRITE_SPLITTING
    dataSourceGroups:
      readwrite_ds:
        writeDataSourceName: master
        readDataSourceNames:
          - slaver
        transactionalReadQueryStrategy: PRIMARY
        loadBalancerName: random
    loadBalancers:
      random:
        type: RANDOM
  - !SINGLE
    tables:
      - "readwrite_ds.*"
#     - "readwrite_ds.schema1.*"
#     - "readwrite_ds.schema2.*"
#     - "readwrite_ds.*.*"
props:
  sql-show: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant