User info from dba_users along with no. of objects.

QUERY 1 - wiill give the information about locked users locked date and etc.
select a.username,a.profile,a.account_status,a.created,a.lock_date,a.expiry_date,b.granted_role
from dba_users a, dba_role_privs b
where b.grantee in (select grantee from dba_role_privs where granted_role='DBA')
and a.username=b.grantee
and a.account_status='LOCKED'
and lock_date <= (sysdate-100)
order by a.username;
QUERY 2 - this will count the no. of objects in above locked users
select owner,count(*) from dba_objects
where owner in (select a.username
from dba_users a, dba_role_privs b
where b.grantee in (select grantee from dba_role_privs where granted_role='DBA')
and a.username=b.grantee
and a.account_status='LOCKED'
and lock_date <= (sysdate-100))
group by owner;
Is there any way i can get the above two outputs using only one query instead of using two saparate ... i tried using joins but not getting throug...plz suggest.

Handle:     user511621
Status Level:     Newbie
Registered:     May 24, 2006
Total Posts:     505
Total Questions:     129 (118 unresolved)
Why so many unanswered questions?
SELECT a.username,
       a.profile,
       a.account_status,
       a.created,
       a.lock_date,
       a.expiry_date,
       b.granted_role,
       c.owner,
       COUNT(owner)
FROM   dba_users a,
       dba_role_privs b,
       dba_objects c
WHERE  b.grantee IN (SELECT grantee
                     FROM   dba_role_privs
                     WHERE  granted_role = 'DBA')
       AND a.username = b.grantee
       AND a.username = c.owner
       AND a.account_status = 'LOCKED'
       AND lock_date <= ( SYSDATE - 100 )
GROUP  BY c.owner,
          a.username,
          a.profile,
          a.account_status,
          a.created,
          a.lock_date,
          a.expiry_date,
          b.granted_role
ORDER  BY a.username; Edited by: sb92075 on Mar 14, 2012 5:40 PM

