Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Connecting to Multiple Schemas

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a task to update records in multiple tables on multiple database.

Ex)

I need to update

1)Employee table in ASM database
2)Manager Table in ACD database.

My doubt is for each database i need to create seperate connection or is it possible to use same connection for multiple databases?
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, are these schemas stored in the same database?
If yes, then it is possible for most databases to create a database user that can access both schemas.

In that case, you can do with one connection. You will gave to put the schema name in front of the table name to make it work.

Example:

insert into ASM.Employee (....
insert into ACD.Manager (....


(note that you are confusing us a bit in your post: the title says: 'multiple schemas', the detail says 'multiple databases'.)
 
pownraj kasi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply.

sorry.It is multiple schemas from same database.

but i don't have the permission to create an user for acessing both schemas.

in this case it is possible to use same connection?.

Thanks in advance
Pownraj
reply
    Bookmark Topic Watch Topic
  • New Topic