ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 在本库中重新创见数据字典

在本库中重新创见数据字典

原创 Linux操作系统 作者:@oracle@_cu 时间:2009-03-06 14:20:11 0 删除 编辑

在本库中重新创见数据字典

#sqlplus /nolog

sql>conn system/qhtthq as sysdba

sql>startup


SQL> spool catalog.log
SQL> @?/rdbms/admin/catalog.sql;#创见数据字典的命令,中的这个报错,

是在删除这个数据字典中的表,显示不存在

SQL> spool catproc.log #在当前目录下创一个安装文件的日志
 
SQL> @?/rdbms/admin/catproc.sql;
这个会有17m左右的日志文件产生,会运行二十分钟左右

SQL> spool pupbld.log #在当前目录下创一个安装文件的日志

SQL> @?/sqlplus/admin/pupbld.sql;
DROP SYNONYM PRODUCT_USER_PROFILE
             *
ERROR at line 1:
ORA-01434: private synonym to be dropped does not exist
 
 
 
Table created.
 
DROP TABLE PRODUCT_USER_PROFILE
           *
ERROR at line 1:
ORA-00942: table or view does not exist
 
 
 
Table altered.
 
CREATE TABLE SQLPLUS_PRODUCT_PROFILE
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object
 
 
DROP TABLE PRODUCT_PROFILE
           *
ERROR at line 1:
ORA-00942: table or view does not exist
 
 
DROP VIEW PRODUCT_PRIVS
*
ERROR at line 1:
ORA-00942: table or view does not exist
 
 
 
View created.
 
 
Grant succeeded.
 
 
Synonym dropped.
 
 
Synonym created.
 
DROP SYNONYM PRODUCT_USER_PROFILE
             *
ERROR at line 1:
ORA-01434: private synonym to be dropped does not exist
 
 
 
Synonym created.
 
 
Synonym dropped.
 
 
Synonym created.
 

以上这些报错是正常的

sql>shutdown immediate
 #sqlplus /nolog
sql>conn  / as sysdba
sql>startup

SQL> select * from dual;
 
D
-
X


SQL> desc dba_objects;
 Name                                      Null?    Type
 ----------------------------------------- -------- -------------

---------------
 OWNER                                              VARCHAR2(30)
 OBJECT_NAME                                        VARCHAR2(128)
 SUBOBJECT_NAME                                     VARCHAR2(30)
 OBJECT_ID                                          NUMBER
 DATA_OBJECT_ID                                     NUMBER
 OBJECT_TYPE                                        VARCHAR2(19)
 CREATED                                            DATE
 LAST_DDL_TIME                                      DATE
 TIMESTAMP                                          VARCHAR2(19)
 STATUS                                             VARCHAR2(7)
 TEMPORARY                                          VARCHAR2(1)
 GENERATED                                          VARCHAR2(1)
 SECONDARY                                          VARCHAR2(1)
 NAMESPACE                                          NUMBER
 EDITION_NAME                                       VARCHAR2(30)
 

从结果上显示来看,,,重新创见了一个全新的数据字典


sql>select * from dual;
SQL> create table testbl(id integer,name char(10));
 
Table created.
 
SQL> insert into testbl values(0,'oracle');
 
1 row created.
 
SQL> commit;
 
Commit complete.
 
SQL> select * from testbl;
 
        ID NAME
---------- ----------
         0 oracle

数据库,看来是没有问题

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/20570073/viewspace-563059/,如需转载,请注明出处,否则将追究法律责任。

下一篇: ORACLE操作手册 2
请登录后发表评论 登录
全部评论

注册时间:2009-03-03

  • 博文量
    10
  • 访问量
    16951