How to Access v$ views from inside PL/SQL?

I cannot grant select on these v$'s for users. Could someone recommned a solution for something like:
function conn_cnt(v_name in varchar2, v_stat varchar2) return number
is
p_val number := 0;
begin
EXECUTE IMMEDIATE
'SELECT COUNT(*) FROM V$SESSION WHERE ' ||
'USERNAME = :1 AND STATUS <> :2 ' ||
'AND SID NOT IN (SELECT SID FROM V$MYSTAT WHERE ROWNUM < 2)'
INTO p_val USING v_name, v_stat;
return p_val;
exception
when others then
raise_application_error(-20011, sqlerrm);
end;
Thanks.

Thanks John,
but:
SQL> conn sys as sysdba
Enter password:
Connected.
SQL> grant select on v$session to <id>;
grant select on v$session to <id>
ERROR at line 1:
ORA-02030: can only select from fixed tables/views
- Zack

Similar Messages

  • How to Access Maintenance View from a program

    Hi Experts,
    I have created a maintenance view for a table. i want to insert data's into the table through the maintenance view. I don't know how to access the view, how to insert data into the Maintenance view. Please suggest me how to access the view from the program.
    with regards,
    James...
    Valuable answers will be rewarded...

    Hi,
    What is the need to search for a program.
    Use transaction SM30 or SE16 to create or maintain entries in the table.
    e.g. if the Maintenance view is created on table A, then Goto transaction SM30 or SE16 and give the table name as A and proceed. This will automatically take u to the maintenance view on tha table A.
    Regards,
    Himanshu

  • How to Access the view from another Component

    Hi,
    Seek your advice on this following requirement.
    1. Would like to add the view OVWindow of Component BTCATEGORIES in an assignment block of 
        CRMCMP_CMG similar to the assignment block exists in the BT116H_SRVO component.
    2. Please provide the step by step procedure to implement this requirement.
    Regards,
    Arif

    Hi,
       I am having view1 and view2.
      in view1 i am using roadmap. S1 is one of the step of road map.
      in view1 i used this code to get the reference of this view in componentcontroller attribute
    Data: lo_api TYPE REF TO if_wd_view_controller.
    If first_time = 'X'.
    lo_api = wd_this->wd_get_api( ).
    wd_Comp_Controller->my_VIEW = lo_api.
    endif.
    in my view2 i want to access the roadmap step
    i dono how to access that.. i used this code.......
             wd_comp_controller->my_view->get_element( 'S1' ).
    is this correct.. If not what is the code to get that id..
    Can any one tell me clearly...

  • How to access external IPs from inside

    Hello,
    We have several servers that we NAT to internal IPs on the inside interface. Normally we just setup DNS on the inside to point to the private IPs.
    But I have always been curious, how do you configure the ASA so a host on the inside can talk to a public IP address behind that same ASA?

    AAArrrrgggghhh!!! I misread the original post.
    But for Karthik's suggestion to work, DNS requests would need to pass through the ASA to a DNS server in either a DMZ or out on the internet.  If DNS requests do not pass through the ASA then you will need to NAT the public IP to the private IP on the inside interface in a hairpinning manner.
    Keep in mind that when using DNS doctoring you would need to have an ACL permitting traffic from the internal IP to the private IP of the server if traffic is being denied to the private IP.
    For NATing the public IP to the private IP on the inside interface you could do something like the following:
    object network SERVER
      host 10.0.0.100 (keeping with Karthik's example ;-)  )
    object network LAN
      subnet 192.168.100.0 255.255.255.0
    object network SERVER-PUB-IP
      host 1.1.1.1
    same-security-traffic permit intra-interface
    nat (inside,inside) source static LAN LAN destination static SERVER SERVER-PUB-IP
    Please remember to select a correct answer and rate helpful posts

  • How to access a variable from inside another symbol

    So i did this tutorial, Leveraging Independent Symbol Timelines created by Eliane...it's rockin, btw.  ;-)
    All's well but now i have a symbol on the stage called mc-home.  inside of mc-home is a button called btn-go.
    On the stage in composition ready there's a variable sym.setVariable("current", "mc-home");
    This code works for a symbol that's on the stage but, how do i get this code to work on a button that's inside another symbol that's on the stage?
    var current = sym.getVariable("current");
    if (current != "") {
        sym.getSymbol(current).play("OUT");
    sym.getSymbol("mc-something").play("IN");
    sym.setVariable("current", "mc-something");

    sorry, i was kind of confused myself too, don't worry about it but thanks for your patience for reading it anyway

  • How to access design view in DW CC?

    I am new to DW and am working in fluid grid. tutorial references design view (maybe with a toggle switch) - cannot find how to access 'design view'. any help would be appreciated.

    If you use CC 2014.1 (October release) or 2014.1.1 (February release)  you can't get to Design View b/c it was removed from FGLayouts.
    New Features in CC 2014.1 October Release
    http://helpx.adobe.com/dreamweaver/using/whats-new.html
    New Features in CC 2014.1.1 February Release
    https://helpx.adobe.com/dreamweaver/using/whats-new.html#Enhancements%20to%20Live%20View%2 0editing
    Nancy O.

  • Access database view from JPA to HANA database, JDBC: [258]: insufficient privilege:

    My java application is delopyed on neo.ondemand.com and use the hana database on cloud also, we use eclipselink
    the jpa persistence configuration:
    <property name="eclipselink.target-database" value="com.sap.persistence.platform.database.HDBPlatform"/>
    here i do not specify any user or password to access the database, i think hana JDBC somehow hide the user information when java application and hana database both are on the cloud.
    for the tables created by JPA itself, access if fine.
    now i have created a view via Hana studio, though database tunnel using account  dXXXXXXsapdev
    i have an JPA entity, and i am trying to access the view from java application, it reports error:
    Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [258]: insufficient privilege:
    I do not know which database user is used by JPA to access the view, how can i grant the database rights on the view so that "native java application on cloud" can
    access the database schema (or view created though database tunnel )
    any comment is welcomed.

    Hi,
    Please post this issue under SAP HANA Cloud Platform space. The platform experts should be able to help with that.
    Regards,
    Ifat.

  • How to access the cloud from my pc?

    how to access the cloud from my pc?

    Go to Verizonwireless.com, log in to your account (or register your phone number if you haven't done so).  Once logged in, Go to My Verizon, My Device, Backup my contacts.  That should bring you to your Cloud "dashboard" - where you can view Contacts, Photos, Videos, Music,Documents, and anything else  you've sent to Verizon Cloud.
    If this doesn't work for you, then where does it break down?  Do you get any error messages?

  • How to access Cyrillic glyphs from Trajan Pro 3 Regular?

    I can download Trajan Pro3 regular in greek and latin glyphs but not in Cyrillic. Using Mac OS 10.7.5, Font Agent Pro 6.010.
    No EULA Licence Agreement in russian, but Adobe told me I bought the right font (with cyrillic glyphs).

    Thank you a lot.
    The first downloading was not correct. I loaded again, and now it is ok.
    Best regards
    Catherine Anderegg
    Anderegg Graphic
    Le 23 févr. 2015 à 21:10, MiguelSousa a écrit :
    How to access Cyrillic glyphs from Trajan Pro 3 Regular?
    created by MiguelSousa in Adobe Type - View the full discussion
    Yes, the Trajan Pro 3 fonts have Cyrillic glyphs in them. You need to use Unicode-encoded text to get to them.
    Википедия
    Cyrillic script in Unicode
    If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7222734#7222734 and clicking ‘Correct’ below the answer
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7222734#7222734
    To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"
    Start a new discussion in Adobe Type by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • How to call a view from Interface view

    Folks,
    How to call a view from interface view (onPlugDefault method) . I was trying to set context of controller but it is not working . What is the work around.
    Manish

    Hi Manish,
    An interface view is created for each window that you have, which in-turn has views embedded, one of which is default. If you want to pass data which you have in your interface view, do the following
    - Add your component controller in your interface view properties
    - In the onPlugDefault method(I assume this is where you have the data available through URL parameters),set the component controller context variables like
    wdThis.wdGetComContr.wdGetContext().currentContextElement().setName("John");
    -Access these context variables in your view as well by adding the component controller as the required controller
    Your default view will appear automatically when you call the application.
    Regards,
    LM

  • How to refer one view from another view?

    Hi,
    I have 2 views in my Adobe Flash Builder mobile app. I need to refer the first view in my second view.
    How to refer one view from another view? Or how to create a reference to a view wherever needed?

    I don't need any data from my first view. In a certain flow, I need to make my first view to be invisible.
    for eg., My First view is in portrait mode. I change the device to Landscape. In the landscape mode, I want to show a completely different view (second view).
    In this case, what happens is, I see my first view in Landscape mode for a second. Then the second view appears. When I change to Landscape mode, only the second view should be seen. I need to make my first view to be completely invisible in the OnOrientationChanging event of
    StageOrientationEvent
    As stage object and StageOrientationEvent works at application level, I need to know how to refer my first view object in the application level.
    private function onOrientationChanging(soe:StageOrientationEvent):void
          MyFirstView.Visible = False; ====> don't know how to refer MyFirstView here
    Is my question clear now?

  • How to delete a view from a enhanced component?

    I wish to know the possibility of deleting a view from a enhanced component.
    I have two components IUICMD & IUICMRD. I have enhanced 4 views in the first component IUICMD using enhancement set ZCRM_ENHSET. There is no problem with that. But when i try to use the same enhancement set ZCRM_ENHSET for enhancing the second component IUICMRD, it's enhanceable in enhancement set. But 2 views IUICRMD/Meterreading & IUICMRD/MainVS is also copied to first component and available as enhanceable views in First component.
    I want to delete those views from the first component. Let me know How to delete a view from a enhanced component?
    Regards,
    Prabahar

    Hi Raju,
    If you do not need those enhancment views in any of the components ( ie IUICMD & IUICMRD ) , then open the BSP application in SE80 , under controller, there will be files with extension .do as yourviewname.do ...delete those !! These will not dele the Z classes....but just deletes their presence from the BSP...
    I would suggest following approch :
    1) go to SM34 , open BSPWDVC_CMP_EXT....Select you enhancement set and click on enhancement defination in leftside panel.
    2) now select the IUICMRD and CLICK ON CONTROLLER SUBSTITUTION...
    3) now you will see all the enhancement available for that component...Delete the entries for those two views from there...
    This is just deleting the entries...this does not delete any objects from the system.
    4)Now click on Back arrow, and delete the entry for IUICMRD...save.
    5) Now open BSPWD_CMP_WD for IUICMRD...you will get the enhance component button... You can now freshly enhance this component..
    6) We did not touch to the entries for IUICMD  in the BSPWDVC_CMP_EXT...So now if you open the component IUICMD in workbench with you enhancement set...you will see all the enhancement..including those two views which you wanted to delete from IUICMRD.
    7) If you want to delete the enhancement for these views...then right click on the enhance views and select Delete enhancement...You will get a popup listing IMPL, CTXT and CN classes, select all Z entries in the pop up and those all will be deleted physically from the system...and thus view enhancement will be rolled back...
    All the best !!
    Thanks & Regards,
    Suchita
    If you are not sure, you can create copy of IMPL, CTXT and CN classes in se80 and then proceed for deletion..You can also make copy of entire BSP in se 80 before deletion...

  • How to access a view object under a nested appmodule in servlet

    Hi,
    Can anyone tell me how to access a view object under a nested appmodule in a servlet?
    I know that I can use
    ApplicationModule app = Configuration.createRootApplicationModule(amDef, config);
    ViewObject vo = app.findViewObject(viewObjectName);
    to get hold of an appmodule and view object.
    But in a nested appmodule, for example, I have am0 as root, am1 as child, and voZ within am1, what should I use for this amDef? config? and viewObjectName?
    Your help would be much appreciated.

    Hi,
    http://radio.weblogs.com/0118231/stories/2005/07/19/nestedApplicationModules.html
    Frank

  • How to access Oracle 8g from SQL Server 2005 SP3 EE 64 Bits ?

    Dear All,
    How to access Oralce 8g from SQL Server 2005 SP3 EE 64 Bits (liked server).
    Best regards,
    Miguel Gavinhos

    Hi!
    For the Oracle version is 8.1.6. what should I install, to access Oracle trought a linked server.
    Best regards
    Miguel Gavinhos

  • How to access the Oracle from Unix when SID is not provided?

    How to access the Oracle from Unix when SID is not provided.
    User Name : xxx
    Password : yyy
    SID : SID
    I use to access it using below command from Unix prompt:
    sqlplus xxx/yyy@SIDNow since I dont have SID, how to access the Oracle DB from Unix Box?
    User Name : xxx
    Password : yyy
    Service Name : zzz
    Regards,
    Sunny.

    Hi Ajay
    Thanks for the suggesstion :)..It worked as well.
    The Actual problem was in the "tnsnames.ora" file where in I need to make entry for the new SERVICE name.
    Now I am able to connect it properly.
    Regards,
    Sunny.

Maybe you are looking for

  • How to get a custom screen capture size smaller than my slide size

    Hi, I'm trying to capture a fixed sized screen on my computer (a softphone) for use in a youtube hd size format training video. I can't seem to figure out how to customize the size of my screen capture so it fits only around the phone and leaves me b

  • Slow Moving Project Stock

    Hi, My problem is to find out slow moving project stocks. Report MC46 shows only slow moving normal stocks and project stock is not included in this. Thanks

  • NetInstall - am I missing something obvious here?

    Hi, Just trying to get NetInstall service working on my 10.5 server. I have succesfully created an image using the SIU, and I saved this image to a seperate partition on the servers disc, away from the OS partition, as SIU allowed me to do this. In t

  • BPEL Error in SOA approval process

    Hi, In my composite workflow, i have added a java code to get manager email id from manager login to send an email notification to manager. I have set Oimclient.jar and Jps-manifest.jar in class path and successfully deployed the workflow. When i hav

  • Additional Results

    I was following the following tutorial: "Logging Additional Results tp TestStand Database" http://www.ni.com/tutorial/14595/en/ When I got to Method 1, Step 3, I tried to enter a Custom Name for the data. The Name I enter always remains red. Even whe