Skip to content
Home » Oracle » How to Resolve PRKO-2002 : Invalid command line option

How to Resolve PRKO-2002 : Invalid command line option

  • Oracle

PRKO-2002

There could be many cases that throw PRKO-2002, this is only a case when we tried to open the database to READ ONLY.

[oracle@primary01 ~]$ srvctl start database -d orclcdb -o read only
PRKO-2002 : Invalid command line option: only

PRKO-2002 means that an unknown option is found in the command, which is not a valid one. You should remove or correct it.

Solution

In fact, any srvctl commands using unmatched options always result in failure with PRKO-2002. You can list all possible combination by adding -h to look up:

[oracle@primary01 ]$ srvctl start database -h

Starts the database.

Usage: srvctl start database -db <db_unique_name> [-startoption <start_options>] [-startconcurrency <start_concurrency>] [-node <node> | -serverpool "<serverpool_list>"] [-eval] [-verbose]
    -db <db_unique_name>           Unique name for the database
    -startoption <start_options>   Options to startup command (e.g. OPEN, MOUNT, or "READ ONLY")
    -startconcurrency <start_concurrency> Number of instances to be started simultaneously (or 0 for empty start_concurrency value)
    -node <node>                   Node on which to start the database
    -serverpool "<serverpool_list>" Comma separated list of database server pool names
    -eval                          Evaluates the effects of event without making any changes to the system
    -verbose                       Verbose output
    -help                          Print usage

To open the database to READ ONLY, you should use double quotation marks to wrap the phrase.

[oracle@primary01 ~]$ srvctl start database -d orclcdb -o "read only"

With quotation marks, Oracle takes the value as a whole to open the database.

Leave a Reply

Your email address will not be published. Required fields are marked *