doujiao1984 2015-11-09 06:53
浏览 232
已采纳

Yii2上使用Gii Generator的数据库异常

First of all, my details(I try to include as much as I can):

PHP 5.6.14

Oracle DB11G Enterprise Edition 11.2.0.1.0(Installed locally, default localhost setup)

Windows 7 64-Bit

Oci8-2.0.8-5.6-ts-vc11-x86

Yii 2.0.6

I am trying to use the gii module to generate some models for testing purpose(as I am fairly new to this framework). I have imported all the tables/data from my organization's database, and have create related tablespaces and users. So my generator have these autocompleted when i typed partial keywords.

enter image description here

Then when I clicked on preview button, i get this error below

enter image description here

I believe the SYSTEM/SYSAUX are generated automatically when installing the oracle db. Plus, the autocomplete tables that appeared when I try to insert the table name is correct and same as the tables i have inside our schema. I tried changing the password/creds to be wrong as I cant access the gii page at all(so i believe the connection to my db setup is fine).

Can anyone help me. is it a known issue or i am doing something wrong? because as far as I understand, the error shown means that the generator is looking at a different place upon clicking the "preview" button.

Thank you.

**

UPDATE: New error

**

I gave the current user the role of DBA and now it's getting somewhere but I do not understand the cause/errors.

enter image description here

  • 写回答

3条回答 默认 最新

  • doudi8231 2015-11-09 08:12
    关注

    ORA-00942: table or view does not exist

    Looking at the failing SQL, it seems the user which is executing the query doesn't have the DBA privilege to access dba_users and dba_objects. You need to GRANT the required privilege to this user.

    GRANT DBA to new_user;
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题