[英]Change Oracle DB Workspace in datasource Connection JBOSS
Here is the thing... I have the following datasource: 这是东西...我有以下数据源:
<datasource jndi-name="java:/GPET_JU1@des12gpe1" pool-name="GPET_JU1@des12gpe1" enabled="true" use-java-context="true">
<connection-url>jdbc:oracle:thin:@//bla:9999/blablabla</connection-url>
<driver>oracle</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<security>
<user-name>blablabla</user-name>
<password>blablabla</password>
</security>
<pool>
<min-pool-size>10</min-pool-size>
<max-pool-size>100</max-pool-size>
<prefill>true</prefill>
<allow-multiple-users></allow-multiple-users>
</pool>
<validation>
<exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"></exception-sorter>
</validation>
<timeout>
<idle-timeout-minutes>10</idle-timeout-minutes>
</timeout>
<statement>
<prepared-statement-cache-size>0</prepared-statement-cache-size>
<share-prepared-statements>false</share-prepared-statements>
</statement>
**<new-connection-sql>
Begin execute immediate 'CALL DBMS_WM.GotoWorkspace ("APP_TESTE_01")'; end;
</new-connection-sql>**
</datasource>
I need to change the workspace from "LIVE" to "X", everytime this datasource is called to create a connection in database. 每次调用此数据源在数据库中创建连接时,我都需要将工作空间从“ LIVE”更改为“ X”。 I'm getting:
我越来越:
Caused by: java.sql.SQLException: ORA-06576: not a function or valid method
If I perform a select instead of trying to change the workspace, I dont get error but obviously it doesn't change the workspace like I wanted. 如果我执行选择而不是尝试更改工作空间,则不会收到错误消息,但显然不会像我想要的那样更改工作空间。
Any ideas in how I can manage to change the oracle db workspace using the datasource? 关于如何使用数据源设法更改oracle db工作区的任何想法?
Got success by the following: 通过以下方式获得了成功:
<new-connection-sql>
Begin DBMS_WM.GotoWorkspace ('APP_TESTE_01'); end;
</new-connection-sql>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.