Author |
Message
|
naio |
Posted: Mon Jan 21, 2013 7:50 am Post subject: Change DB SCHEMA in WMB 7.0 |
|
|
Voyager
Joined: 08 Nov 2012 Posts: 82
|
In the proyect that I am working, they are specifing the DB in the Compute Node (in the field "Data Source" the DataBase name is typed),
I know that the only parameter that is configured in the Flows is this, and that is ok and the Way that I have used it in the past.
The Client want now to change the SCHEMA of the Data Base for diferent environments without modifing the flows.
The field "Data Source" can be change from the BAR file directly, but where is the shema stored?
The want to specify the schema in this way:
jdbc:db2://{host}:{port}/{database}:currentSchema={schema};
I search in the jdbc.ini file, but no reference to the schema is found, and the don´t want to make changes in the ESQL.
Is there a way to modify the DB Schema from outside of the flows?
Thanks in Advace. _________________ "God is in his heaven all's right with the world" |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jan 21, 2013 7:58 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You can't use a JDBC URL to specify an ODBC connection.
A compute node only uses an ODBC connection.
A given ODBC connection is assigned a specific userid and password.
That specific userid and password can have a default schema.The same userID and password can have different default schemas on different physical database instances.
More than one ODBC connection can be created to a given database.
You can define a User Defined Property that holds a string. This can be adjusted on the BAR file.
You can use this User Defined Property as part of the SCHEMA clause of any Compute node Database reference you code. |
|
Back to top |
|
 |
naio |
Posted: Mon Jan 21, 2013 9:02 am Post subject: |
|
|
Voyager
Joined: 08 Nov 2012 Posts: 82
|
Ok,
So mqjeff I will ask you another question.
In the Compute node, we have TESTDB for instance.
This Alias correspond to an entry (stanza) in the odbj.ini file, in this entry we have set:
DRIVER, DESCRIPTION and DATABASE.
Then with the command "mqsisetdbparms " the Alias is attached with the entry(stanza).
Can I set the SCHEMA (I think that everithing is working because that User have only one default Schema) in the odbc.ini or other place outside the Flows?
If they want to change the SCHEMA, how will they do it?
Other thing would be that a single user can have access to more than one schema, how will it be handled?
Very Thanks in Advance! _________________ "God is in his heaven all's right with the world" |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jan 21, 2013 9:09 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The default schema is determined by the user, and is set at the database.
Again, the schema is also part of any ESQL code that is written, by the choice of the developer. |
|
Back to top |
|
 |
naio |
Posted: Mon Jan 21, 2013 9:46 am Post subject: |
|
|
Voyager
Joined: 08 Nov 2012 Posts: 82
|
Ok,
Nowadays no Shema is being set in the ESQL, the functions of the DB are call directly:
SET processId = getSecuencial('processId');
So I imagine that the user has access to only one Schema, if more schemas get into the game, ESQL identification will be necesary.
Am I understanding ok?
Thanks Again!
Ignacio _________________ "God is in his heaven all's right with the world" |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jan 21, 2013 9:49 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
mgk |
Posted: Mon Jan 21, 2013 11:06 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
|
Back to top |
|
 |
naio |
Posted: Mon Jan 21, 2013 12:41 pm Post subject: |
|
|
Voyager
Joined: 08 Nov 2012 Posts: 82
|
Ok,
Thanks to both of you! _________________ "God is in his heaven all's right with the world" |
|
Back to top |
|
 |
|