确保test表存在
try:
create or replace procedure pro_test as
begin
 insert into testmis.test(name,myid) value(1,'1');
commit;
end pro_test;
/

解决方案 »

  1.   

    问题依然存在,请教:
    SQL> create or replace procedure test_pro as
      2  begin
      3   insert into testmis.test(name,myid) values('1','1');
      4  commit;
      5  end test_pro;
      6  /警告: 创建的过程带有编译错误。SQL> show error procedure test_pro;
    PROCEDURE TEST_PRO 出现错误:LINE/COL ERROR
    -------- -----------------------------------------------------------------
    3/2      PLS-00201: 必须说明标识符 'TEST'
    3/2      PL/SQL: SQL Statement ignored
    SQL>
      

  2.   

    确保test表存在!
    你的用户可能没有这个表的权限!
    connect testmis/password
    grant select,insert on test to youruser;
    ...
      

  3.   

    create procedure test
    as
    begin
     insert into testmis.test(name,myid) value(1,'1');
    commit;
    end test;
    testmis.test这个表要存在而且当前用户要有修改的权限
      

  4.   

    当前我是用system/manager进去的,应该有修改的权限吧(既然可以创建)
      

  5.   

    你用那个用户创建的test表呢?system?
      

  6.   

    我先在system下创建test表,再编译test_pro过程,
    SQL> create table testmis.test
      2  (
      3    name varchar2(50),
      4    myid varchar2(50)
      5  );表已创建。SQL> alter procedure test_pro compile;警告: 更改的过程带有编译错误。SQL> show error procedure test_pro;
    PROCEDURE TEST_PRO 出现错误:LINE/COL ERROR
    -------- -----------------------------------------------------------------
    3/2      PLS-00201: 必须说明标识符 'TEST'
    3/2      PL/SQL: SQL Statement ignored
      

  7.   

    改用户要有修改test表的权限才行
      

  8.   

    connect system/managerdrop table testmis.test;
    crete table test (name varchar2(50),myid varchar2(50));create or replace procedure test_pro as
    begin
    insert into test(name,myid) values('1','1');
    commit;
    end test_pro;
    /
      

  9.   

    我解决问题了,我是这样作的:不过我搞不清楚为什么必须加个testmis.
    SQL> create table testmis.test
      2  (
      3    name varchar2(50),
      4    myid varchar2(50)
      5  );表已创建。
    SQL> create or replace procedure testmis.testp
      2  as
      3  begin
      4   insert into testmis.test(name,myid) values('1','1');
      5  commit;
      6  end;
      7  /过程已创建。SQL> alter procedure testmis.testp compile;过程已更改。
    SQL> show error procedure testmis.testp;
    没有错误。如果是: procedure testp 就会有错误啊
    SQL> create or replace procedure testp
      2  as
      3  begin
      4   insert into testmis.test(name,myid) values('1','1');
      5  commit;
      6  end;
      7  /警告: 创建的过程带有编译错误。
      

  10.   

    select * from all_users;
    看有没有testmis这个用户?
      

  11.   

    有这个用户的,我就是不知道为什么必须指定表空间名 testmis.,难道没有缺省的吗?
      

  12.   

    SQL> select * from all_users;USERNAME                          USER_ID CREATED
    ------------------------------ ---------- ----------
    SYS                                     0 14-11月-00
    SYSTEM                                  5 14-11月-00
    OUTLN                                  11 14-11月-00
    DBSNMP                                 16 14-11月-00
    AURORA$JIS$UTILITY$                    25 14-11月-00
    OSE$HTTP$ADMIN                         26 14-11月-00
    AURORA$ORB$UNAUTHENTICATED             27 14-11月-00
    ORDSYS                                 28 14-11月-00
    ORDPLUGINS                             29 14-11月-00
    MDSYS                                  30 14-11月-00
    CTXSYS                                 33 14-11月-00USERNAME                          USER_ID CREATED
    ------------------------------ ---------- ----------
    SCOTT                                  35 14-11月-00
    ADAMS                                  36 14-11月-00
    JONES                                  37 14-11月-00
    CLARK                                  38 14-11月-00
    BLAKE                                  39 14-11月-00
    MTSSYS                                 40 14-11月-00
    TESTMIS                                42 27-5月 -04
      

  13.   

    不是表空间的名字
    而是用户的名字
    你创建的表实际上是创建在testmis用户下,你的存储过程如果创建在system用户下(不加testmis.)
    当然编译出错(找不到testmis表)
    因此存储过程也必须创建在testmis用户下,即create or replace procedure testmis.testp ...
      

  14.   

    如果你全部都不加前缀也可以的啊,你是把这些东西都创建到用户testmis下面而已,如果你用这个用户进去就都不用加了!只是模式不同而已