Find particular database role permission on all the databases of an instance

Hi Team,
I want to find particular database role permission on all the databases of a instance.
Example: 50 databases are running on an instance. I want to find datareader permission of ABCDE account, on which of the databases it exist?
Please provide me a customized script to find it.
Thanks
Kumar

Hi K735,
According to your description, you want to find databases where a specific database role of a specific user exists. To do this, you could execute the stored procedure below by proving a value for each of the two parameters (@databaseRole, @user)  to
specify the database role and the user as the following example: execute findDatabaseRole 'db_datareader', 'testUser'
USE master
GO
CREATE PROCEDURE dbo.findDatabaseRole
@databaseRole VARCHAR(200),
@user VARCHAR(250)
AS
DECLARE @DBuser_sql VARCHAR(4000)
DECLARE @DBuser_table TABLE
AssociatedDatabaseRole VARCHAR(200),
DBName VARCHAR(200),
UserName VARCHAR(250),
LoginType VARCHAR(500)
INSERT @DBuser_table
EXEC sp_MSforeachdb @command1='SELECT USER_NAME(b.role_principal_id) AS AssociatedDatabaseRole, "[?]" AS DBName, a.name AS Name,
a.type_desc AS LoginType FROM [?].sys.database_principals a
, [?].sys.database_role_members b where a.principal_id=b.member_principal_id and
a.sid NOT IN (0x01,0x00) AND a.sid IS NOT NULL AND a.type NOT IN ("C")
AND a.is_fixed_role <> 1 AND a.name NOT LIKE "##%" AND "?" NOT IN ("master","msdb","model","tempdb")
ORDER BY Name'
SELECT AssociatedDatabaseRole, DBName,UserName,LoginType
FROM @DBuser_table WHERE UserName=@user and AssociatedDatabaseRole=@databaseRole
group by AssociatedDatabaseRole, DBName,UserName,LoginType
GO
Regards,
Michelle Li

