Questions tagged [multi-database-connections]

14 questions
8
votes
2 answers

how to run native query by joining 2 tables from different database in Spring data jpa?

I am using Spring boot 1.5.18.RELEASE. I have followed multiple data sources using following link: but its working when I have data sources in same server. Here is my case: datasource1 at one server: server1 datasource2 at another server: server2…
Krish
  • 1,804
  • 7
  • 37
  • 65
5
votes
3 answers

Dynamically change data source connection at runtime in Spring Boot

I have a spring-boot application with one database. Now I would like to integrate the possibility to copy some data from this database to another database. The connection to the second database should be done during runtime. I insert in my frontend…
Mah
  • 93
  • 1
  • 9
4
votes
0 answers

Rails - active storage and multi databases

Is is possible to use active storage with multi databases in rails? I have the following models: class ApplicationRecord < ActiveRecord::Base self.abstract_class = true end class OtherRecord < ActiveRecord::Base self.abstract_class = true …
2
votes
1 answer

Laravel Project Multi-tenant, Multi-database and one domain

Hello can you please help me to put project laravel Multi-tenant with Multi-database : I want to create user database, for example in my system there are two user A and B. I have a master Database and two database user_a (for user A) and user_b (for…
1
vote
0 answers

Connecting dynamically to Cassandra using Spring Data Cassandra

I need to connect dynamically to new Cassandra clusters without restarting the application. I'm using Spring Data Cassandra. The following code does this, but since it's not done via beans and the IoC, it does not use the ExceptionTranslator…
1
vote
0 answers

After migrating to rails version 6.1.. i am getting PG::InsufficientPrivilege: ERROR: permission denied for relation user on production env

Prior to this migration, I used Makara gem to split DB connections for writing and reading as follows: production: <<: *default url: postgresql-makara:/// makara: sticky: true connections: - role: master name: primary …
1
vote
0 answers

Python Flask MySQL: How to persistently store connection pool object?

After a long search, I could not find an answer to my question and if what I desire is even possible. My question concerns a MySQL connection implementation for a Flask API. What I desire to implement is as follows: When the Flask app is started, a…
Björn
  • 338
  • 1
  • 13
0
votes
0 answers

Laravel multi db tenancy with login using main users table

I want to do multi db multi tenancy for a saas type shop app so that users is in main db, and users login using this table, and all shops have different db and users_table have shops db id, and all the shops regarded model uses tenant connection. I…
0
votes
1 answer

How does Connection.prototype.useDb() method in mongoose works under the hood?

I am trying to understand the Connection.prototype.useDb() method better. I would appreciate it if someone could help me. 1. The mongoose document for useDb() states: Switches to a different database using the same connection pool. Does this mean…
0
votes
0 answers

why Spring JPA2.3.1 and hibernate5.1.2 GenerationType.IDENTITY with spring.jpa.hibernate.use-new-id-generator-mappings= false using hibernate_sequence

why Spring JPA2.3.1 and hibernate 5.1.2 GenerationType.IDENTITY with spring.jpa.hibernate.use-new-id-generator-mappings= false configuration is using hibernate_sequence table for id generation ideally it should use MS SQL sever primary key auto…
0
votes
1 answer

Python - Unable to connect to 2 different databases like hive and iris in same python program

I am trying to connect to hive database and IRIS Intersystems Databases using jaydebeapi in python. I am able to connect to one database at a time. While trying to connect to other database, I am getting the below error "Class…
0
votes
0 answers

Rails sql includes table from another base and add where condition on it?

I have a specific database (called account_base) for my account : class Account < ActiveRecord::Base establish_connection :account_base ... end I have user from app rails database : class User < ActiveRecord::Base belongs_to…
Matrix
  • 3,458
  • 6
  • 40
  • 76
0
votes
1 answer

Save using multiple databases

I am using multiple databases DATABASES = { 'default': { # for local postgre databases 'ENGINE': 'django.db.backends.postgresql', 'NAME': '2003', 'USER' : 'postgres', 'PASSWORD' : '3211', 'HOST' :…
0
votes
1 answer

Connect to many databases in different servers

Maybe somebody else asked this question before, but I've not found it yet. My problem it's simple, I want to validate connection with lot of databases. I created a process in Java (I'm using Spring) that create datasources connection with some datas…