Similar Messages

  • How to access a Portal User Info from a J2EE application?

    Hi,
    I have deployed a j2ee application in portal and its running fine.
    from that application i need to assign some roles to some users.i have the user id.
    so my doubt is can i access the portal user info from this j2ee application?i have some servlets in the j2ee application....can i get the portal user info from this servlet?
    plz help me
    regards,
    Visweswar

    Hi,
    Please check out this to get the portal user information from Java -
    WdClientUser class/Interface to aciehve this.
    Please check out these links on the same -
    WDClientUser.getClientUser IUser
    help needed
    Regards
    Lekha

  • How to get string from jtextpane along with its attributes

    sir,
    How to get string from jtextpane along with its attributes
    i,e font,size,style,color etc.
    please help me out.
    my mail id is [email protected]

    JTextPane extends JTextComponent
    JTextComponent.getDocument()
    a Document is a set of Element, see Document.getRootElements(). Each Element has attributes, stored within an AttributSet object see Element.getAttributes()
    a Document can also be rendered as a String, see Document.getText( offest, length ), use it with 0 and Document.getLength() as parameters.

  • FBA user's displaynames showing along with membership name.

    Hi All,
    Am using SharePoint 2010 site configured with both windows and Forms based authentications,
    Now when i logged in to the site with FBA user it shows the display name along with membership providers name,
    like this "i:0#.f|testuserprovider|Testuser1".
    Here the 'testuserprovider' is the membership provider name and 'Testuser1'
    is the excat FBA username.
    Previously it was displayed correctly as only the displayname but from today it showing name along with membership name, suddenly it happened. can anyone tell what would the problem and excat solution for this.
    Regards,
    karthick.

    Hi,
    Please check the link
    http://sharepoint.stackexchange.com/questions/35412/changing-users-displayname-isnt-permanent-i0-f-issue
    http://blog.tylerholmes.com/2011/03/awkward-usernames-courtesy-of-claims.html
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Restoring album names to iPhoto from iPod along with photos

    Ok, I know that I can restore photos to iPhoto from my iPod. The question is, will the album designations import with them? The iPod has a file called "Photo Database" which I think may contain these designations but iPhoto uses a different file type to store that data. Is there a way (perhaps a 3rd party solution) to extract the album designation info from that iPod file?
    Thanks.
    Jeff
    iMac G4 800 & PowerBook G4    

    I used the autosych feature in iTunes. So, I don't have a complete backup of all the iPhoto library files but I did make sure to sych full res photos in addition to thumbnails. I don't mind losing stuff like keywords or titles as I didn't use either much at all. I'm not sure if auto-synching to the iPod updates photos that have been retouched in iPhoto since last sync, but if it doesn't it's no big deal since I only ever used red-eye redux and that was only now and then.
    So, my iPod has all full-size photos in its "Full Resolution" sub-folder of the iPod's "Photos" folder along with the "Photo Database" file. Of course, the thumbnails are there in the "Thumbs" sub-folder but I doubt I need to bother with those since I have the full-size ones.
    Jeff
    iMac G4 800 & PowerBook G4    

  • Image on jsp from database along with other elements on image.

    Hi All,
    I wish to display an image which is stored in my database along with other contents on the page.
    I am able to display the image on an entirely new page but I do not wish to display it on a new page. Neither frames etc fit on my current page design.
    Kindly help

    I have a jsp page ..
    I have a byte stream in which i have stored the image from the database (the image is stored in databse as blob) in that jsp.When i use output stream object to display the image from the database (as suggested by many in this forum), the image is displayed in a new page. I wish to display the image along with my other elements like text etc in the same page.

  • How do I stop the ruler from moving along with my guide line as I move it?

    Hello everyone,
    I am new to muse and may well be missing the obvious here, but I have a little problem, which until it is solved is a big road block to me.
    I am trying to move a guide lower on the page and can not do that because the left ruler is moving along with the guide!
    How do I lock the ruler itself, so the guide can be moved to a different position on the ruler?
    Totally weird. I have tried searching "locking rulers" both in this site and in google, but got no results at all.  I don't think the rulers are supposed to move in the first place, so am worried that nobody out there may have an answer to this.
    So I am stuck for now & I can't finish my project unless this is solved.
    Thanks for reading,
    Pat

    I would need more details for this, as you have mentioned rulers move ? Are you referring to rulers on page in design ?
    You can move a guide lower down the page , ruler marks will be displayed on ruler but that will not stop you moving the guides.
    What happens if you uncheck rulers from top view options ?
    Thanks,
    Sanjit

  • List of all users in a client along with their roles

    Hi All,
    Is there a way to get a list of all the users available in a client along with the roles assigned to them?
    I could actually compare the users and roles individually. But i would like to have a complete list.
    Thanks
    Vijay

    basically you want user reports...
    You can try go to transaction SE38 -> RSUSR*  , all the user reports are started with RSUSRxxxxx, inside might have something relevant to your request.
    cheers,
    Vincent

  • How can I stop multiple tabs from opening along with Mozilla Firefox Start Page at launching time.How can this be stopped?

    Whenever I launch Firefox, multiple tabs also start to open along with the Mozilla Firefox Start Page, which is very irritating. How can I stop this to happen each time I launch the browser?

    See these articles for some suggestions:
    * https://support.mozilla.com/kb/Firefox+has+just+updated+tab+shows+each+time+you+start+Firefox
    * https://support.mozilla.com/kb/How+to+set+the+home+page - Firefox supports multiple home pages separated by '|' symbols
    * http://kb.mozillazine.org/Preferences_not_saved
    It is also possible that there is a problem with the files sessionstore.js and sessionstore.bak in the Firefox Profile Folder.
    Delete the files sessionstore.js and sessionstore.bak in the Firefox Profile Folder.
    * Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    * http://kb.mozillazine.org/Profile_folder_-_Firefox
    * http://kb.mozillazine.org/sessionstore.js
    If you see files sessionstore-##.js with a number in the left part of the name like sessionstore-1.js then delete those as well.<br />
    Deleting sessionstore.js will cause App Tabs and Tab Groups to get lost, so you will have to create them again (make a note).
    See:
    * http://kb.mozillazine.org/Session_Restore

  • How do I erase my personal info from a phone with a broken screen?

    My iPhone4 has a broken (blank) screen, but the phone does turn on.  I have bought another phone, but want to erase my personal info from the broken phone before I donate it.  How can I do this?

    If you have Find My iPhone turned on you can erase it from iCloud.
    iCloud: Erase your device

  • When I export a PNG file on illustrator, I get random empty space along with my exported object. Is there any way I can make just my object export and nothing more?

    This is an example of my problem. This icon is the sole object in this document, and is the only thing being exported here. Yet when I do export it, a random bar of white space is exported along with it. I am currently using Illustrator to design the art for a video game, meaning that this empty space plays havoc with my end product, and I have to meticulously crop anything I export. Since I do have to make hundreds of individual sprites for this, I would love to learn how to fix this problem and save myself a lot of time. So, what exactly am I doing wrong here, and how can I fix it?

    quicklite,
    I believe the resulting/final size may extend just a tiny bit above a whole point/pixel (value) on the pixel grid.
    You may see by Edit>Preferences>General>Use Preview Bounds (if needed), then select one of the top Reference Points in the Transform palette and look at the Y value measured in points/pixels.
    If that is the case, the solution would be to get rid of that tiny bit.

  • How i get user info from ldap using java after authenticating user with SSO

    Hi
    I have one jsp/bean application as a partner application with SSO.
    It works fine.
    Now i need to get other attributes of user from LDAP who has logged into the application through SSO.
    using SSO java APIs i only get username, userDN, subscriber info.
    To get user's other attribute i have to user LDAP APIs for that i have to create on Directory Context, for the same i need userpassword.
    so here i my question, how do i get user password after he has logged in thro SSO.
    regards..
    and thanking u in advance
    samir

    Valentina,
    there's no way to get the password value from the directory (it's one way). Of course you can get the hashed (MD4,MD5,SHA-1) base64 encoded value (i.e. the value you see in OiD) but not the 'password'.
    --Olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Moving user profiles from Server 2012 with RDS services to User profile disks Server 2012R2

    Hello i have a question about moving my C:\users profiles.
    My current settings on the servers are:
    AD-Server 2012
    SQL-Server 2012
    TS- server with RDS roles (RDwebacces, RDs broker, RD session host) 2012
    everything about user profiles is now in C:\Users
    My new settings for the server will be:
    AD-ActiveDirectory - server
    SQL-Server
    TS1- RDS (RDwebacces, broker, RDS server group management) 2012R2 (I have enabeld userProfileDisks to Filesistem server)
    TS2- RDS(Session host) load balance 2012R2
    TS3- RDS (Session host) load balance 2012
    FileSistem - server ( here i will have on E: partition the new functionality UserProfileDisks) 2012R2
    So is there a way to move profiles from TS - C:\Users to FileSistem - E:\UserProfileDisks
    I am new to this so any idea wil be helpful.

    Hi,
    If the UPD is configured on the server which holds existing user profiles, just select the option:
    store all user settings and data inside the profile disk.
    Since you are moving user profiles between different servers, then user profile contents need to be migrated manually.
    Best Regards,
    Amy
    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How can I get ALL the user info from WWW_FLOW_FND_USER -table?

    Hi.
    I use HTML DB authentication and therefore all my user information is stored in HTML DB tables. I can use :APP_USER to get USER_NAME, but in my application I need to have also USER_ID, FIRST_NAME, LAST_NAME and EMAIL_ADDRESS fields from database. I don't want to change any database/schema security level so I cannot read directly from WWW_FLOW_FND_USER -table when I am inside in SCOTT -schema/sec.level.
    How to read all the information?

    Thank you for your help, but I cannot find any information about backage wwv_flow_user_api on OTN or in HTML DB documentation.
    Where to start?

  • I need help with motion control. I am programming in Visual Basic. I will need help with what parts I need to purchase from NI, along with help on the code.

    I am using a Papst servo motor and I need to know where to start and what to purchase to get this motor to spin. I am using visual basic and in my program I calculate the direction and RPM's needed from the motor. It will spin anywhere from 1 to 10000 RPM's. It seems rather easy, but I have no idea on how to spin the motor at the specific RPM, and stop it with a command stop in the program. Please help.

    We really should know a little more about your intended uses for this system, but assuming you want to do relatively simple (or even not so simple!) motion, you'll need a few components...
    A motion controller, such as the PCI-7342, can take your VB commands and turn them into the commands needed to "run" the motor. Next you'll need a drive, such as the MID-7342. This includes the servo amplifier that actually powers the motor. It also has connections to "pass through" the encoder signals from the motor back to the motion controller.
    The above-named pieces assume one or two axes of motion. You'll also need a cable to connect the two (can't remember the model right now). You can use MAX to configure the motion controller, and there are just a few VB calls you
    'll need to make using NI-Motion functions to define the motion and get it going.
    Hope this helps!

Maybe you are looking for

  • Bug in Page source view

    In Page Source view in 32-bit Firefox 3.6 under Windows, if there is a URL in the source code that is erroneously not closed with a quote, for example: <a href="http://mozilla.com>The Mozilla' site</a> (Note absence of quote after .com) And you reloa

  • Setup

    Dear Experts, I would like to know in the ERP if you have any steps guide to configure two step picking, packing and Handling Unit management. You help is very appreicated. Thanking you

  • Elements 11 is crashing in Windows 7 64 bit, just installed and it has crashed using organizer

    Elements 11 was just installed on my lap top and is crashing while using organization part of program.  No error message.

  • Elements 9 won't upload raw from D3100

    I've been shooting in raw files from my D3100 b/c in Elements it gives me more editing abilities.  The problem is Elements 9 won't upload my raw files from my Nikon D3100.  It tells me "wrong file extension" or something is missing.  Is there an upda

  • Would apple ever get licensed systems on idevices (ex. Gameboy, n64, etc).

    Have you ever wanted to play an old game you used to have. What if apple created apps that did that. I have seen a playstation 1 on this new phone. Now if they can do it why can't apple. All I want is a gameboy or a nitendo 64. Pokemon fans can play