Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Basic question | run multiple queries without reconnecting

Re: Basic question | run multiple queries without reconnecting

From: Anoop <anoopkumarv_at_gmail.com>
Date: 23 Jun 2006 15:58:01 -0700
Message-ID: <1151103481.005751.323420@y41g2000cwy.googlegroups.com>

Mark C. Stock wrote:
> "Anoop" <anoopkumarv_at_gmail.com> wrote in message
> news:1151097737.964493.207840_at_c74g2000cwc.googlegroups.com...
> :
>
> : But I am facing a problem still - a bit unrelated and rather basic..
> : But I will go ahead and ask.
> :
> : >From an oracle client like oracle sqldeveloper, I can run the DCL -
> : "audit all by anoop by access" just fine if I log in as sys as sysdba
> : role.
> :
> : But I need to run these as another user - system; and I am getting this
> : error message:
> :
> : java.sql.SQLException: ORA-00987: missing or invalid username(s)
> :
> : I think this means system does not have privileges and I tried using
> : the same: ie., tried connecting as
> : system as role: sysdba - but then I cant even connect to the db.. the
> : test connection fails.
> :
> : How can give additional privileges to the user "system" so that I can
> : run the above command?
> :
> : My java code I have written does not allow me to connect as sysdba
> : role....
> :
> : Thanks,
> : Anoop
> :
>
> you should not be logging in as SYSDBA unless you are planning on
> starting/stopping/restoring/backing up or otherwise managing the database
>
> if you look up the error in the oracle reference or try to google on it
> you'll get a complete description of the error -- it's not what you think.
>
> ++ mcs

Well - I did google it up and this was what I got.....

ORA-00987: missing or invalid username(s)

Cause: No username was specified in a GRANT statement or one of the specified usernames is invalid. Valid usernames must be specified following the keyword TO in a GRANT statement to define a user. A username must begin with a letter, consist only of alphanumeric characters and the special characters $, _, and #, and be less than or equal to 30 characters. If it contains other characters, it must be enclosed in double quotation marks. It may not be a reserved word.

Action: Specify a valid username, or list of usernames, following the keyword TO in the GRANT statement.

And I could recreate the same error when I log in as sys with connect as default - I get the same error when I run this command:

audit all by anoop by access

Now if I go back to my connection settings and change the role to connect as sysdba and re-run the same command - it works fine ( I think it does coz there is no error message)

I am running all these using oracle raptor / now sqldeveloper.

Initially I thought my command was missing the username - "anoop" somehow - that was proven false after seeing the query through my java logging....

Anoop Received on Fri Jun 23 2006 - 17:58:01 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US