2015-10-05 83 views
1

我想從spfile(oracle \ product \ 11.2.0 \ server \ dbs)創建pfile,然後我想要查看和編輯他,然後從pfile創建spfile新文件。 有可能嗎?怎麼樣?從spfile創建pfile

CREATE pfile='G:/my_init.ora' FROM spfile; 

錯誤: SQL錯誤:ORA-01031:權限不夠

  1. 00000 - "insufficient privileges"

*Cause: An attempt was made to perform a database operation without the necessary privileges.

*Action: Ask your database administrator or designated security administrator to grant you the necessary privileges

回答

3

如果連接在其上運行Oracle的服務器,嘗試連接使用此命令在sqlplus - 「SQLPLUS以SYSDBA /」 它可以讓您與所需的連接運行此語句的權限。

3

的信息是相當清楚的。沒有足夠的權限。

CREATE PFILE doc

You must have the SYSDBA or the SYSOPER role to execute this statement. You can execute this statement either before or after instance startup.

0

我就遇到了這個錯誤,同時連接作爲SYSDBA,但我忘了,在這期間我調用create pfile命令之前,我一直定時一些SQL語句,並調用set autotrace on在一個點,然後做了一個set autotrace off後,然後嘗試使用create pfile命令並得到了ORA-01031錯誤。一個簡單的重新連接作爲sysdba修復它:

[email protected]> create pfile = 'pinitextuat01_from_mem.ora' from memory; 
create pfile = 'pinitextuat01_from_mem.ora' from memory 
* 
ERROR at line 1: 
ORA-01031: insufficient privileges 

[email protected]> connect/as sysdba 
Connected. 
[email protected]> create pfile = 'pinitextuat01_from_mem.ora' from memory; 

File created. 

[email protected]>