Home
Analytics
More than one Schema name in JDBC connection URL
murarkaankit
We are using BIRT plugin shipped with Eclipse Indigo.
Needless to say it is both easy to use and explore.
However I have a doubt:-
While creating a DataSource I have to specify the schema name also.
My DB has multiple schemas and in order to generate reports I need to use multiple schema in single SQL query (Using JDBC).
But I found that DataSource link only takes one schema in the connection URL.
I tried creating a joint data set but I failed to get desired output results as joint data set only offers limited functionality such as performing joins between two data set.
Is there anyway I can specify two schema in the connection URL of the datasource.
Find more posts tagged with
Comments
Hans_vd
What do you mean?
Do you mean you have to enter a User Name? That's normal, when you want access to a database, you need to be logged in to it.
You should be able to log on to the database with a user that has rights to read the tables that are in the various schema's.
Regards
Hans
murarkaankit
<blockquote class='ipsBlockquote' data-author="'Hans_vd'" data-cid="98448" data-time="1333356984" data-date="02 April 2012 - 01:56 AM"><p>
What do you mean? <br />
Do you mean you have to enter a User Name? That's normal, when you want access to a database, you need to be logged in to it.<br />
<br />
You should be able to log on to the database with a user that has rights to read the tables that are in the various schema's.<br />
<br />
Regards<br />
Hans<br /></p></blockquote>
<br />
No, Obviously i need to provide username and password for all the jdbc connections.However my question is when creating a new datasource I need to specify a connection URL with schema name present inside it.<br />
However I can only write one schema name for a single datasource.If i mention two schema name in the URL the schema does not display any tables for both the schema name mentioned.<br />
<br />
So how can I specify two schema name in the connection URL so that when I create a data set I can see tables from both the schema inside a single datasource.
Hans_vd
What database are you on?
murarkaankit
<blockquote class='ipsBlockquote' data-author="'Hans_vd'" data-cid="98454" data-time="1333359878" data-date="02 April 2012 - 02:44 AM"><p>
What database are you on?<br /></p></blockquote>
<br />
<br />
We are using MySQL database and mysql connector jar(5.1.13) to connect to MySQL.
Hans_vd
I'm not sure about MySQL, but isn't the url supposed to look like this: jdbc:mysql://hostname:port/database_name
So without any schema name?
Does your url look different?
murarkaankit
<blockquote class='ipsBlockquote' data-author="'Hans_vd'" data-cid="98486" data-time="1333395547" data-date="02 April 2012 - 12:39 PM"><p>
I'm not sure about MySQL, but isn't the url supposed to look like this: jdbc:mysql://hostname:port/database_name<br />
<br />
So without any schema name?<br />
<br />
Does your url look different?<br /></p></blockquote>
<br />
<br />
The URL which we use to connect to your DB from the application looks like:-<br />
jdbc:mysql://IP:Port/schema_name<br />
<br />
On the specified ip and port there are multiple schema and I need to connect to multiple schema at a time.<br />
Also, my query links to multiple schemas at a time.<br />
something like this:-<br />
<br />
select a.something,b.something from schemaname a,schemname b
Hans_vd
I think we are using different words for the same things.
Is schema name the name of your database?
And do you have different schemas in your database?
Or do you want to write a select statement that selects from tables that are in different databases?