Cannot query


Trying to connect to a 10g, however, getting an query error. The underlying query is correct.

Can anyone please provide some advice?

Query : tested in sqlplusw, and is correct:

SELECT sess.process, sess.status, sess.username, sess.schemaname, sql.sql_text FROM v$session sess, v$sql sql WHERE sql.sql_id( ) = sess.sql_id AND sess.type = 'USER';

URL jdbc:oracle:thin:@3.22.20.121:1521:ORCL
Driver: oracle.jdbc.driver.OracleDriver

Oracle JDBC driver(v8.1.6.0.0)

Oracle Database 10g Release 10.1.0.4.0 - Production With the OLAP and Data Mining options


Step 1:Attempting to Locate Driver Class... Driver Class: oracle.jdbc.driver.OracleDriver LOCATED SUCCESSFULLY! Step 2:Attempting to Load Driver Class... Driver Class: LOADED SUCCESSFULLY! Step 3: Attempting to Connect to Database... Database: jdbc:oracle:thin:@...:1521:ORCL Connection ESTABLISHED SUCCESSFULLY! Step 4: Attempting to Execute Query... Statement created. ***ERROR***: The supplied Query will not execute because it is either invalid, the table does not exist or some of the columns do not exist.
Parents
  • Verified Answer

    use this query

    SELECT sess.process,sess.status,sess.username,sess.schemaname,sql.sql_text FROM v$session sess,v$sql sql WHERE sql.sql_id( )=sess.sql_id AND sess.type='USER'

    sitescope won't allow spaces in between queries.

    If that query is executing the database with the same user you are usign in the sitescope monitor then it shuld execute. may be some spaces in the supplied query in sitescope etc..causes this issues.

    -Krishna Rajapantula.
Reply
  • Verified Answer

    use this query

    SELECT sess.process,sess.status,sess.username,sess.schemaname,sql.sql_text FROM v$session sess,v$sql sql WHERE sql.sql_id( )=sess.sql_id AND sess.type='USER'

    sitescope won't allow spaces in between queries.

    If that query is executing the database with the same user you are usign in the sitescope monitor then it shuld execute. may be some spaces in the supplied query in sitescope etc..causes this issues.

    -Krishna Rajapantula.
Children
No Data