Author |
Message
|
jeasterl |
Posted: Fri May 21, 2004 3:27 am Post subject: Changing the DB2 Schema Name in WBIMB? |
|
|
 Acolyte
Joined: 24 Jun 2001 Posts: 65
|
Is there a way to get around hard coding the DB2 schema names in our ESQL so we don't have to change the code each time we move to a different environment? |
|
Back to top |
|
 |
waugh |
Posted: Fri May 21, 2004 4:59 am Post subject: |
|
|
 Master
Joined: 19 Feb 2004 Posts: 225
|
this is just shot in the dark.
but, you can try running broker under one single user in all environments and have your ODBC under that user. create tables under that user or give him full permissions on that table. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri May 21, 2004 5:08 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
At a minimu, you should be able to define something like
Code: |
set Environment.Variables.Deployment.DB2SchemaName = 'MySchema'; |
in a compute node at the front of your message flow.
And then change your database statements to something like
Code: |
Select T.* from Database.{Envrionment.Variables.Deployment.DB2SchamaName}.Tablename as T; |
Then you can change the code in one place only. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jeasterl |
Posted: Fri May 21, 2004 5:13 am Post subject: |
|
|
 Acolyte
Joined: 24 Jun 2001 Posts: 65
|
Using the variable at the beginnig of the code seems like an excellent idea! I am going to attempt that and let you know the results!
Thanks! |
|
Back to top |
|
 |
jeasterl |
Posted: Wed May 26, 2004 2:32 pm Post subject: |
|
|
 Acolyte
Joined: 24 Jun 2001 Posts: 65
|
When I attempted to run the sample code that you posted, the message flow would not deploy to the Execution Group. This is the error that was written to the Event Viewer:
Code: |
(.Message_Flow_Compute.CopyEntireMessage, 8.24) : Syntax error : '{'. |
It seems like the'{[ cannot be used. Is there an alternative that can be used? |
|
Back to top |
|
 |
EddieA |
Posted: Wed May 26, 2004 2:52 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
The {...} synatax was introduced, if I remember correctly, in CSD03 for V2.1.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
|