System view is gone!

Hi all,
I want to create a view with a script as following,
CREATE VIEW DP_STATISTIC AS
SELECT 'S' STAT_TYPE, STATISTIC# STAT_NUM, NAME STAT_NAME FROM V$STATNAME
UNION ALL
SELECT 'E' STAT_TYPE, EVENT# STAT_NUM, NAME STAT_NAME FROM V$EVENT_NAME;
It comes out with an error message,
ERROR at line 2:
ORA-00980: synonym translation is no longer valid
And, I try to see the object and it is not there,
SQL> desc V$STATNAME
ERROR:
ORA-04043: object SYSTEM.V_$STATNAME does not exist
How can I brin it back?
from $ORACLE_HOME/rdbms/admin , should I run sql script from this directory?
and if so, what scripts should I run?
thanks in advance!

Hi,
Since V$STATNAME and V$EVENT_NAME are synonyms, you need to give grant select on V_$STATNAME and V_$EVENT_NAME :
  1* select * from dba_synonyms where synonym_name in ('V$STATNAME', 'V$EVENT_NAME')
SQL> /
OWNER                          SYNONYM_NAME
TABLE_OWNER                    TABLE_NAME
DB_LINK
PUBLIC                         V$STATNAME
SYS                            V_$STATNAME
PUBLIC                         V$EVENT_NAME
SYS                            V_$EVENT_NAMEWith user H89UCBAC :
SQL> CREATE VIEW DP_STATISTIC AS
  2  SELECT 'S' STAT_TYPE, STATISTIC# STAT_NUM, NAME STAT_NAME FROM V$STATNAME
  3  UNION ALL
  4  SELECT 'E' STAT_TYPE, EVENT# STAT_NUM, NAME STAT_NAME FROM V$EVENT_NAME;
SELECT 'S' STAT_TYPE, STATISTIC# STAT_NUM, NAME STAT_NAME FROM V$STATNAME
ERROR at line 2:
ORA-01031: insufficient privilegesWith user sys :
  1* grant select on V_$STATNAME to H89UCBAC
SQL> /
Grant succeeded.
SQL> grant select on V_$EVENT_NAME to H89UCBAC;
Grant succeeded.With user H89UCBAC :
SQL> CREATE VIEW DP_STATISTIC AS
  2  SELECT 'S' STAT_TYPE, STATISTIC# STAT_NUM, NAME STAT_NAME FROM V$STATNAME
  3  UNION ALL
  4  SELECT 'E' STAT_TYPE, EVENT# STAT_NUM, NAME STAT_NAME FROM V$EVENT_NAME;
View created.
SQL> select count(*) from DP_STATISTIC;
  COUNT(*)
       665
SQL> desc DP_STATISTIC
Name                                      Null?    Type
STAT_TYPE                                          CHAR(1)
STAT_NUM                                           NUMBER
STAT_NAME                                          VARCHAR2(64)
SQL> Nicolas.