Similar Messages

  • To read all the database fields used in a Crystal report 10 file using Vb 6 Code

    Hi
    Iam in development of an Application in Visual basic which lists all the
    database fields used in a particular report (crystal 10)
    In simple i need to show all the checked fields in the database fields section in field explorer section of the crystal report file.
    regards
    venkateshG

    Please re-post if this is still an issue to the Legacy Application Development SDKs Forum or purchase a case and have a dedicated support engineer work with you directly

  • READ privileges for *all the databases*

    Is it possible to grant READ privileges for all the databases objects (tables, schema, triggers, procedures, view and etc)

    SHANOJ wrote:
    Is it possible to grant privileges to all objects in one time?It depends on what you mean by 'in one time'. In one single SQL statement? No. But there's nothing stopping you issuing a billion grants one after the other in your session.
    Roles are probably better suited for this task. But are you sure you really want to grant SELECT privileges on all the tables in the database? It's more common to grant SELECT on all the 'MARKAPP' tables to the 'MARKAPP_READ_ONLY' role...

  • Services of all the databases goes down

    Hi ,
    2 days back, Services of all the databases goes down on one of the PROD server.
    When i tried to start the services using SRVCTL command .
    I was getting the error below.
    oracle@shbaorc07b bin]$ srvctl status database -d EDW
    PRKH-1010 : Unable to communicate with CRS services.
    [Communications Error(Native: prsr_initCLSS:[3])]
    PRKO-2005 : Application error: Failure in getting Cluster Database Configuration for: EDWX
    PRKC-1056 : Failed to get the hostname for node + PRKH-1010 + prsr_initCLSS
    after this error, i came to know that there is some problem with the services.
    When i try to start the crs services, was not able to start the services
    as a root user user,
    I run the below command.
    crsctl start crs
    to my surprise the services of crs was not coming up,
    Finally I have to start the server and all the cluster services came up.
    I want to find out why this was happen, i need to find the bottle neck so this should not happen again as this is a PROD server and lots of prod database are residing on this server.
    Please find crsd.log below.
    2010-04-22 15:38:22.361: [  CRSRES][1539545408]0ora.shbaorc07b.LISTENER_UC4XPRD2.lsnr failed on shbaorc07b relocating.
    2010-04-22 15:38:22.397: [  CRSRES][1539545408]0Cannot relocate ora.shbaorc07b.LISTENER_UC4XPRD2.lsnrStopping dependents
    2010-04-22 15:38:22.407: [  CRSRES][1539545408]0StopResource: setting CLI values
    2010-04-22 15:38:27.318: [  CRSAPP][1539545408]0CheckResource error for ora.shbaorc07b.LISTENER_CTLGPRD2.lsnr error code = 1
    2010-04-22 15:38:27.321: [  CRSRES][1539545408]0In stateChanged, ora.shbaorc07b.LISTENER_CTLGPRD2.lsnr target is ONLINE
    2010-04-22 15:38:27.322: [  CRSRES][1539545408]0ora.shbaorc07b.LISTENER_CTLGPRD2.lsnr on shbaorc07b went OFFLINE unexpectedly
    2010-04-22 15:38:27.322: [  CRSRES][1539545408]0StopResource: setting CLI values
    2010-04-22 15:38:27.336: [  CRSRES][1539545408]0Attempting to stop `ora.shbaorc07b.LISTENER_CTLGPRD2.lsnr` on member `shbaorc07b`
    one more strange thing happen while restarting the 2nd server, the first server also restarted.
    Please help me regarding this?
    Thanks in advance.

    Hi,
    Thanks.
    please find the OS version
    Linux shbaorc07a.corp.shire.com 2.6.18-53.1.14.el5 #1 SMP Tue Feb 19 07:18:46 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
    database version:
    10.2.0.4.0
    Node 2:
    [    CSSD]2010-04-22 19:41:19.438 [1273047360] >TRACE: clssgmCleanupGrocks: cleaning up grock IGDPAXPRDALL type 2
    [    CSSD]2010-04-22 19:41:19.438 [1273047360] >TRACE: clssgmCleanupOrphanMembers: cleaning up remote mbr(1) grock(IGDPAXPRDALL) birth(2/0)
    [    CSSD]2010-04-22 19:41:19.438 [1273047360] >TRACE: clssgmCleanupGrocks: cleaning up grock IGGMCXPRDALL type 2
    [    CSSD]2010-04-22 19:41:19.438 [1273047360] >TRACE: clssgmCleanupGrocks: cleaning up grock IGEASYPRDALL type 2
    [    CSSD]2010-04-22 19:41:19.438 [1273047360] >TRACE: clssgmCleanupOrphanMembers: cleaning up remote mbr(1) grock(IGEASYPRDALL) birth(2/0)
    [    CSSD]2010-04-22 19:41:19.438 [1273047360] >TRACE: clssgmCleanupGrocks: cleaning up grock IGCTRMPRDALL type 2
    [    CSSD]2010-04-22 19:41:19.438 [1273047360] >TRACE: clssgmCleanupOrphanMembers: cleaning up remote mbr(1) grock(IGCTRMPRDALL) birth(2/0)
    [    CSSD]2010-04-22 19:41:19.439 [1273047360] >TRACE: clssgmCleanupGrocks: cleaning up grock IGEDWXPRDALL type 2
    [    CSSD]2010-04-22 19:41:19.439 [1273047360] >TRACE: clssgmCleanupGrocks: cleaning up grock IGNUSBPRDALL type 2
    [    CSSD]2010-04-22 19:41:19.439 [1273047360] >TRACE: clssgmCleanupGrocks: cleaning up grock IGETLXPRDALL type 2
    [    CSSD]2010-04-22 19:41:19.439 [1273047360] >TRACE: clssgmCleanupOrphanMembers: cleaning up remote mbr(1) grock(IGETLXPRDALL) birth(2/0)
    [    CSSD]2010-04-22 19:41:19.439 [1273047360] >TRACE: clssgmCleanupGrocks: cleaning up grock IGCTXXPRDALL type 2
    [    CSSD]2010-04-22 19:41:19.439 [1273047360] >TRACE: clssgmCleanupOrphanMembers: cleaning up remote mbr(1) grock(IGCTXXPRDALL) birth(2/0)
    [    CSSD]2010-04-22 19:41:19.439 [1273047360] >TRACE: clssgmCleanupGrocks: cleaning up grock IGVVC30PRDALL type 2
    [    CSSD]2010-04-22 19:41:19.439 [1273047360] >TRACE: clssgmCleanupGrocks: cleaning up grock IGVUM30PRDALL type 2
    [    CSSD]2010-04-22 19:41:19.439 [1273047360] >TRACE: clssgmCleanupGrocks: cleaning up grock #CSS_CLSSOMON type 2
    [    CSSD]2010-04-22 19:41:19.439 [1273047360] >TRACE: clssgmCleanupOrphanMembers: cleaning up remote mbr(1) grock(#CSS_CLSSOMON) birth(2/0)
    [    CSSD]2010-04-22 19:41:19.445 [1273047360] >TRACE: clssgmEstablishConnections: 3 nodes in cluster incarn 5
    [    CSSD]2010-04-22 19:41:19.449 [1231087936] >TRACE: clssgmPeerListener: connects done (3/3)
    [    CSSD]2010-04-22 19:41:19.449 [1273047360] >TRACE: clssgmEstablishMasterNode: MASTER for 5 is node(3) birth(1)
    [    CSSD]2010-04-22 19:41:19.458 [1231087936] >TRACE: clssgmHandleDBDone(): src/dest (3/65535) size(72) incarn 5
    [    CSSD]CLSS-3000: reconfiguration successful, incarnation 5 with 3 nodes
    [    CSSD]CLSS-3001: local node number 2, master node number 3
    [    CSSD]2010-04-22 19:41:19.458 [1273047360] >TRACE: clssgmReconfigThread: completed for reconfig(5), with status(1)
    [    CSSD]2010-04-22 19:49:20.816 [1189128512] >TRACE: clssnmConnComplete: probe from node 1, your version: 10.2.1.2
    , support PENDINA: 1
    [    CSSD]2010-04-22 19:49:20.816 [1189128512] >TRACE: clssnmConnComplete: MSGSRC 1, type 5, node 1, flags 0x0001, con 0x2aaab01abb00, probe (nil)
    [    CSSD]2010-04-22 19:49:20.816 [1189128512] >TRACE: clssnmConnComplete: node 1, shbaorc07a, con(0x2aaab01abb00), probcon((nil)), ninfcon((nil)), node unique 1271962158, prev unique 0, msg unique 1271962158 node state 0
    [    CSSD]2010-04-22 19:49:20.816 [1189128512] >TRACE: clssnmsendConnAck: node 1, node state 0
    [    CSSD]2010-04-22 19:49:20.816 [1189128512] >TRACE: clssnmConnComplete: connecting to node 1 (con 0x2aaab01abb00), ninfcon (0x2aaab01abb00), state (0)
    [    CSSD]2010-04-22 19:49:20.816 [1189128512] >TRACE: clssnmConnComplete: connected to node 1 (con 0x2aaab01abb00), ninfcon (0x2aaab01abb00), state (0), flag (1037)
    [    CSSD]2010-04-22 19:49:20.927 [1262557504] >TRACE: clssnmDoSyncUpdate: Initiating sync 6
    [    CSSD]2010-04-22 19:49:20.927 [1262557504] >TRACE: clssnmDoSyncUpdate: diskTimeout set to (57000)ms
    [    CSSD]2010-04-22 19:49:20.927 [1262557504] >TRACE: clssnmSetupAckWait: Ack message type (11)
    [    CSSD]2010-04-22 19:49:20.927 [1262557504] >TRACE: clssnmSetupAckWait: node(1) is ALIVE
    [    CSSD]2010-04-22 19:49:20.927 [1262557504] >TRACE: clssnmSetupAckWait: node(2) is ALIVE
    [    CSSD]2010-04-22 19:49:20.927 [1262557504] >TRACE: clssnmSetupAckWait: node(3) is ALIVE
    [    CSSD]2010-04-22 19:49:20.927 [1262557504] >TRACE: clssnmSetupAckWait: node(4) is ALIVE
    [    CSSD]2010-04-22 19:49:20.927 [1262557504] >TRACE: clssnmSendSync: syncSeqNo(6)
    [    CSSD]2010-04-22 19:49:20.927 [1189128512] >TRACE: clssnmHandleSync: diskTimeout set to (57000)ms
    [    CSSD]2010-04-22 19:49:20.927 [1262557504] >TRACE: clssnmWaitForAcks: Ack message type(11), ackCount(4)
    [    CSSD]2010-04-22 19:49:20.927 [1189128512] >TRACE: clssnmHandleSync: Acknowledging sync: src[2] srcName[shbaorc07b] seq[1] sync[6]
    6911,1 99%
    node 1:
    [    CSSD]2010-04-22 18:56:00.996 [1189128512] >USER: clssnmHandleUpdate: SYNC(4) from node(4) completed
    [    CSSD]2010-04-22 18:56:00.996 [1189128512] >USER: clssnmHandleUpdate: NODE 1 (shbaorc07a) IS ACTIVE MEMBER OF CLUSTER
    [    CSSD]2010-04-22 18:56:00.996 [1189128512] >USER: clssnmHandleUpdate: NODE 2 (shbaorc07b) IS ACTIVE MEMBER OF CLUSTER
    [    CSSD]2010-04-22 18:56:00.996 [1189128512] >USER: clssnmHandleUpdate: NODE 3 (shbaorc07c) IS ACTIVE MEMBER OF CLUSTER
    [    CSSD]2010-04-22 18:56:00.996 [1189128512] >USER: clssnmHandleUpdate: NODE 4 (shbaorc07d) IS ACTIVE MEMBER OF CLUSTER
    [    CSSD]2010-04-22 18:56:00.996 [1189128512] >TRACE: clssnmHandleUpdate: diskTimeout set to (200000)ms
    [    CSSD]2010-04-22 18:56:01.008 [1273047360] >TRACE: clssgmReconfigThread: started for reconfig (4)
    [    CSSD]2010-04-22 18:56:01.008 [1273047360] >USER: NMEVENT_RECONFIG [00][00][00][1e]
    [    CSSD]2010-04-22 18:56:01.020 [1273047360] >TRACE: clssgmEstablishConnections: 4 nodes in cluster incarn 4
    [    CSSD]2010-04-22 18:56:01.096 [1231087936] >TRACE: clssgmInitialRecv: (0x2aaab4001310) accepted a new connection from node 2 born at 4 active (4, 4), vers (10,3,1,2)
    [    CSSD]2010-04-22 18:56:01.096 [1231087936] >TRACE: clssgmInitialRecv: conns done (4/4)
    [    CSSD]2010-04-22 18:56:01.096 [1273047360] >TRACE: clssgmEstablishMasterNode: MASTER for 4 is node(3) birth(1)
    [    CSSD]2010-04-22 18:56:01.138 [1231087936] >TRACE: clssgmHandleDBDone(): src/dest (3/65535) size(72) incarn 4
    [    CSSD]CLSS-3000: reconfiguration successful, incarnation 4 with 4 nodes
    [    CSSD]CLSS-3001: local node number 1, master node number 3
    [    CSSD]2010-04-22 18:56:01.138 [1273047360] >TRACE: clssgmReconfigThread: completed for reconfig(4), with status(1)
    [    CSSD]2010-04-22 19:40:00.531 [1231087936] >TRACE: clscsendx: (0x2aaab00fa3b0) Connection not active
    [    CSSD]2010-04-22 19:40:00.531 [1231087936] >TRACE: clssgmSendClient: Send failed rc 6, con (0x2aaab00fa3b0), client (0x2aaab00fa6b0), proc ((nil))
    [    CSSD]2010-04-22 19:40:19.410 [1231087936] >TRACE: clscsendx: (0x2aaab02acd00) Connection not active
    [    CSSD]2010-04-22 19:40:19.410 [1231087936] >TRACE: clssgmSendClient: Send failed rc 6, con (0x2aaab02acd00), client (0x2aaab02ad7c0), proc ((nil))
    [    CSSD]2010-04-22 19:40:19.410 [1231087936] >TRACE: clscsendx: (0x2aaab02ad570) Connection not active
    [    CSSD]2010-04-22 19:40:19.410 [1231087936] >TRACE: clssgmSendClient: Send failed rc 6, con (0x2aaab02ad570), client (0x2aaab02af660), proc ((nil))
    [    CSSD]2010-04-22 19:40:19.438 [1231087936] >TRACE: clscsendx: (0x2aaab0295780) Connection not active
    [    CSSD]2010-04-22 19:40:19.438 [1231087936] >TRACE: clssgmSendClient: Send failed rc 6, con (0x2aaab0295780), client (0x2aaab02859f0), proc ((nil))
    [    CSSD]2010-04-22 19:40:19.476 [1231087936] >TRACE: clscsendx: (0x2aaab029d150) Connection not active
    [    CSSD]2010-04-22 19:40:19.476 [1231087936] >TRACE: clssgmSendClient: Send failed rc 6, con (0x2aaab029d150), client (0x2aaab029dbb0), proc ((nil))
    [    CSSD]2010-04-22 19:40:19.476 [1231087936] >TRACE: clscsendx: (0x2aaab029d890) Connection not active
    [    CSSD]2010-04-22 19:40:19.476 [1231087936] >TRACE: clssgmSendClient: Send failed rc 6, con (0x2aaab029d890), client (0x2aaab029e1b0), proc ((nil))
    [    CSSD]2010-04-22 19:40:19.707 [1231087936] >TRACE: clscsendx: (0x2aaab02cdb30) Connection not active
    [    CSSD]2010-04-22 19:40:19.707 [1231087936] >TRACE: clssgmSendClient: Send failed rc 6, con (0x2aaab02cdb30), client (0x2aaab02cdf60), proc ((nil))
    [    CSSD]2010-04-22 19:40:19.710 [1231087936] >TRACE: clscsendx: (0x2aaab02ca9e0) Connection not active
    please help me on this.
    Thanks
    Edited by: user646034 on Apr 26, 2010 1:13 AM

  • Creating Planned orders and Requisitions for a particular MRP controller and for all the others only Requisition is to be created.

    Hi Experts,
    Currently we run Program 'RMMRP000' as a batch job to create Planned orders and requisitions.
    The client wants that Planned orders and Requisitions should be created for a particular MRP controller and for all the others only Requisition is to be created.
    I implemented Exit 'EXIT_SAPMM61X_001' in the following manner by passing MRP controller to user_key.
      IF mt61d-dispo <> user_key.
        no_planning = 'X'.
      ENDIF.
    But as you can see that this will not meet my client requirement.
    If any of you has worked on similar requirement / if any one knows that this is achievable or not,
    please share your inputs.

    Moved from SAP ERP Sales and Distribution (SAP SD) to ABAP Development
    G. Lakshmipathi

  • Assigning View permission to all the users that have been selected in contact selector - SP 2010, InfoPath 2010

    I have a SharePoint InfoPath 2010 browser form with item level security. Only submitter
    and approvers has access to the form.  This form contains a people picker that is populated with the names of attendees
    for the meeting they attended (which
    I am able to store in Field2 below). I want to allow attendees to be able to view (grant view permission) the InfoPath form. Field 2 has the users in form of domain\user1;domain\user2; etc. Following the below step, I am getting error when I ADD or REPLACE
    permission on current item. How do I go about assigning view permission to all the users that have been selected in contact selector?
    Jitu

    Hi ,
    i understand that the text box and the people picker hold multiple user names and you want to grant user permission based on the user in the text box.
    I have a test based on your description,the results are: When there are multiple users in the text box, the workflow will throw an error'Error Occurred'.It is the same with the people picker column.
    You need to limit the peopel picker to only allow to select one user,in this way the text box will only hold one user.Then you can use the people picker or the text box to grant user permission.
    Thanks,
    Entan Ming
    Entan Ming
    TechNet Community Support

  • Delete all the database table content

    Hello Friends,
    I have a z table with 5 fields (all the key fields) and I want to delete all the table content and load fresh content from internal table.
    I tried using syntax 'delete ztable' but sy-subrc value is coming as 4, means no table content is getting deleted.
    Please suggest me any alternative way to delete all the database table content.
    Thanks in advance,
    Shreekant

    Hi,
    try using
    delete from ztable.
    This will delete all records from your ztable. After this command u can fill your ztable from itab by the following command
    select *
    from std table
    into corresponding fields of itab.
    insert ztable from table itab.
    Hopefully this will solve your problem.
    Regards,
    Ibrar

  • Export all the database tables into CSV

    I am using Oracle 10 g Release 2
    I need to expot all the database tables off of an oracle schema to it's corrosponding CSV files.
    Can I use 'EXP U_name/pswd GRANTS=Y TABLES=(table_A,table_B,table_C)' .?
    Any advise is a plus.
    Thanks in advance
    Jay

    Pl post OS and database versions.
    If you have access to execute database export utilities, then use the TABLES parameter as you have indicated
    exp - http://docs.oracle.com/cd/E11882_01/server.112/e22490/original_export.htm#sthref1927
    expdp - http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_export.htm#sthref135
    HTH
    Srini

  • TS4006 Device does not appear in Find My iPhone and I tried all the options on the support page. What next?

    Device does not appear in Find My iPhone and I tried all the options on the support page. What next?

    Is the device lost or stolen? If so it may be turned off, not connected to the internet, and/or have a dead battery in which case it may never appear.
    The what next is then covered in:
    If your iPhone, iPad, or iPod touch is lost or stolen
    Reporting a lost or stolen Apple product

  • Application cannot proceed. Internal error occured. Contact your administrator. Error msg: Unable to connect to the database. Please make sure the database information specified in admin/includes/config.php are correct.

    After clicking in email link, I get the following message on Firefox page : " The application cannot proceed!
    An internal error occured. Please contact your administrator and describe the steps you took before you encounter this error message.Error msg: Unable to connect to the database. Please make sure the database information specified in admin/includes/config.php are correct."
    The email asked to install the latest Adobe Flashplayer version to have it working. I installed it, also updated my plug-ins and checked in safe mode that the extensions were not the problem. I also deleted the cookies an cache. Nothing seems to be working so far. I have the lastest version of Firefox 8.0.1 as well as Roboform 7. I noticed that the latest Firefox version has (x86) tagged to it. Does it refers to an 86 bits because my computer uses 32 or 64 bits only. I tried also different browsers and the message kept appearing. How do I resolve this problem?

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"

  • How to find what are triggers are present in the database?

    Hi All
    Can any one tell me how to find what all triggers present in the database.
    Thanks in Advance

    Hi All
    Can any one tell me how to find what all triggers
    present in the database.
    Thanks in AdvanceYou should visit Pythia, the Oracle of Delphi, near Thermopile in Greece. She might be able to give you an answer. Pythia was an early leader in executive decision support systems and is not to be confused with the Oracle Corp. of Redmond, CA. Pythia also has a group of helpful colleagues in Toronto. Rumor is that they're also making predictions by inhaling laurel vapors. SQL, as you know, stands for "Said Quixotically on Laurel".

  • Query to find Memory used by each session in the database

    Hi All,
    Is there any query to find the memory utilised by each session in the database.I am in 9i database.
    Regards
    Vijay

    Memory using sessions script,
    SET LINESIZE 145
    SET PAGESIZE 9999
    COLUMN sid FORMAT 99999 HEADING 'SID'
    COLUMN serial_id FORMAT 999999 HEADING 'Serial#'
    COLUMN session_status FORMAT a9 HEADING 'Status' JUSTIFY right
    COLUMN oracle_username FORMAT a12 HEADING 'Oracle User' JUSTIFY right
    COLUMN os_username FORMAT a9 HEADING 'O/S User' JUSTIFY right
    COLUMN os_pid FORMAT 9999999 HEADING 'O/S PID' JUSTIFY right
    COLUMN session_program FORMAT a18 HEADING 'Session Program' TRUNC
    COLUMN session_machine FORMAT a8 HEADING 'Machine' JUSTIFY right TRUNC
    COLUMN session_pga_memory FORMAT 9,999,999,999 HEADING 'PGA Memory'
    COLUMN session_pga_memory_max FORMAT 9,999,999,999 HEADING 'PGA Memory Max'
    COLUMN session_uga_memory FORMAT 9,999,999,999 HEADING 'UGA Memory'
    COLUMN session_uga_memory_max FORMAT 9,999,999,999 HEADING 'UGA Memory MAX'
    prompt
    prompt ----------------------------------------------------
    prompt | User Sessions Ordered by Current PGA Size |
    prompt ----------------------------------------------------
    SELECT
    s.sid sid
    , s.serial# serial_id
    , lpad(s.status,9) session_status
    , lpad(s.username,12) oracle_username
    , lpad(s.osuser,9) os_username
    , lpad(p.spid,7) os_pid
    , s.program session_program
    , lpad(s.machine,8) session_machine
    , sstat1.value session_pga_memory
    , sstat2.value session_pga_memory_max
    , sstat3.value session_uga_memory
    , sstat4.value session_uga_memory_max
    FROM
    v$process p
    , v$session s
    , v$sesstat sstat1
    , v$sesstat sstat2
    , v$sesstat sstat3
    , v$sesstat sstat4
    , v$statname statname1
    , v$statname statname2
    , v$statname statname3
    , v$statname statname4
    WHERE
    p.addr (+) = s.paddr
    AND s.sid = sstat1.sid
    AND s.sid = sstat2.sid
    AND s.sid = sstat3.sid
    AND s.sid = sstat4.sid
    AND statname1.statistic# = sstat1.statistic#
    AND statname2.statistic# = sstat2.statistic#
    AND statname3.statistic# = sstat3.statistic#
    AND statname4.statistic# = sstat4.statistic#
    AND statname1.name = 'session pga memory'
    AND statname2.name = 'session pga memory max'
    AND statname3.name = 'session uga memory'
    AND statname4.name = 'session uga memory max'
    ORDER BY session_pga_memory DESC
    Thanks

  • I want to find out if my provider is in the database

    I am simply trying find out if my service provider is actually listed in the mozilla database. All I get are answers that tell me that Mozilla has a database, and that Thunderbird will check it for me, but I what I want is to look at the database myself and confirm whether of not my provider is listed. It seems simple enough and it should be doable.

    Try to set-up an account. If the wizard finds the correct settings you've got the answer.

  • Database adapter not returning all the records

    I've taken over a BPEL from a developer who left the organization and have been having an issue during our User Acceptance Testing. We are querying a table that will return the insurance enrollment information for employee's and their dependants. When an employee change plans, or adds people, the old plan is terminated and a new once is created. When this happens there will be two records on the database to show the old plan and the new plan.
    When we run the SQL thru JDEV or SQLDeveloper, the data comes out fine. When we run it through a BPEL Database Adapter we are only getting one of the rows returned.
    I have created a small tester BPEL that is easily modified and deployed to run the same query to try multiple configurations changes within the DBAdapter. What I have found is all the records are returned when the "Return single result set" box on the DBAdapter Wizard is unchecked. When it's checked then it only returns one record for the employees with an old and a new plan.
    Can someone explain what the "Return single result set" option does, and what the impact will be if it's unchecked?

    Hello,
    In same way i am using two parent-child(header-line) tables. they have one to many relationship.
    I want to generate XML which contains multiple line items under a child elements for header elements.
    I have tried it but i am getting only one line under that child item. i am using jdev10.0.3.3.0
    can u help me please.
    -regards
    satyendra

  • Do we have role which display all the authorizations in portal

    HI,
      Can any body tell me whether is there any role which display all authorizations in the protal.?
    If not can u tell me how to display all authorizations in the portal in detail.
    Thanks in advance
    Krishna.

    Hi,
    There are around 40+ Standard roles in EP7.  If you logon with J2ee_admin you can see all the roles attached to a user under user Management Tab.
    Regards,
    -Vijay

Maybe you are looking for

  • Create new session for each window opening

    From a jsp page i open a page called student.jsp by clicking on students admision no.Therefore lots of pages can be opend in new windows with relevent student details. but when i click on the link i called a servlet, get relevent details and redirect

  • Can't see photos

    My iphoto is not letting me see some of my pictures on my computer... They r there but when I click on them to make it big it is a black screen...??? I don't know why it is doing this?? Can anyone help?? I just had a baby n don't want to loose these

  • Nokia Care- N95 Support

    I am having lots of problems with my N95. The handset keeps on shutting down or freezing without applications running. The handset is very unreliable and I feel I must reinstall my primary SIM into my trusty N80. For example if I try to accesss my vo

  • Helloworld.jsp won't work with iPlanet  4.1 sp12

    long time listener, first time caller:) I am having trouble running a simple helloworld.jsp page on my win2k server. Can someone take a look? I have jdk1.3.1_07 installed and I believe I specified the classpath correctly. here is the code for the hel

  • Consumption report for nn stockable material

    hi i want to see the consumption report for non stockable material like A,K,