Anand SELECT current_scn, SYSTIMESTAMP FROM v$database;

How to rectify this error in 10g
SELECT current_scn, SYSTIMESTAMP
FROM v$database;
ora 0942: table or view does not exist
given grant create table,session
grant resource connect given

892432 wrote:
How to rectify this error in 10g
SELECT current_scn, SYSTIMESTAMP
FROM v$database;
ora 0942: table or view does not exist
given grant create table,session
grant resource connect givenWhich user you are trying it from? This won't work from a normal user,see below,
SQL*Plus: Release 11.2.0.1.0 Production on Sun Dec 4 16:35:07 2011
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> grant create session to some_user identified by pwd;
Grant succeeded.
SQL> connect some_user/pwd
Connected.
SQL> desc V$database
ERROR:
ORA-04043: object "SYS"."V_$DATABASE" does not existYou can see that the view is owned by Sys user. So you need to connect as Sys user to see the contents of it.
Aman....

Similar Messages

  • How to select alternate entries from the database table

    Hi Experts,
    can u help me, how to select alternate entries from the database table.
    Thanks

    As there is no concept of sequence (unless there is a field specifically included for the purpose), there is no meaning to "alternate" records.
    What table do you have in mind, what data does it hold, and why do you want alternate records?
    matt

  • How to view data in tables by selecting the synonym from the database objec

    I could not figure out how to view data in tables by selecting the synonym from the database objects navigation tree. I had to first choose the synonym, view the details of the synonym to determine the table name, and then select the table from the database objects tree. Is this the only way available?

    This functionality currently does not exist. I don't see it on the 1.1 statement of direction either, so perhaps someone from Oracle can give some insight as to when this could be expected.
    Eric

  • Randomly selecting some rows from the database table

    Hi can some one help me in selecting some rows from a database table which has around 90,000 rows.
    Thanks.

    One thing you might try is the "sample" clause if you have 8i which is supposed to return a random percentage of the table. Say for example, you have a sequence number on your table as the pkey. Then you might try:
    select * from <table_name> where pkey in(select pkey from <table_name> sample(10));
    This should give you a random 10 percent of the rows in the table but I tried this once and the results seemed unpredictable. For example it returned a different number of rows each time even though the number of rows in the table didn't change.
    Hope this works for you.

  • How to remove spaces at selection screen coming from logical database

    Hi Experties,
    When we hide some selection from the logical database.  The spaces still occupied and this make our selection screen looks awkward.
    How to remove the spaces left by hidden selection ?
    Regards
    Nislina

    Hi,
    I came across your un-answered question while searching for a solution on the similer problem. Though I couldn't fine a solution on SDN, but figured out one myself. Thought its a good idea to share it.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-group4 = '003'.
          screen-active = 0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    Here screen-group4 contains the sequence number of the select-options field starting from 000 onwards.
    You may like to assign points and close the question.
    Kind Regards,
    Khalid Mustafa

  • 11g p2 / bug - select in navigator from database offline object editor

    It is no more possible to use the context menu "Select in Navigator" from the database offline object editor (a package body in my case). I got a message "Command not handled".
    This appear in all my packages and body.
    After restarting JDev and test again I got this message "Error encountered:
    The Offline Database file is missing. Please recreate Offline Database "1" with the correct settings.
    This object in file ADMINPROCTABLE.type will be unavailable."
    Is it a way to correct this ?

    I completely reinstall JDev and set it to use subversion ... that resolve the problem and i'm no more in a position to reproduce it.

  • Exclude one field from Logical Database's dynamic selection screen

    Hi Guru,
    I have a requirement to amend a program to exclude the document number field (bsik-belnr) from the dynamic selection-screen of the logical database KDF(Vendor Database) so that the program will not filter according to the document number.
    I have use the below syntax in my zprogram.
      selection-screen exclude select-options: doc-no.
    However I get syntax error "The addition EXCLUDE is only allowed in INCLUDE DBKDFSEL".
    Please advice.
    Best Regards,
    Fung

    The selection part of the logical database defines input fields for selecting data.
              The runtime environment displays these on the selection screen when you run an executable program linked to the logical database.
              Include called DB<ldbname>SEL.
            SELECTION-SCREEN BEGIN OF VERSION ver TEXT-xxx.
                                                                    SELECTION-SCREEN EXCLUDE ... .
                                                    SELECTION-SCREEN END OF VERSION ver.
    Defines a selection screen version (with a three-character name ver ). Between BEGIN OF VERSION and END OF VERSION , you can exclude selection screen objects for the version ver , i.e. remove them from the selection screen with SELECTION-SCREEN EXCLUDE.
              SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE dbtab
    If one of these tables is active in the report (i.e. it is declared under TABLES or lies somewhere on the path from the root of the database hierarchy to a table declared with TABLES ), a pushbutton called 'Dynamic selections' appears on the selection screen.

  • How to get the selection parameters from logical database into one of the t

    Hi Sap ABAP Champians,
    How to get the selection parameters from logical database into one of the tab in the tabstrip selection-screen.
    Please help me for this
    Thanks
    Basu

    Hi
    Thanks, that will work, but then I'll have to insert code into all my reports.
    I can see that "Application Server Control Console" is able to rerun a report.
    This must mean that the Report Server has access to the runtime parameters.
    But how?
    Cheers
    Nils Peter

  • Selecting a one row from the database is not working

    Hi all I am having a small problem with getting a row from my database to show up. Here is the code for the search that I want to do
                            String item; String columnName; String result; columnName = (String)searchBox.getSelectedItem(); item = searchField.getText().trim(); String tableName = "employee"; if(item == null || item.equals("")){ System.out.println("No Text entered"); }else{ try { result = sql.retrieve_From_Database(columnName, tableName, item); System.out.println(result); } catch (SQLException e1) { sql.displayErrors(e1); }
    Here is the code for the retrieve_From_Database function.
    protected String retrieve_From_Database(String columnName, String tableName, String item) throws SQLException{ ResultSet rs = null; Statement sm = null; sm = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY); rs = sm.executeQuery("select * from " + tableName + " where " + columnName + " = " + item); result = rs.getString(columnName); if(result == null){ System.out.println("Error in retrieve"); return new String("No results in DB"); }else{ System.out.println(result); return result; } }
    When I run the first code I get an error of SQL Exception: Unknown column 'anthony' in 'where clause'. But yet when I run the query of
    Select * from employee where FirstName = 'anthony'
    within the mysql commandline I get the proper result. So my question is why when running this in the command line do I get the proper result but when running the code I do not?

    jo**** wrote:
    Hi. The problem is clear in the original post. The OP is trying to use PreparedStatement
    parameters to fill out general portions of the SQL query, instead of only data values.
    He is hoping to put in a column name. That will never work. Only data values are settable.
    HTH,
    Joe WeinsteinActually, no. There's no PreparedStatement there at all. It appears that his problem is that, while the working query entered directly in the client is
    Select * from employee where FirstName = 'anthony'the query he's constructing in his code is
    Select * from employee where FirstName = anthonySince there are no quotes around anthony, it's treated as a column name.
    If he had properly used PreparedStatment as suggested in reply 1, that would not be an issue. My guess, however, is that when he claims he's using PS, it's as Tolls suggested a couple of posts ago--he's simply replacing the Statement with a PreparedStatement, but not using the parameters as suggested.
    The wrong thing for OP to do at this point is see my above comment about the quotes and explicitly add them in the query string. The right thing to do, of course, is to actually use PS's parameters.
    Edited by: jverd on Oct 11, 2010 10:08 AM

  • Select query based on joining of tables from different database is taking too long

    Hi Team,
    Select query on table with millions of records is taking very long time. It took 50mins, the below query is joining on multiple table from two databases DB1.dbo.Table1 contains 100 million records and also Table3 and Table4 (of different database) might
    contain close to 1million records.
    Select T1.*
    From DB1.dbo.Table1 T1
    Join DB1.dbo.Table2 T2 on RTRIM(T1.Col3) = RTRIM(T2.Col3)
    Join Table4 CA on RTRIM(T1.Col1) + T2.Col2 = CA.Col1
    Join Table3 U on CA.Col2 = U.Col2 AND RTRIM(T2.Col2) = U.Col3
    Where U.Col4 NOT IN ('A1', 'A2', 'A3', 'A4', 'A5', 'A6','A7','A8','A9')
    And (T1.flg IS NULL OR T1.flg = 'N')
    And LTRIM(RTRIM(T2.Col2)) NOT IN ('B1','B2')
    How can i improve the performance of this query. Actual thing is update the data in Db1.dbo.table1 based on the conditions but if the select is taking close to 1hr then update will take hours together. Indexes already implemented on all the tables.
    Thanks,
    Eshwar.
    Please don't forget to Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful. It will helpful to other users.

    Thanks.
    Join Table4 CA on RTRIM(T1.Col1) + T2.Col2 = CA.Col1
    This join is not working with spaces if Rtrim is not used.
    Thanks! Eshwar.
    Please don't forget to Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful. It will helpful to other users.

  • Select data from another database

    Hi,
    Is it possible to retrieve data from a table from another database?
    For instance, I have two databases db_1 and db_2
    I login to the database db_1 using
    sqlplus username/psw@db1
    and to the database db_2 using
    sqlplus username/psw@db2
    In SQL> db1 I would like to use select statement from a table in the db2. Is it possible?
    Another question:
    I have two tablespaces TP1 and TP2 in the database db1
    The TP1 is my default tablespace.
    Can I switch from TP1 to TP2 tablespace in the sqlplus?
    If not, how can I select all tables obtained in the TP2? Or how can I select data from a table in the TP2?
    Thanks

    I don't know how to create a db link.<br>
    SQL Reference Guide - CREATE DATABASE LINK<br>
    There are some examples in the doc above.<br>
    <br>
    What about if db1 and db2 have the same table name?<br>No problem, exactly like when you have two same table name accross two schemas on same database. The table suffixed by the dblink name come from the other schema of other database (schema which you use to connect through the dblink to the other database).<br>
    <br>
    Nicolas.

  • Select data from different database

    hi,
    may I know how to select data from different database?
    for example,
    I've 2 databases, OracleDB and OracleAR
    Connect with OracleAR in SQL*Plus
    select * from OracleDB.TableName
    does Oracle support this kind of query?
    how can I retrieve data from other database while im connecting with
    other database?

    Hi,
    Yes, it's possible. No, your syntax won't work.
    First of all you have to define a DATABASE LINK inside the DB where you are already connected (in this case OracleAR). Read docs how to do that.
    Second thing is the query. It will look like
    SELECT * from TableName@<NameOfDatabaseLink>Greetings,
    Guido

  • Database Adapter: Selecting all data from table

    Hi All
    I am new to SOA Suite and I am using Soa Suite version 10.1.3.1 and Jdev version 10.1.3.3. It is required to select data from one database using the database adapter and insert it in a table in another database. I implemented the flow using DBadapters select operation the problem is everytime I am running the instance it transfers only one row though no condition has been specified on the select. Could anyone please help me out and let me know how to transfer a complete table from one database to another using DBadapters and in a single instance.
    Thanks

    Well Stupid me, got the answer, I think m just at the begining of the learning curve.

  • Problem in select systimestamp from dual

    In oracle 9i
    When I run following block it showing length of the variables are different.
    In case of second variable three extra zero(0) is padded at the end.
    declare
    l_length Number :=0;
    l_var1 VARCHAR2(40):=NULL;
    l_var2 VARCHAR2(40):=NULL;
    begin
    select to_char(systimestamp, 'yyyymmddhh24missff') into l_var1 from dual;
    l_var2:=to_char(systimestamp, 'yyyymmddhh24missff');
    dbms_output.put_line('l_var1 = '||l_var1);
    dbms_output.put_line('l_var2 = '||l_var2);
    end ;
    Sample output:
    l_var1 = 20070920102445365253
    l_var2 = 20070920102445365409000
    Can some one please explain why length of the variables are different ?
    And let me know how many cases the out comes are different
    Thanks.........

    What about
    SQL> declare
      2  l_length Number :=0;
      3  l_var1  VARCHAR2(40):=NULL;
      4  l_var11 VARCHAR2(40):=NULL;
      5  l_var12 VARCHAR2(40):=NULL;
      6  l_var2  VARCHAR2(40):=NULL;
      7  l_var21 VARCHAR2(40):=NULL;
      8  l_var22 VARCHAR2(40):=NULL;
      9  begin
    10  select  to_char(systimestamp, 'yyyymmddhh24missff6') into l_var1 from dual;
    11  select  to_char(systimestamp, 'yyyymmddhh24missff9') into l_var11 from dual;
    12  select  to_char(systimestamp, 'yyyymmddhh24missff') into l_var12 from dual;
    13  l_var2:=to_char(systimestamp, 'yyyymmddhh24missff6');
    14  l_var21:=to_char(systimestamp, 'yyyymmddhh24missff9');
    15  l_var22:=to_char(systimestamp, 'yyyymmddhh24missff');
    16  dbms_output.put_line('l_var1 6 = '||l_var1);
    17  dbms_output.put_line('l_var1 9 = '||l_var11);
    18  dbms_output.put_line('l_var1   = '||l_var12);
    19  dbms_output.put_line('l_var2 6 = '||l_var2);
    20  dbms_output.put_line('l_var2 9 = '||l_var21);
    21  dbms_output.put_line('l_var2   = '||l_var22);
    22  end ;
    23  /
    l_var1 6 = 20070920122434296183
    l_var1 9 = 20070920122434296325000
    l_var1   = 20070920122434296416
    l_var2 6 = 20070920122434296483
    l_var2 9 = 20070920122434296554000
    l_var2   = 20070920122434296604000
    PL/SQL procedure successfully completed.[pre]
    Nicolas.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Select records from one database and insert it into another database

    Hi
    I need to write a statement to select records from one database which is on machine 1 and insert these records on a table in another database which is on machine 2. Following is what I did:
    1. I created the following script on machine 2
    sqlplus remedy_intf/test@sptd @load_hrdata.sql
    2. I created the following sql statements in file called load_hrdata.sql:
    rem This script will perform the following steps
    rem 1. Delete previous HR data/table to start w/ clean import tables
    rem 2. Create database link to HR database, and
    rem 3. Create User Data import table taking info from HR
    rem 4. Drop HRP link before exiting
    SET COPYCOMMIT 100
    delete from remedy.remedy_feed;
    commit;
    COPY FROM nav/donnelley@hrp -
    INSERT INTO remedy.remedy_feed -
    (EMPLID, FIRST_NAME, MI, LAST_NAME, BUSINESS_TITLE, WORK_PHONE, -
    RRD_INTRNT_EMAIL, LOCATION, RRD_OFFICE_MAIL, RRD_BUS_UNIT_DESCR) -
    USING SELECT EMPLID, FIRST_NAME, MI, LAST_NAME, BUSINESS_TITLE, WORK_PHONE, -
    RRD_INTRNT_EMAIL, LOCATION, RRD_OFFICE_MAIL, RRD_BUS_UNIT_DESCR -
    FROM ps_rrd_intf_medium -
    where empl_status IN ('A', 'L', 'P', 'S', 'X')
    COMMIT;
    EXIT;
    However, whenever I run the statement I keep getting the following error:
    SP2-0498: missing parenthetical column list or USING keyword
    Do you have any suggestions on how I can fix this or what am I doing wrong?
    Thanks
    Ali

    This doesn't seem to relate to Adobe Reader. Please let us know the product you are using so we may redirect you or refer to the list of forums at http://forums.adobe.com/

Maybe you are looking for

  • AirPort Utility says no devices found, but 2 are hooked up and running

    When I AirPort Utility I'm getting the message "AirPort Utility was unable to find any AirPort wireless devices. Make sure the AirPort wireless device you want to set up is plugged in and in range of your computer, and then click rescan to try again.

  • Can't update library item in object library

    I used to be able to update library items, and did so often. Now the "Update library item" option is not just grayed out-- it's gone from the panel menu. In order to update an item, I have to drag it to the page, update, then delete the corresponding

  • Excel output

    Hi All, We are reading the reports output through after report trigger and spooling the data into a excel file using OLE2 package. When we are spooling the excel data containing Arabic language literals few of the literals are not coming correctly an

  • Detecting Rotation Amount to Control Movie Clips

    I created a movie clip consisting of a bar and a knob.  When you click and drag the knob, the bar rotates through 360 degrees.  I want to be able to detect the degree of rotation and use that metric to control other movie clips.  The code to make the

  • Ipod not showing in itunes

    This is for OS Leopard using Powermac G5. I attached my classic ipod via usb, but showed no signs of it being there. Maybe may Ipod is too new for this version of iTunes. I just wondered if anyone else has tried this.