Similar Messages

  • Why can't I use the "Company Name" of the lead entity for System Views?

    I just wanted to add a new colum for the system view "All Leads". As i scrolled through i missed the field "company name". So i checked the systemname of the field and it was the same. I got back to the Views and tried to change another
    existing view and the same there: the field company name was not accessible. 
    So to proof that there is something wrong I created a new view for leads. In the new view i can choose the field company name and use it as expected. 
    So whats the reason i cant use it for existing views? It makes no sense at all!
    Greetz

    Hi Everyone,
    This issue exists in CRM 2015 as well.
    Now it is really frustrating as this issue started occurring from
    CRM 2013 and still its not yet fixed.
    Does anyone has any idea that when this issue will be fixed by Microsoft ?
    Thanks,
    Ravi

  • Want to know what is the use of system view

        
    i want to know what is the usage of these types of views in mds (viw_SYSTEM_1_1_CHILDATTRIBUTES)
    and what are the disadvantage of using them for exporting the data 
        

    These are system views and should be used or referenced in any downstream application

  • Grant system views to app user

    Hi all,
    11.2.0.1
    Tha batch process at night encounters lock problem hence their report generations affected and delayed.
    I give the operators this command, so that they will kill or stop the process holding the lock:
    SELECT TO_CHAR(sysdate,'DD-MON-YYYY HH24:MI:SS')||' User '||s1.username||'@'|| s1.machine||' ( SID= '|| s1.sid||
            ' ) with the statement: '||sqlt2.sql_text||' is blocking the SQL statement on '||s2.username||'@'||s2.machine||
            ' ( SID='||s2.sid||' ) blocked SQL -> '||sqlt1.sql_text AS blocking_status
       FROM Gv$lock l1,Gv$session s1,Gv$lock l2,Gv$session s2,Gv$sql sqlt1,Gv$sql sqlt2
      WHERE s1.sid =l1.sid
        AND s2.sid =l2.sid
        AND sqlt1.sql_id= s2.sql_id
        AND sqlt2.sql_id= s1.prev_sql_id
        AND l1.BLOCK =1
        AND l2.request > 0
        AND l1.id1 = l2.id1
        AND l2.id2 = l2.id2;
    But this needs system views and can not run to the app user id.
    In connection to the ruling of security audit or without breaching it , do I need to grant select to all the system views being accessed by this script to the app user, then create synonyms to it 1 by 1?
    Or is there a one time grant for all system views? So I do not need to type one  by one plus creating the synonyms so that I may not miss any?
    Thanks,
    petra k.

    f55237a7-2c38-4db3-a7a3-1d77256f0730 wrote:
    Hi all,
    11.2.0.1
    Tha batch process at night encounters lock problem hence their report generations halted.
    I give the operators this command, so that they will kill or stop the process holding the lock:
    SELECT TO_CHAR(sysdate,'DD-MON-YYYY HH24:MI:SS')||' User '||s1.username||'@'|| s1.machine||' ( SID= '|| s1.sid||
            ' ) with the statement: '||sqlt2.sql_text||' is blocking the SQL statement on '||s2.username||'@'||s2.machine||
            ' ( SID='||s2.sid||' ) blocked SQL -> '||sqlt1.sql_text AS blocking_status
       FROM Gv$lock l1,Gv$session s1,Gv$lock l2,Gv$session s2,Gv$sql sqlt1,Gv$sql sqlt2
      WHERE s1.sid =l1.sid
        AND s2.sid =l2.sid
        AND sqlt1.sql_id= s2.sql_id
        AND sqlt2.sql_id= s1.prev_sql_id
        AND l1.BLOCK =1
        AND l2.request > 0
        AND l1.id1 = l2.id1
        AND l2.id2 = l2.id2;
    But this needs system views and can not run to the app user id.
    In view of the security audit or without breaching it , do I need to grant select to all the system views being accessed by this script to the app user, then create synoyms to it 1 by 1?
    Or is there a one time grant for all system views? So I do not need to type one  by one so that I may not miss any?
    Thanks,
    petra k.
    while posted approach will eventually work, it is like making three left turns around the block;
    instead of making a single right term.
    Place the desired SQL into a procedure (FIND_LOCKER) owned by highly privileged schema; then do as below
    GRANT EXECUTE ON FIND_LOCKER TO OPERATOR_USER;

  • System Volume is "gone"

    Hello everybody, for a couple of days now, my system volume is "gone". It isn´t displayed on my dekstop nor on the finder anymore. When I try to open a file in the open file promt of any software from the volume I got the message that the volume is either unavaible or unvalid (something ike that, i´ve got the german version) I already installed all software updates.
    What else could I try?
    thanks for your input
    musicmacher

    Hi!
    Try using Disk Utility to do a Disk Repair, as shown in this link, while booted up on your install disk. Does it show up?
    You could have some directory corruption. Let us know what errors Disk Utility reports and if DU was able to repair them.
     Cheers! DALE

  • Check query used to create system views

    Hi Group,
    I would like to know if there is any way to check the TSQL query used by SQL to create system views. I know for user created views, you can open it in Designer or script the view. Use SQL 2012 as an example when selelcting the top 1000 records no underlyng
    query is visible.
    Thanks and Regards,

    You can see most of them using sys.all_objects and sys.system_sql_modules.  For example
    select o.name, m.definition
    from sys.system_sql_modules m
    inner join sys.all_objects o on m.object_id = o.object_id
    where o.name = 'dm_exec_requests'
    Be very careful that you don't ever run the code that creates the view.  There are additional tricks behind the scene that give some system views special actions.  So if you run the code, your code might not work the same way as the original system
    view.
    Also, anything which is not documented can be changed by Microsoft at any time.
    Tom

  • System view for t528c has been modified from pm01.how to restore it into ol

    System view for t528c has been modified from pm01.how to restore it into old manner.

    Hi,
    <li>There is a Maintenance view for t528c table. That is V_T528C. You can go to SM30 and give V_T528C and go in and delete the entries news created.
    Let me know if you need any help.
    Thanks
    Venkat.O

  • My pc has win the operating system view, which does not support lightroom 5. I want to buy version 4

    My pc has win the operating system view, which does not support lightroom 5. I want to buy version 4?

    Thank you, Jim, for your prompt reply. Amazon has it for $151.99, Ebay has a few copies that end up being about as expensive after international shipping and other fees, and I don't trust most of the other sites after reading reviews on them. Looks like I'm going to have to fork out some dollars. How unfortunate.
    Thanks again,
    Michelle

  • My system preferences has gone frozen and im not computer savvy whats going on peeps ??

    my system preferences has gone frozen and im not computer savvy whats going on peeps ??

    Welcome to the Apple Support Communities
    Open  > Force Quit and close System Preferences. Then, it should work correctly

  • Asynchronous Notifications: System Views?

    Let's say I have a 9.2.0.5. queue that I know has some asynchronous notifications registered.
    How do I find out what those are? What system view lists them?
    How can I add another notification to those that already exist? (It seems as though DBMS_AQ.register simply replaces those that exist).
    Thank you for your time!

    Lars,
    On further investigation, what you say above is true if the view is a CUBE, but the description does not display in that table for DIMENSION views.
    Is there somewhere else to look in that case ?
    Many Thanks again ........

  • With 2008 - What would be the 'best practice' approach for giving a principal access to system views

    I want to setup a job that runs a few select statements from several system management views such as those listed below.  Its basically going to gather various metrics about the server, a few different databases and jobs.
    msdb.dbo.sysjobs
    msdb.dbo.sysjobhistory
    sys.dm_db_missing_index_groups
    sys.dm_db_missing_index_group_stats
    sys.dm_db_missing_index_details
    sys.databases
    sys.dm_exec_query_stats
    sys.dm_exec_sql_text
    sys.dm_exec_query_plan
    dbo.sysfiles
    sys.indexes
    sys.objects
    So, there a number of instance-level permissions that are needed, mainly VIEW SERVER STATE
    https://msdn.microsoft.com/en-us/library/ms186717.aspx
    Granting these permissions to a single login seems like introducing a maintenance headache for later.  What about a server role?
    Correct me if Im wrong, but this is a new feature of 2012 and above, the ability to create user-defined server roles.
    Prior to version 2012, I will just have to settle for granting these instance-level permissions to individual logins.  There wont be many logins that need this kind of permissions, but id rather assign them at a role level then add logins to that role.
     Then again, there is little point in creating a seperate role if there is only 1...and maybe 2 logins that might need this role?
    New for 2012
    http://www.mssqltips.com/sqlservertip/2699/sql-server-user-defined-server-roles/

    Just as any Active Directory Administrator will tell you you should indeed stick to the rule - "user in role- permissions to role" - in AD terms "A-G/DL-P. And since this is very much possible since SQL Server 2012 why not just do that. You
    lose nothing if you don't ever change that one single user. In the end you would only expect roles to have permissions and save some time when searching for permission problems.
    i.e.
    USE [master]
    GO
    CREATE SERVER ROLE [role_ServerMonitorUsers]
    GO
    GRANT VIEW SERVER STATE TO [role_ServerMonitorUsers]
    GO
    ALTER SERVER ROLE [role_ServerMonitorUsers]
    ADD MEMBER [Bob]
    GO
    In security standardization is just as much key as in administration in general. So even if it does not really matter, it may matter in the long run. :)
    Andreas Wolter (Blog |
    Twitter)
    MCSM: Microsoft Certified Solutions Master Data Platform, MCM, MVP
    www.SarpedonQualityLab.com |
    www.SQL-Server-Master-Class.com

  • System settings icon gone

    My system settings icon is gone from my first home page.  Any way to get it back without doing a system restore?  Thanks.

    - Try a reset, nothing will be lost.
    Reset iPod touch:  Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    - Have you tried using the Spotlight search feature to try tofind it.  It is likely somewhere andyy just can't find it since theSynstem app can't be deleted or hidden.
    - Reset the screen layout: Settings>General>Reset>Reset Screen Layout.

  • System Administrator Responsibilty Gone???

    Hi Hussein,
    OS= AIX 5L
    EBS 11i (11.5.10.2)
    I have just finished installing our new Fresh Install EBS 11i for new setup. Then I turned it over to the Functional
    Analysts for them to start the Apps Setup. But suddenly they called me informing the "System Administrator Responsibility" was gone. I checked it then, and true enough it can not be found in any of the login userids and in any responsibility, even in the SYSADMIN userid. But it was existing before. I dont know what have they done.
    What could have gone wrong? huhhuhu :( please help.
    Is it possible to delete the System Administrator Responsibility?
    Thanks

    Hussein,
    Is this correct substitution parameter? APPS & SYSTEM_ADMINISTRATOR?
    update wf_user_role_assignments
    set user_end_date=null,
    role_end_date=null,
    assigning_Role_end_Date=null,
    effective_end_Date=to_date('31-12-4712','dd-mm-yyyy')
    where user_name='APPS';
    update wf_user_role_assignments
    set user_end_date=null,
    role_end_date=null,
    assigning_role_end_Date=null,
    effective_end_Date=to_date('31-12-4712','dd-mm-yyyy')
    where role_name='SYSTEM_ADMINISTRATOR';
    update wf_local_user_Roles
    set user_end_date=null,
    role_end_date=null,
    effective_end_Date=to_date('31-12-4712','dd-mm-yyyy')
    where user_name='APPS';
    update wf_local_user_Roles
    set user_end_date=null,
    role_end_date=null,
    effective_end_Date=to_date('31-12-4712','dd-mm-yyyy')
    where role_name='SYSTEM_ADMINISTRATOR';
    tHANKS

  • System update icon gone

    After updating app's I notices that the"system update icon" is gone, how do I get it back, I've tried restarting, but no app
    Solved!
    Go to Solution.

    The icon appears only when an app or system requires an update. If it's gone you are up to date.
    Check
    Settings/about device/software updates.

  • File system and LR2 file system view summary

    Hello,
    Is there a way when navigating a directory via the Folders panel to click on the folder and get summary information about the contents of the folder both from a file system perspective as well as a Lightroom perspective?
    file system perspective: number of physical files supported by LR2 in the folder
    LR2 perspective: the number of files that have virtual copies, how many total virtual copies total, how many photos are in stacks, how many stacks, etc.
    Thanks,
    Matt
    -Windows XP x64 SP2
    -AMD Athlon 64 X2 Dual Core 6400+
    -4.00 GB of RAM
    -Lightroom Version 2.0 64-bit 481478 Camera Raw 4.5
    -Two Silicon Graphics GDM-5011P Monitors
    -Huey Pro with version 1.5 of their calibration/profiling software
    -Nvidia Evga 8800 GT graphics card with 512 MB of Video RAM
    -Monitor One: The 'normal' Lightroom window in either the Library or Develop Module
    -Monitor Two: 'Loupe-Normal' in 1:1 view

                   No, you can't specify an entire filesystem as something to cluster. I
              suggest using NFS or some shared filesystem and then running a cluster
              off of that.
                                       - Mike
              Michael Lenart wrote:
              >
              > yes
              > "Mike Benham" <[email protected]> wrote in message
              > news:[email protected]..
              > >
              > >
              > >
              > > I'm not sure if I understand what you're asking. How can you cluster a
              > > filesystem? It seems like you want to mount some filesystem via NFS and
              > > then access that from each instance of a server? Are you asking if
              > > Weblogic can perform the duty of NFS?
              > >
              > > - Mike
              > >
              > >
              > > Michael Lenart wrote:
              > > >
              > > > Can the file system be clustered?? For example, in the cluster level
              > > > property file can I have a file system with the name of XDrive and then
              > use
              > > > that file system in my components??
              

Maybe you are looking for

  • Reverting to G4 whilst imac in for repair - and questions

    My intel Imac is having to go in for diagnostic work. So, I'm having to use the trusty old G4 in the meantime. My question is this: I have a cloned system of the intel mac on an external HD, but that is a cloned system of Leopard. So I won't be able

  • How can i get difference in base plan and actual/current plan for a project

    Hi PS Experts, How can i get difference in base plan and actual plan . For example- Project1 is created for 10 days (start and end date difference). Now in between -project is extended/changed for 12 days . What is the way to get 2 days as a differen

  • What steps required in OWB when source gets changed?

    Hi, I have a project with source module and target module with different mappings. Everything is working fine. Now I need to change my source database connection and execute the same mappings. What steps are required to implement this changes. Im ver

  • BSP Application Dump only when calling URL through Favorites

    Hi, We have a BSP application which works perfectly fine when we type in the URL in IE Address bar and we press enter. The standard logon screen displays; on entering the right credentials, the application goes through smoothly. However, the same URL

  • Purchased music lost

    I bought a song about 6 months ago. My roommate backed up the library, and rebuilt the computer. All of the other music I bought came back fine, after reloading it on the new library, but I am missing this one particular song. It shows in my purchase