Home » SQL & PL/SQL » SQL & PL/SQL » change permanently the value of the initialization parameter (Oracle)
change permanently the value of the initialization parameter [message #647650] Thu, 04 February 2016 10:34 Go to next message
Nagaram
Messages: 2
Registered: February 2016
Junior Member
I am wondering if you can help me with one SQL plus statement:

"Write SQL statement you would need to execute in SQL*Plus to change permanently the value of the initialisation parameter CURSOR_SHARING to the value EXACT. Provide detailed explanation."



I know that the type of the open_cursor is dynamic and in its sql should be state SCOPE = MEMORY and SCOPE = SPFILE ( or SCOPE = BOTH) ,for the changes to persist in the future sessions, but I don't know exactly how to do...

so far I've changed the OPEN_CURSORS parameter to 200. (the original value was 300, but because the sql statement stated the SCOPE= MEMORY, the value of 200 was holded for the current session only. Therefore, when I started the new session, the old value, 300, was put it in place again.).
the sql statement which I used was:
ALTER SYSTEM SET open_cursor = 200 SCOPE = MEMORY.
Re: change permanently the value of the initialization parameter [message #647654 is a reply to message #647650] Thu, 04 February 2016 11:23 Go to previous messageGo to next message
John Watson
Messages: 8929
Registered: January 2010
Location: Global Village
Senior Member
Quote:
the sql statement which I used was:
ALTER SYSTEM SET open_cursor = 200 SCOPE = MEMORY.
No it wasn't:
orclz> ALTER SYSTEM SET open_cursor = 200 SCOPE = MEMORY;
ALTER SYSTEM SET open_cursor = 200 SCOPE = MEMORY
                 *
ERROR at line 1:
ORA-02065: illegal option for ALTER SYSTEM


orclz>
please be precise in future.

What is the effect when you use scope=both rather than scope=memory ?
Re: change permanently the value of the initialization parameter [message #647655 is a reply to message #647654] Thu, 04 February 2016 11:37 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
please be precise in future.


And copy and paste your SQL*Plus session like John did instead of trying to explain (and fail).

Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Also always post your Oracle version, with 4 decimals.

Re: change permanently the value of the initialization parameter [message #647660 is a reply to message #647655] Thu, 04 February 2016 16:23 Go to previous messageGo to next message
Bill B
Messages: 1971
Registered: December 2004
Senior Member
Yes, open_cursor is not valid. Open_cursors is. Also no spaces around the "=" It should be

alter system set open_cursors=200 scope=memory;

[Updated on: Thu, 04 February 2016 16:25]

Report message to a moderator

Re: change permanently the value of the initialization parameter [message #647662 is a reply to message #647650] Thu, 04 February 2016 16:30 Go to previous message
Barbara Boehmer
Messages: 9088
Registered: November 2002
Location: California, USA
Senior Member
https://docs.oracle.com/cd/B28359_01/server.111/b28320/initparams041.htm
Previous Topic: Comma separated column values matching
Next Topic: Variables
Goto Forum:
  


Current Time: Fri Apr 19 23:09:44 CDT 2024