This is a migrated thread and some comments may be shown as answers.

Oracle change Schema to a different User

1 Answer 85 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Keith Maddocks
Top achievements
Rank 1
Keith Maddocks asked on 15 Jan 2010, 12:34 PM
Hello,

I am trying to generate a reverse mapping from an existing database. The user account I have is not the owener of the tables I want to map to. Normally I'd just change my schema so I can access the needed tables, however, the ORM wizard does not show me any tables. Is there a way to accomplish this?

In SQL I could invoke "ALTER SESSION SET CURRENT_SCHEMA="scott"; ". Can I acheive this with the ORM?

Thanks,
Keith

1 Answer, 1 is accepted

Sort by
0
Jan Blessenohl
Telerik team
answered on 15 Jan 2010, 01:00 PM
Hello Keith Maddocks,
You can specify an init sql statement that we execute as first statement on each connection that we open. You can specify it in the backend configuration dilaog or put this inside your backend configuration node:
<backendconfiguration id="oracleConfiguration" backend="oracle">
  <mappingname>oracleMapping</mappingname>
  <initSql>ALTER SESSION SET CURRENT_SCHEMA="scott";</initSql>
</backendconfiguration>

All the best,
Jan Blessenohl
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Getting Started
Asked by
Keith Maddocks
Top achievements
Rank 1
Answers by
Jan Blessenohl
Telerik team
Share this question
or