Reputation: 11177
I want to create pfile from spfile (oracle\product\11.2.0\server\dbs
) then I want to see and edit it and then create spfile new from pfile.
Is it possible? How?
CREATE pfile='G:/my_init.ora' FROM spfile;
Error: SQL Error: ORA-01031: insufficient privileges
- 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
Upvotes: 3
Views: 18096
Reputation: 6765
If you are connected to the server on which oracle is running, try using sqlplus like so - sqlplus / as sysdba
.
It will allow you to connect with the required privileges to run this statement.
Upvotes: 5
Reputation: 2098
I ran into this error while connected as sysdba, but I forgot that in the interim before I invoked the create pfile
command, I had been timing some SQL statements and had invoked the set autotrace on
at one point, then did a set autotrace off
later, then tried the create pfile
command and got the ORA-01031
error. A simple reconnect as sysdba fixed it:
SYS@extuat01> create pfile = 'pinitextuat01_from_mem.ora' from memory;
create pfile = 'pinitextuat01_from_mem.ora' from memory
*
ERROR at line 1:
ORA-01031: insufficient privileges
SYS@extuat01> connect / as sysdba
Connected.
SYS@extuat01> create pfile = 'pinitextuat01_from_mem.ora' from memory;
File created.
SYS@extuat01>
Upvotes: 1
Reputation: 175646
The message is rather clear. Not sufficient privileges.
From 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.
Upvotes: 3