--查看sid

SQL> show parameter instance_name  ;

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

instance_name                        string      tos

--创建pfile

SQL> create pfile='/tmp/tospfile' from spfile;

File created.

--创建spfile in asm

SQL> create spfile='+data' from pfile='/tmp/tospfile';

File created.

--查看spfile name in asm

ASMCMD> pwd

+data/tos/parameterfile

ASMCMD> ls

spfile.282.754913039

--编辑pfile内容(如果有该文件,先删除/重命名)

[oracle@localhost ~]$ vi  $ORACLE_HOME/dbs/inittos.ora

#内容为

spfile='+data/tos/parameterfile/spfile.282.754913039'

--重命名spfile文件

[oracle@localhost dbs]$ mv spfiletos.ora spfiletos.ora_bak

--重启数据库

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area  167772160 bytes

Fixed Size                  1260672 bytes

Variable Size              75498368 bytes

Database Buffers           83886080 bytes

Redo Buffers                7127040 bytes

Database mounted.

Database opened.

--查看spfile

SQL> show parameter spfile;

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

spfile                               string      +DATA/tos/parameterfile/spfile

                                                .282.754913039


oracle视频教程请关注:http://u.youku.com/user_video/id_UMzAzMjkxMjE2.html