新建一个用户:sysjyptdba
新建表空间:sysjypt新建表:XTZT在pl/sql中 可以查询到表 select * from xtzt;但是在程序和sqlplus中都显示表或视图不存在

解决方案 »

  1.   

    是不是没有执行的权限的原因呀!
    赋予执行的权限了:grant select on xtzt to sysjptdba;
      

  2.   

    -- Grant/Revoke role privileges 
    grant connect to lbidw_axb;
    grant dba to lbidw_axb;
    grant resource to lbidw_axb;-- Grant/Revoke system privileges 
    grant alter any index to lbidw_axb;
    grant alter any sequence to lbidw_axb;
    grant alter any table to lbidw_axb;
    grant alter any procedure to lbidw_axb;
    grant alter tablespace to lbidw_axb;
    grant create any context to lbidw_axb;
    grant create any index to lbidw_axb;
    grant create any library to lbidw_axb;
    grant create any procedure to lbidw_axb;
    grant create any table to lbidw_axb;
    grant create any type to lbidw_axb;
    grant create any view to lbidw_axb;
    grant create procedure to lbidw_axb;
    grant create public database link to lbidw_axb;
    grant drop any index to lbidw_axb;
    grant drop any library to lbidw_axb;
    grant drop public database link to lbidw_axb;
    grant execute any operator to lbidw_axb;
    grant execute any procedure to lbidw_axb;
    grant insert any table to lbidw_axb;
    grant select any table to lbidw_axb;
    grant unlimited tablespace to lbidw_axb;
    授权吧
      

  3.   

    grant select on xtzt to sysjyptdba;
    ----------------------------------提示表或视图不存在,我在plsql中看见XTZT表已经在 sysjyptdba 的表空间内了。
      

  4.   

    -- Grant/Revoke role privileges  
    grant connect to SYSJYPTDBA;
    grant dba to SYSJYPTDBA;
    grant resource to SYSJYPTDBA;-- Grant/Revoke system privileges  
    grant alter any index to SYSJYPTDBA;
    grant alter any sequence to SYSJYPTDBA;
    grant alter any table to SYSJYPTDBA;
    grant alter any procedure to SYSJYPTDBA;
    grant alter tablespace to SYSJYPTDBA;
    grant create any context to SYSJYPTDBA;
    grant create any index to SYSJYPTDBA;
    grant create any library to SYSJYPTDBA;
    grant create any procedure to SYSJYPTDBA;
    grant create any table to SYSJYPTDBA;
    grant create any type to SYSJYPTDBA;
    grant create any view to SYSJYPTDBA;
    grant create procedure to SYSJYPTDBA;
    grant create public database link to SYSJYPTDBA;
    grant drop any index to SYSJYPTDBA;
    grant drop any library to SYSJYPTDBA;
    grant drop public database link to SYSJYPTDBA;
    grant execute any operator to SYSJYPTDBA;
    grant execute any procedure to SYSJYPTDBA;
    grant insert any table to SYSJYPTDBA;
    grant select any table to SYSJYPTDBA;
    grant unlimited tablespace to SYSJYPTDBA;
    执行完了还是不行,为什么啊?
      

  5.   

    是不是你用sqlplus查询的用户或者数据库错了呀。不然不会出项这种情况的
      

  6.   


    --看一下表的所有者是谁
    select owner from dba_all_tables where table_name = 'XTZT';
      

  7.   

    确认下在程序和sqlplus中查询时,你的用户名和表空间
      

  8.   

    select owner from dba_all_tables where table_name = 'XTZT';
    ------------------------
    OWERSYS您说对了,我怎么解决呢?谢谢
      

  9.   

    您看8楼,应该是您说的情况,我要怎么去更改呢?thanks
      

  10.   

    select * from sys.表名就可以了
      

  11.   

    exp  system/manager file= <dmpfile> owner=SYS           
    imp  system/manager file= <dmpfile> fromuser=SYS touser=SYSJYPTDBA---------------------------
    请问file怎么填写?
      

  12.   


    你的表确定是要建在 sys 用户下而不是应该建在 sysjyptdba 用户下吗?
    我觉得应该是要建在自己的用户下才符合程序设计,你可以把表重新以 sysjyptdba 用户创建一下就可以了如果必须要跨用户访问的话,则只能使用 owner.object 这样的方式,或者你在 sysjyptdba 用户下创建同义词
    create or replace synonym xtzt for sys.xtzt;select * from xtzt;
      

  13.   


    file=目录/名称 例如 file=c:\backup\dmpfile.dmpc:\backup 目录必须存在,dmpfile.dmp 则为备份文件名和后缀