Same select (user, name, profile, role, table_name, privilege table)
hello Everyone
1.- i don't know how to merge the two qys to see in the same select (user, name, profile, role, table_name, privilege table)
Im using the tables usuarios and view dba_users : See next qry
SELECT Nvl(US.IDUSUARIO,DU.USERNAME) USUARIO,
US.DESCRIPCION NAME,
ACCOUNT_STATUS STATUS,
DU.PROFILE,
CREATED FECHA_CREACION
FROM USUARIOS US,
SYS.DBA_USERS DU
WHERE DU.USERNAME = US.IDUSUARIO(+)
UNION
SELECT Nvl(US.IDUSUARIO,DU.USERNAME) USUARIO,
US.DESCRIPCION NAME,
ACCOUNT_STATUS STATUS,
DU.PROFILE,
CREATED FECHA_CREACION
FROM USUARIOS US,
SYS.DBA_USERS DU
WHERE DU.USERNAME = UPPER(US.IDUSUARIO)
ORDER BY NAME;
this extract me, USER, REAL NAME, STATUS, PROFILE, CREATION_DATE
JP01 Johan Pena OPEN DEFAULT 05-07-2010
on the other hand:
select * from role_tab_privs
this extract me, ROLE, TABLE_NAME and PRIVILEGE
DBA TABLE1 SELECT
DBA TABLE1 INSERT
DBA TABLE2 DELETE
1.- i don't know how to merge the two qys to see in the same select (user, name, profile, role, table_name, privilege table)
2.-i want something like this.
USER, REAL NAME, STATUS, PROFILE, CREATION_DATE ROLE, TABLE_NAME PRIVILEGE
JP01 Johan Pena OPEN DEFAULT 05-07-2010 DBA TABLE1 SELECT
JP01 Johan Pena OPEN DEFAULT 05-07-2010 DBA TABLE1 DELETE
Ect Ect. Ect.
who can HELP ME.
I have part understood your requirement and assumed the rest! Hence, I have used dba_role_privs in addition to the list of tables you used.
Also, I think your LEFT OUTER JOIN on sys.dba_users is incorrect. I think you are trying to get all users from USUARIOS table for which roles / privileges exist in the database. If that is what you want the following query should help out. If not change the LEFT keyword in the MAIN query (NOT the one in WITH clause) to RIGHT but the results might be unpredictable.
Note: Using ANSI standard keywords for JOIN allows you to use functions in the JOIN clause (such as UPPER(column name), which the Oracle propreitary notation does not allow and hence made you opt for the UNION option).
WITH OS AS
SELECT
DU.USERNAME
,DU.ACCOUNT_STATUS
,DU.PROFILE
,DU.CREATED
,DRP.GRANTED_ROLE
,RTP.TABLE_NAME
,RTP.PRIVILEGE
FROM
sys.dba_role_privs drp
LEFT OUTER JOIN
role_tab_privs rtp
ON
( drp.granted_role = rtp.role )
LEFT OUTER JOIN
sys.dba_users du
ON
( du.username = drp.grantee )
SELECT
NVL (US.IDUSUARIO, OS.USERNAME) USUARIO
,US.DESCRIPCION NAME
,OS.ACCOUNT_STATUS STATUS
,OS.PROFILE PROFILE
,OS.CREATED FECHA_CREACION
,OS.GRANTED_ROLE ROLE
,OS.TABLE_NAME TABLE_NAME
,OS.PRIVILEGE PRIVILEGE
FROM
USUARIOS US
LEFT OUTER JOIN
OS -- temporary result set created using WITH clause above
ON
UPPER (US.USERNAME) = OS.USERNAME
ORDER BY 2 ;Edited by: VishnuR on Jul 5, 2010 8:44 PM
Edited by: VishnuR on Jul 5, 2010 8:47 PM
Similar Messages
-
How to notify the selected user of a role.
Hi,
Currently I have GP Role Approving Officer link to the EP Group : ApprovingOfficer and GP Role Applicant link to EP Group: Applicant. I have also tag a list of EP user to the EP Group accordingly.
Whenever the Applicant submit a request via Web Dynpro, the Applicant can select a list of person who of the ApprovingOfficer Group from a dropdown list in WD UI. Once the Applicant submits the request, there will be a task pending in the ApprovingOfficer GP Runtime.
I want only the task to be pending only for that selected person of the ApprovingOfficer instead of all the person which is the current case.
For example,
Role - ApprovingOfficer consisting user A, user B and user C
If I am from dept A, the WD UI will displayed user A and user C for selection. Whenever, I select user A, I would like the pending request entry to be reflected in user A GP Runtime only.
how to I do that? can advise?
thank you.Hi cocomo,
This is possible. In GP design time, now I think you are assigning the EP Groups at the block level (for each action). That is the reason the request is send to all the users (approvers) in that group and they all will see it as pending task in their inbox.
You have to pick the users dynamically at runtime. For this you can follow these steps.
1. When the Initiator selects his approver from the dropdown list of webdynpro UI (It should be a portal ID), capture it from the current context element and expose it into GP Context as an attribute say DynApprover (in complete method.... before this you have to define an attribute DynApprover in getDescription also).
2. In GP Design time at the block level, instead of assigning the roles directly, make it dynamic -
>
-- Select the Process and click on Roles Tab.
-- Select the Administrator, Overseer, Owner roles manually and leve it as "Initiation Defined" as Role Type
--Change the Approver's Role Type to "Runtime Defined" (Select this option from the drop down in RoleType column).
-- Select the Approver's Block and click on Roles Tab.
-- In the Processor of Approver's Action Choose the GP Attribute (that you have filled with dropdown value and exposed already) from the dropdown list of the "Filled from context Parameter" Column.
Let me know if you need any clarifications and I am sure it can be made to work....
Regards
Ramesh -
How to find the current User Name and stored in which table
In which table the current user name (Login) is stored?
Hi Mohanapriya
The query provided by Gordon can not run on query generator as the $USER is a runtime variable.
You need to save it to a query then use it in a FMS(Formatted Search.)
Just open a form(ex:sales order ), click the field in which you want to show the user name,
then press ****+F2 or Tools->Search Function->Define,
Search by Saved query,then assign the save query to the field.
After that ,you can run the FMS(shift+F2) to get the current user info.
Regards,
Syn Qin
SAP Business One Forums Team -
External Authentication won't correctly set USER name or Role
I am using JAVA under Google App Engine for my backend and attempting to log a user into a room using external authentication. I can connect and get into the room just fine my issue is with the user infomation once I am logged in. The user has a null username and ID (possibly generated) and thier role is set to zero (or at least not high enough to publish). If the room is set to auto-Promote then I do have the ability to publish (this is what I would expect) but still I needed the user to have a role of owner (so they can create nodes).
Here is a little of the java on the back end (I removed my shared secret):
public String getRoomToken(String roomID, String userName, String userID, int userRole) {
try {
Session session = am.getSession(roomID);
return session.getAuthenticationToken(..., "Bob", "TestID", 100);
//return session.getAuthenticationToken(..., userName, userID, userRole);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
return null;
getAuthenticationToken is hardely changed from what is in the AFCS.java in the examples folder but here it is in any case
/** * get an external authentication token */
public String getAuthenticationToken(String accountSecret, String name, String id, int role) throws Exception
if (role < UserRole.NONE || role > UserRole.OWNER)
throw new Error("invalid-role");
String token = "x:" + name + "::" + this.account
+ ":" + id + ":" + this.room + ":"+ Integer.toString(role);
String signed = token + ":" + sign(accountSecret, token);
// unencoded
//String ext = "ext=" + signed;
// encoded
String ext = "exx=" + Utils.base64(signed);
return ext;
This should work. My Shared secret is removed above but I doubt that is the problem as my app does authenticate just fine it just throws an exception telling me I don't have the required permissions to publish when I try to do anything. while observing from the DevConsole I see a user in the room but they are marked as null. Note that non-external authentication works just fine. If I hardcode my login creds in AdobeHSAuthenticator I can get in just fine with no issue. Also if the room I get an authenticationToken for does not match the roomURL I connect to with ConnectSessionContainer I will fail to login correctly like I would expect. So I know my credentials are getting to the AFCS and being decrypted correctly (as I can only authenticate for the room I send in that credential token) but for some reason it simply won't set my role and username/userid correctly. Any help would be great, this has caused me a great deal of grief for days now...
Thanks guys...
VesWell this is wierd I was trying to set this up so that I could get the log output on that run and I ended up changing
<rtc:AdobeHSAuthenticator id="auth" authenticationKey="{Application.application.parameters['token'] as String}"/>
to
<rtc:AdobeHSAuthenticator id="auth" authenticationKey="{token}"/>
and adding a preinitialize function of:
protected function preInit():void
templateID = Application.application.parameters['room'];
token = Application.application.parameters['token'];
oddly enough it now works like a charm now. It is still disconcerting that I was able to actually enter the room even though my token was somehow corrupted (that probably isn't intened behavior). If this shows up agian I will try and track down the particulars and send you guys an email as an FYI. thanks for the help....
Ves -
User/Profile Risk Violation Report table is empty
Dear community,
I am struggeling to find the solution for a quite simple problem: the user and profile risk violation report tables show no results (are empty). And this, although the associated tables (in the backend) contain entries for the same selection criteria (eg. GRACPROFILEACTVL etc.). What could be the reason for that? I started again the batch risk analysis very carefully (manually) on User and Profile Level, for the correct rule set and the correct system, it completed successfully, but I still can't see any results (not even a message like "No violations" or something). As an example, I took the profile SAP_ALL for a target system, which should obviously return a lot of risks/violations.
I have also checked that this is not an authorization issue. To be more precise, actually, this functionality is working fine on the development and UAT GRC system, but not in production.
Any help is highly appreciated. Thanks in advance.Hi Erik,
The problem you are facing with only due to the SoD rule sets, which are in active as you might not have generated in Production system
Generate the SoD rule sets, run the jobs and then run the risks reports, you will get the results as expected.
Regards,
Ameet -
Reg : User name and table spaces
Hi all,
I want to show all the user names in DB and total table apace , Occupied spaceand free space .
Please help on this,
Thanks in advance .for all users you can query
select * from ALL_USERSbut why are you posting the same problem in 3 different threads.
for calculating size of the table you can use
select sum(bytes) from dba_segments
where segment_name = 'YOUR_TABLE'and for rowsize you can use something like this
select
max(vsize(empno)) +
max(vsize(ename)) +
max(vsize(job)) +
max(vsize(mgr)) +
max(vsize(hiredate)) +
max(vsize(sal)) +
max(vsize(comm)) +
max(vsize(deptno)) Bytes
from
scott.emp; -
User Name, Date of Birth field / sysdate
hi! I am writing a procedure/dynamic page to check the logged in person's birthday but has encounterd some problems:
1. draw these data from the wwsec_person$ table? if i just use
Select User Name, Date of Birth from portal30.wwsec_person$, it gives me some error, i tried put [] brackets but still the same.
2. how do i format the sysdate and Date of Birth to to month, day?
3. how do I run a procedure automatically when someone has logged into the portal?
thx.1) Please provide the full error message, and snippit of code surrounding the error.
2) TO_CHAR ( SYSDATE, 'Mon, DD' ) -- Read about TO_CHAR
3) Read about SYSTEM TRIGGERs
http://technet.oracle.com/docs/products/oracle9i/doc_library/901_doc/appdev.901/a88876/adg13trg.htm#431
CREATE OR REPLACE TRIGGER someTriggerName
AFTER LOGIN ON ([someSchemaName.]SCHEMA or DATABASE)
DECLARE
BEGIN
-- Run procedure here User name is in SYSTEM
-- variable LOGIN_USER.
END;Good Luck,
Eric Kamradt -
I have two Ipod touches registered under the same apple user name. I no longer wish for them to share itunes cards. How do I seperate them?
Hi,
It is expected to receive 2 different IP on 2 interfaces on a single machine if it is connected on both wired and wireless. Built-in Parental Control feature does not require an IP address to configure - it uses the machine's hostname for identification.
If everyone needs to believe in something, I believe I'll have another beer.. -
Not able to connect through Application user name in Discoverer Admin
Hi,
I created an EUL with all privileges it needed. I created a business area from that EUL and shared it to Application User name through giving access privileges (from Security and Privileges). When I am trying to login through the Application User name in Discoverer Admin it is giving the error like:
Failed to connect to database - Unable to connect to Oracle Applcations database: invalid username/password.
Earlier I did in another instance it worked fine but now itself I am facing the problem.
Thanks & Regards,
Arun Babu R.Hi,
Please post the application release along with the database version and OS.
What is the Discoverer version?
Please see these docs.
Connecting to an E-Business Suite EUL Using Any Discoverer Component Fails With "Authentication Failed" or "ORA-01017: invalid username/password;logon denied" [ID 364665.1]
Discoverer 10g (10.1.2) Connections To Oracle E-Business Suite 12 Fails With 'Invalid Username/Password' [ID 443661.1]
Discoverer 10g (10.1.2) Plus/Viewer Connection To E-Business Suite Database Fails With " invalid username/password" Error [ID 467919.1]
Connecting to Oracle EBS 11.5.10 with Discoverer 4i/10g Fails with ORA-01017 Invalid Username/Password Error [ID 295037.1
Discoverer Desktop/Administrator 10g (10.1.2.2) Fails To Connect With Error 'Unable to connect to Oracle Applications database: invalid username/password. ' Only Between Certain Hours [ID 757384.1]
Connecting to Oracle EBS with Discoverer Fails with ORA-01017 Invalid Username/Password Error [ID 784358.1]
Discoverer 4i Viewer/Plus Logon To Oracle Applications EUL Fails with "ORA-1017 Invalid Username/Password" Unless a Colon '' : '' is Entered After Username [ID 360314.1]
Questions And Guidance For Troubleshooting Common Discoverer Desktop and Administrator Connection Issues [ID 415614.1]
Thanks,
Hussein -
User Name and/or Password not accepted
I am trying to install something so it is asking for my username and password. No matter what I enter it says it is invalid. I have tried resetting my password and logging out and logging back in with the new password which worked. But still when I get to the install page it asks for my login username and password and then denies it.
Molly Blank wrote:
I am trying to install something so it is asking for my username and password. No matter what I enter it says it is invalid. I have tried resetting my password and logging out and logging back in with the new password which worked. But still when I get to the install page it asks for my login username and password and then denies it.
When you boot Leopard and get to the Login Screen, do you enter the same Login User name and password? -
To find whether User name has SAP log in ID
Dear all
How to check up particular user name has SAP log in ID are notHi,
Go to transation SU01. Drill down on user. Enter the user name & press enter. Check the user id for selected user name & click on Display. If the user has user id in SAP, then system will show the details, otherwise messgae will appear stating that the user id does not exist.
Regards,
Prashant -
How to get BP kind based on user name?
Hi,
How to get BP kind based on user name?
Is there any table other than BUT000 which gives the Business partner no. and BP KIND?
What is BLUEPRINT table?Hi John,
do you mean Type:
1 Person
2 Organisation
3 Group
or Role like
000000 Business Partner (General)
BBP000 Vendor
BBP001 Bidder
BBP002 Portal Provider
BBP003 Plant
BBP004 Purchasing Company
BEA001 Billing Unit
BUP001 Contact Person
BUP002 Prospect
BUP003 Employee
BUP004 Organizational Unit
BUP005 Internet User
The Role can be found in BUT100.
Regards
Gregor -
Had some issues with Firefox 35.0.1 trying to post on this forum. Fox would not accept my login, so I requested to reset my password. Password reset O.K. still a no go, thought my login was bad and requested them send my "User name" (same email) User name never arrives. I had to create a new account on the forum to post this question as I can't get my old login to work.
Anyone else having this problem or has Firefox been hacked and my "User Name" sent to someone else?Hi maheman,
Can you try to recover the password with the email and private message me a timestamp. I can ask an admin to take a look at the technical side of what is happening, the email is removed from the public thread, however it may be necessary to investigate. (please include just the username in the private message)
Thank you. -
Can't send email after following Apple instructions to delete acct and then start it again......Same message user name or password is incorrect????
Running Ios7.2Can't send email after following Apple instructions to delete acct and then start it again......Same message user name or password is incorrect????
Running Ios7.2 -
Browser bypasses "User Name" and "password" goes direct to "set up"
My WRT54G v 3 with firmware 3.03.9 will not bring up the "user name" and "password" page. When I browser into it (192.168.1.1) it goes *directly* to the set up page without requesting a user name or password. When I tab to Administration and attempt to change the password (that it does not ask for when I browser in), it says the password is invalid. I tried "admin" and it says the same thing.
I have used WRT54G v 5 and WRT54Gs v 6 and WAP54G v 1 and they all act the same- The "user name" and "password" page comes up after I browser in and I type "admin" to get to the set up page. This router goes direct to the set up page and will not let me change the password.
What is going on here ? Other than this, it works perfect. Thank you in advnace. John.this is happening because the browser remembers the password of the router.thi is what you need to do to so the browser does not remember.
on the browser (IE) open "tools" and then "internet options" then go to the "content" tab and click on "auto complete" Uncheck all valid options here and also clear forms and passwords.
Maybe you are looking for
-
I cannot burn a cd in itunes on my macbook pro
for some reason when i put a cd in and try to burn a playlist a message flashes on itunes saying " disk burner or software not found" however i definitely made a cd on this computer before. anybody got any tips?
-
Problems with L4 and NIK SEP 2.
I can't get NIK Silver Effects Pro 2 to open when I am in LR4. Any suggestions? I have L4.0 and am hesitant to download L4.1 if the glitch has not been solved by it. Thanks.
-
Can't upload from more than one card
I recently upgraded to Snow Leopard, and now when I use Aperture 3, either in 32-bit or 64-bit mode, I can upload images from one of my CF cards just fine, but if I try to upload from a second card, everything looks like it's going to work fine, but
-
PL/SQL Counter for HTMLDB - Application Express - Survey Counter
I wonder if somebody could help me to clarify the HowTo on this Survey. Based on: http://www.oracle.com/technology/products/database/application_express/index.html http://www.oracle.com/technology/oramag/oracle/06-mar/o26browser.html I follow up howe
-
How to make pack200 work with applet tag ?
Hello All, Sorry for the cross-post. I tired getting the advise on java.net forum but with no success. Can someone here please help with this or direct me to right direction. I am trying to use the pack200 compressed jars for my Object/Applet tag, bu