21

I am new to Oracle. And I have come across a problem.

Firstly,I want to check the privileges of the sysman account:

SQL>  select * from dba_sys_privs where grantee='sysman';

no rows selected

I know that it means there is no content in my view dba_sys_privs. But anyway,I have aready built a database. So, I try again, just shortening the statement:

SQL>  select * from dba_sys_privs
  2

So here are my two questions:

  1. what happened to my database? I have already set up a database
  2. what does the "2" mean? Does it mean the next row or something else?
APC
  • 144,005
  • 19
  • 170
  • 281
kaiwii ho
  • 1,367
  • 7
  • 21
  • 40

2 Answers2

29

You have entered a new line character (pressed return) without entering a statement termination i.e. ;. Compare your second statement with the first one you posted. So yes, the 2 means the client is awaiting further input.

To run the second statement, simply enter a slash /


As for why your first statement returned no rows, in Oracle database object names (including users) are in upper-case.

select * from dba_sys_privs where grantee='SYSMAN';
APC
  • 144,005
  • 19
  • 170
  • 281
  • See [this answer](https://stackoverflow.com/a/21145229/1509264) in the question "When do I need to use a semicolon vs a slash in Oracle SQL?" – MT0 Mar 19 '21 at 11:00
0

I encountered similar situaion due to my inserts did not work as expected. I used a insert statement followed by "commit;", it just says committed, but when I use sql developer to view the record, I could not find it. So I tried to run select from sqlplus and got a number. Later DBA told me to skip the "commit", then I could see the exception thrown.

Feng Zhang
  • 1,698
  • 1
  • 17
  • 20