基本顺序没有什么错误你把>build_prod.sql这个文件贴出来,给大家看看

解决方案 »

  1.   

    下面是我的build_prod.sql文件内容:
    --
    -- $Header: build_db.sql 1.1 94/10/18 15:55:37 gdudey Osd<desktop/netware> $ Copyr (c) 1994 Oracle
    --
    -- This file must be run out of the directory containing the
    -- initialization file.startup nomount pfile=c:\mydir\DATABASE\initORCL.ora--  Create databasecreate database prod
        controlfile reuse
        logfile 'c:\mydir\DATABASE\log1prod.ora' size 1M reuse,
                'c:\mydir\DATABASE\log2prod.ora' size 1M reuse,
                'c:\mydir\DATABASE\log3prod.ora' size 1M reuse,
                'c:\mydir\DATABASE\log4prod.ora' size 1M reuse
        datafile 'c:\mydir\DATABASE\sys1prod.ora' size 10M reuse autoextend on
          next 10M maxsize 200M 
        character set ZHS16GBK;create rollback segment rb_temp storage (initial 100 k next 250 k);-- Create additioanal tablespaces ...-- USER_DATA: Create user sets this as the default tablespace
    -- TEMPORARY_DATA: Create user sets this as the temporary tablespace
    -- ROLLBACK_DATA: For rollback segmentscreate tablespace user_data
        datafile 'c:\mydir\DATABASE\usr1prod.ora' size 3M reuse autoextend on
          next 5M maxsize 150M;
    create tablespace rollback_data
        datafile 'c:\mydir\DATABASE\rbs1prod.ora' size 5M reuse autoextend on
          next 5M maxsize 150M;
    create tablespace temporary_data
        datafile 'c:\mydir\DATABASE\tmp1prod.ora' size 2M reuse autoextend on
          next 5M maxsize 150M;
    alter rollback segment rb_temp online;-- Change the SYSTEM users' password, default tablespace and
    -- temporary tablespace.alter user system temporary tablespace temporary_data;
    alter user system default tablespace user_data;-- Create 16 rollback segments.  Allows 16 concurrent users with open
    -- transactions updating the database. This should be enough.create public rollback segment rb1 storage(initial 50K next 250K)
      tablespace rollback_data;
    create public rollback segment rb2 storage(initial 50K next 250K)
      tablespace rollback_data;
    create public rollback segment rb3 storage(initial 50K next 250K)
      tablespace rollback_data;
    create public rollback segment rb4 storage(initial 50K next 250K)
      tablespace rollback_data;
    create public rollback segment rb5 storage(initial 50K next 250K)
      tablespace rollback_data;
    create public rollback segment rb6 storage(initial 50K next 250K)
      tablespace rollback_data;
    create public rollback segment rb7 storage(initial 50K next 250K)
      tablespace rollback_data;
    create public rollback segment rb8 storage(initial 50K next 250K)
      tablespace rollback_data;
    create public rollback segment rb9 storage(initial 50K next 250K)
      tablespace rollback_data;
    create public rollback segment rb10 storage(initial 50K next 250K)
      tablespace rollback_data;
    create public rollback segment rb11 storage(initial 50K next 250K)
      tablespace rollback_data;
    create public rollback segment rb12 storage(initial 50K next 250K)
      tablespace rollback_data;
    create public rollback segment rb13 storage(initial 50K next 250K)
      tablespace rollback_data;
    create public rollback segment rb14 storage(initial 50K next 250K)
      tablespace rollback_data;
    create public rollback segment rb15 storage(initial 50K next 250K)
      tablespace rollback_data;
    create public rollback segment rb16 storage(initial 50K next 250K)
      tablespace rollback_data;这是在oracle系统安装完典型库后留下的build_db.sql文件的基础上修改而来的
      

  2.   

    建立初始化文件initprod.ora(我估计你建立了)startup nomount pfile=c:\mydir\DATABASE\initORCL.ora
    改成startup nomount pfile=c:\mydir\DATABASE\initprod.ora
      

  3.   

    又看了看,不知道你建立口令文件没有??使用orapwd命令(在80X中是orapwd80命令)
    C:\>orapwd
    Usage: orapwd file=<fname> password=<password> entries=<users>  where
        file - name of password file (mand),
        password - password for SYS and INTERNAL (mand),
        entries - maximum number of distinct DBA and OPERs (opt),
      There are no spaces around the equal-to (=) character.
      

  4.   

    密码文件我没有手工的建立,但是我在我手工建完数据库后,系统为我建立的pwprod.ora的密码文件,还有,我可以在我的系统中建立用户并给它授予DBA的权限。
      

  5.   

    --------------------------------------------------------------
    出了很多的错误,但有的语句却能够运行,在运行下面的文件:
    svrmgr>@%RDBMS80%\ADMIN\CATALOG.SQL出了很多的错误,但有的语句却能够运行,在运行下面的文件
    svrmgr>@%RDBMS80%\ADMIN\CATPROC.SQL
    出了很多的错误,但有的语句却能够运行
    --------------------------------------------------------------
    以上两个文件是用来建立数据字典的,包括创建一些数据库对象。
    他们的做法是先删除对象,再重新建立。对于一个新的数据库来说,要删除的数据库对象是不存在的,所以就会报错。
    如果只有这两个SQL文件运行出错是没有问题的。你可以读读这两个文件的SQL,都是 drop xxxxx;然后再create xxxx
      

  6.   

    哦,现在知道了
    但是我在运行build_prod的时候,好象也出错了ORA-01081: ????????? ORACLE --- ?????不知道是怎么回事?
      

  7.   

    ORA-01081的错误说明是oracle实例已经运行ORA-01081 cannot start already-running ORACLE - shut it down firstCause: An attempt was made to start Oracle while it was already running. Action: Shut down Oracle first, if you want to restart it. 有你发的帖子可知
    你先执行------------------------------------------------------
    c:\ set oracle_sid=prod
     svrmgr>connect internal/oracle
     svrmgr>startup nomount pfile=c:\mydir\database\initproc
    ------------------------------------------------------然后运行build_prod,在build_prod中包含------------------------------------------------------
    startup nomount pfile=c:\mydir\DATABASE\initORCL.ora
    ------------------------------------------------------
    这是发生错误的原因