Oracle ORA-04043: 对象****不存在的一种情况
SQL> CLEAR SCREEN;
#创建库表
SQL> START E:\SQL.SQL;
18 ;
表已创建。
SQL> select table_name,tablespace_name from user_tables;
TABLE_NAME TABLESPACE_NAME
------------------------------ ------------------------------
TB_MTBasicInfo DBDATAFILESPACE
#拥有表空间DBDATAFILESPACE
SQL> select tablespace_name from user_tablespaces;
TABLESPACE_NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
TEMP
USERS
DBDATAFILESPACE
DBINDEXSPACE
已选择7行。
#登陆用户名:DBMATERIALOWNER
SQL> select username from user_users;
USERNAME
------------------------------
DBMATERIALOWNER
#DBA身份
SQL> select * from user_role_privs;
USERNAME GRANTED_ROLE ADM DEF OS_
------------------------------ ------------------------------ --- --- ---
DBMATERIALOWNER DBA NO YES NO
#表对象却不存在
SQL> desc TB_MTBasicInfo;
ERROR:
ORA-04043: 对象 TB_MTBasicInfo 不存在
SQL> desc DBDATAFILESPACE.TB_MTBasicInfo;
ERROR:
ORA-04043: 对象 DBDATAFILESPACE.TB_MTBasicInfo 不存在
E:\SQL.SQL的内容:
CREATE TABLE "DBMATERIALOWNER"."TB_MTBasicInfo" (
"MT_ID" NUMBER(10,0),
"MT_CODE" VARCHAR2(50 BYTE) not null,
"MT_DESC" VARCHAR2(600 BYTE) not null,
"MT_5497_CODE" NVARCHAR2(50) not null,
"MT_5497_DESC" NVARCHAR2(150),
"MT_PROD_CODE" NVARCHAR2(50),
"MT_PROD_DESC" NVARCHAR2(150),
"MT_SPEC_APPR" NVARCHAR2(100),
"MT_BATCH_NO" NVARCHAR2(50),
"MT_TYPE_CODE" NVARCHAR2(50) not null,
"MT_TYPE_DESC" NVARCHAR2(150) not null,
CONSTRAINT TB_MTBasicInfo PRIMARY KEY
(
MT_ID
)
)
原来命令行里建表如果是带引号的,那么在使用的时候也要带引号,如果命令如下:
desc “DBDATAFILESPACE”.“TB_MTBasicInfo”
就不会有任何问题了。
带引号的时候,大小写是敏感的