I'm currently working on a project connecting prestoDB to our DBtool to extract and load different types of data from different sources(json index from elasticsearch, json record from kafka etc).
it works on a DBeaver with a jdbc, however, our DBtool does not allow the connection without a username and password.
Is there any way to create an user and password in prestoDB that we could use like Oracle or MariaDB account connection
Related
If Oracle dblink is set, can the configured external DB also access my DB?
Is there a way to check which external db is allowed to dblink to my DB?
DB Links are one way: one DB (with the link) is the client and the other DB is the server in the relationship, and the server cannot reach back to the client for data or any other information not normally available from any client (basic connection info is made available by the client through the Oracle Client software API).
There is no server-side privilege that specifies whether a client connection may or may not be from a DB Link or any other specific source: any valid database server account can be used as a link target, just like connecting from any other client. There is a client-side privilege CREATE DATABASE LINK that determines whether the link object can be created on the client side.
I downloaded schemes from this website (https://github.com/oracle-samples/db-sample-schemas/releases/tag/v21.1)
but I don't know how to work on them in the DataGrip, that is, how to connect and which user data to use for connecting to the Oracle data source (Host, SID, Port, user, password etc)
Thanks in advance!
Schemas are the content.
And you need a place where to place this content.
So, create a database server first. You can do that via Docker or in the cloud.
Here is the Dockerfile you can use to create a docker container with the oracle database running:
https://github.com/DataGrip/docker-env-oracle/blob/master/12.2.0.1/Dockerfile
During installation, you will set the username, password, port etc
I currently have a connection for MySQL database and connected as:
spring.datasource.url = jdbc:mysql://${mysql.service.host}:${mysql.service.port}/${mysql.service.database}
If I were to change the database and used Oracle database instead then how would the datasource URL change?
jdbc:oracle:thin:#//server:port/service
or
jdbc:oracle:thin:#//server:port:SID
The server entry would be the IP address or network name where your Oracle Listener is handling connection requests. The port would be the port number being used for said listener requests.
Service would be the database service name, if you're connecting to an Oracle Pluggable Database, you'll always need this.
The SID is a unique ID for your database, you could use that, but you're encouraged to use the service instead.
If you wish to make a THICK connection, that is, use an Oracle Client to make a connection to your database, then things get a bit more complicated. I would suggest using THIN until you can't.
Requirements -
My Application have multiple clients having their own database servers and database name, but all databases have same structure( as in tables and Keys ) .
I want a plug-in service, where when client login and register its connection string in our local database. Our application fetch the connection String from the database to that particular client and connect to the database and fetch the data from it.
Tried AbstractRoutingDataSource, but it itself needs connection String to be stored before.
Toad/Oracle has a mechanism where it can use LDAP to lookup a list of database endpoints. It uses a file called ldap.ora which looks like:
DIRECTORY_SERVERS= (server1.foo.bar.baz:1628:1629, server2.foo.bar.baz:1628:1629)
DEFAULT_ADMIN_CONTEXT = "dc=foo,dc=bar,dc=baz"
DIRECTORY_SERVER_TYPE = OID
I'd like to somehow invoke the LDAP lookup and export the list of database endpoints (including server, port, etc.) so that I can connect via JDBC/SQuirreL.
Is there a way that I can generate the list of database endpoints given the LDAP servers?
Or better yet is there some oracle / SQuirreL integration that does the LDAP lookup?
* Update *
I originally thought I needed the server/port for each database server to formulate a JDBC url. I have now found that I can connect to a database through the ldap directory server using a connection url like:
jdbc:oracle:thin:#ldap://server1.foo.bar.baz:1628/XXXX,cn=OracleContext,dc=foo,dc=bar,dc=baz
Where XXXX is the SID of a database. So, it now seems that all I need is a list of SID's. I'm hoping that I can do this in sqlplus.
Well, you can query LDAP for the data. (Do not know how SQuirreL can do this unless you modify the code).
You need to query your LDAP for (objectclass=orclDBServer) and the data you are looking for is in the attribute orclnetdescstring and will look some thing like:
orclnetdescstring: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ordb0001.yourdomain.com)(PORT=1523))(CONNECT_DATA=(SERVICE_NAME=db.iss.com)))
-jim