在oracle中可以选择用spfile还是pfile起动的,默认为spfile启动的,SPFILEORACL.ora指的就是spfile.建库脚本中的最后一个sh有重建spfile的脚本,把spfile重建一下就可认了。

解决方案 »

  1.   

    太好了,那么该脚本是放在哪个目录下的呢,给个提示就可以了不过ora文件应该怎么重建?很奇怪,重来没有干过这样的事情
      

  2.   

    http://gigabase.idi.ntnu.no/oradoc/server.901/a90117/create.htm#1012672
      

  3.   

    spfile是9i的新类型的参数文件,不能手工修改,只能用alter system来修改
      

  4.   

    平时,可以生成pfile文件来备份
      

  5.   

    What is a Server Parameter File?
    A server parameter file (SPFILE) can be thought of as a repository for initialization parameters that is maintained on the machine where the Oracle database server executes. It is, by design, a server-side initialization parameter file. Initialization parameters stored in a server parameter file are persistent, in that any changes made to the parameters while an instance is running can persist across instance shutdown and startup. This eliminates the need to manually update initialization parameters to make changes effected by ALTER SYSTEM statements persistent. It also provides a basis for self tuning by the Oracle database server. A server parameter file is initially built from a traditional text initialization parameter file using the CREATE SPFILE statement. It is a binary file that cannot be browsed or edited using a text editor. Oracle provides other interfaces for viewing and modifying parameter settings. 
    --------------------------------------------------------------------------------
    Caution: 
    Although you can open the binary server parameter file with a text editor and view its text, do not manually edit it. Doing so will corrupt the file. You will not be able to start you instance, and if the instance is running, it could crash.  
     &&&&&&&&&&&&&&&&&&&^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    谢谢各位,看到帮助文件了,不过按照帮助文件里面的脚本,sql无法执行啊。
    %%%%%%%%%%%%%%%%%%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^The following script creates a server parameter file from the text initialization parameter file and writes it to the default location. The instance is shut down, then restarted using the server parameter file (in the default location). CONNECT SYS/password AS SYSDBA
    -- create the server parameter file 
    CREATE SPFILE='/vobs/oracle/dbs/spfilemynewdb.ora' FROM
           PFILE='/vobs/oracle/admin/mynewdb/scripts/init.ora';
    SHUTDOWN 
    -- this time you will start up using the server parameter file
    CONNECT SYS/password AS SYSDBA
    STARTUP 
    EXIT&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
    不过我按照下面这个帮助,已经启动了orcl 实例
    —————&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&Using SQL*Plus to Start Up a Database
    You use the STARTUP command to start up a database instance. To start an instance, Oracle must read instance configuration parameters (the initialization parameters) from either a server parameter file or a traditional text initialization parameter file. When you issue the STARTUP command with no PFILE clause, Oracle reads the initialization parameters from a server parameter file (SPFILE) in a platform-specific default location. 
    --------------------------------------------------------------------------------
    Note: 
    For UNIX, the platform-specific default location (directory) for the server parameter file (or text initialization parameter file) is: $ORACLE_HOME/dbs For Windows NT and Windows 2000 the location is: $ORACLE_HOME\database   --------------------------------------------------------------------------------
     
     
    In the platform-specific default location, Oracle locates your initialization parameter file by examining filenames in the following order: spfile$ORACLE_SID.ora spfile.ora init$ORACLE_SID.ora You can direct Oracle to read initialization parameters from a traditional text initialization parameter file, by using the PFILE clause of the STARTUP command. For example: STARTUP PFILE = /u01/oracle/dbs/init.ora
    Further, you can use this PFILE clause to start an instance with a nondefault server parameter file as follows: Create a one line text initialization parameter file that contains only the SPFILE parameter. The value of the parameter is the nondefault server parameter file location. For example, create a text initialization parameter file /u01/oracle/dbs/spf_init.ora that contains only the following parameter: SPFILE = /u01/oracle/dbs/test_spfile.ora--------------------------------------------------------------------------------
    Note: 
    You cannot use the IFILE initialization parameter within a text initialization parameter file to point to a server parameter file. In this context, you must use the SPFILE initialization parameter.  --------------------------------------------------------------------------------
     
     
    Start up the instance pointing to this initialization parameter file. STARTUP PFILE = /u01/oracle/dbs/spf_init.ora
    Since the server parameter file must reside on the machine running the database server, the above method also provides a means for a client machine to start a database that uses a server parameter file. It also eliminates the need for a client machine to maintain a client-side initialization parameter file. When the client machine reads the initialization parameter file containing the SPFILE parameter, it passes the value to the server where the specified server parameter file is read. You can start an instance in various modes: Start the instance without mounting a database. This does not allow access to the database and usually would be done only for database creation or the re-creation of control files. Start the instance and mount the database, but leave it closed. This state allows for certain DBA activities, but does not allow general access to the database. Start the instance, and mount and open the database. This can be done in unrestricted mode, allowing access to all users, or in restricted mode, allowing access for database administrators only. 
    --------------------------------------------------------------------------------
     
    谢谢各位