How to check object privilege for procedure, packages?
Dear Legends,
what is the query to find the Grant Permissions provided to a User on particular object such as Procedure, Package and Function?
DBA_TAB_PRIVS is not giving me the answer.
Can any one help me on this?
Thanks,
Karthik
Maybe something like this?
SQL> create procedure p as
2 begin
3 null;
4 end;
5 /
Procedure created.
SQL> grant execute on p to scott;
Grant succeeded.
SELECT p.grantor, p.grantee, o.object_name, o.object_type, p.privilege
FROM all_tab_privs p
JOIN all_objects o ON (p.table_name = o.object_name and p.table_schema = o.owner)
WHERE o.object_name = 'P'
AND p.grantor = 'SELSE';
GRANTOR GRANTEE OBJECT_NAME OBJECT_TYPE PRIVILEGE
SELSE SCOTT P PROCEDURE EXECUTE
Similar Messages
-
How to check with table for cursor..?
How to check with table for cursor..?
Here I have Table temp_final_plan
Here i want to update if already exit...below is the procedure....
CREATE OR REPLACE PROCEDURE spu_final_profit_plan
AS
-- Constant declarations
ln_errnum number := 0;
-- Variable declarations
ls_errmsg app_errors.err_msg%TYPE;
ls_appmsg app_errors.app_msg%TYPE;
ls_appid app_errors.app_id%TYPE;
-- Cursor declaration for final_update_el
CURSOR cur_final_update_el IS
select '910' ent,
'9127316' center,
post_acct,
sum(avg_mtd_01) sum_avg_mtd_01,
sum(avg_mtd_02) sum_avg_mtd_02,
sum(avg_ytd_01) sum_avg_ytd_01,
sum(avg_ytd_02) sum_avg_ytd_02
from mon_act_cypy
where rec_type = 'A'
and sum_flag = 'D'
and yr = '2008'
and substr(ctr_or_hier, 1, 2) = 'el'
and ent || sub_ent in
(select ent || sub_ent
from ent_ref
where roll_ent || roll_sub_ent = '999100')
group by post_acct
having sum(avg_mtd_01) <> 0
or sum(avg_mtd_02) <> 0
or sum(avg_ytd_01) <> 0
or sum(avg_ytd_02) <> 0;
-- Cursor declaration for final_update
CURSOR cur_final_update IS
select b.plan_ent b_plan_ent,
b.plan_ctr b_plan_ctr,
a.post_acct a_post_acct,
sum(a.avg_mtd_01) sum_avg_mtd_01,
sum(a.avg_mtd_02) sum_avg_mtd_02,
sum(a.avg_ytd_01) sum_ytd_mtd_01,
sum(a.avg_ytd_02) sum_ytd_mtd_02
from mon_act_cypy a,
plan_unit_tbl b
where a.ent || a.ctr_or_hier = b.ent || b.ctr_or_hier
and a.rec_type = 'A'
and a.sum_flag = 'D'
and a.yr = '2008'
and b.hier_tbl_num = '001'
and a.ent || a.sub_ent in
(select ent || sub_ent
from ent_ref
where roll_ent || roll_sub_ent = '999100')
group by b.plan_ent, b.plan_ctr, a.post_acct
having sum(a.avg_mtd_01) <> 0
or sum(a.avg_mtd_02) <> 0
or sum(a.avg_ytd_01) <> 0
or sum(a.avg_ytd_02) <> 0;
-- Begin the procedure body
BEGIN
-- Insert / Update final profit plan for final_update query using cursor
FOR rec_final_update_el IN cur_final_update_el
LOOP
EXIT WHEN rec_final_update_el%NOTFOUND;
IF rec_final_update_el. THEN
UPDATE temp_final_plan
SET sum_avg_mtd_01 = rec_final_update_el.sum_avg_mtd_01,
sum_avg_mtd_02 = rec_final_update_el.sum_avg_mtd_02,
sum_avg_ytd_01 = rec_final_update_el.sum_avg_ytd_01,
sum_avg_ytd_02 = rec_final_update_el.sum_avg_ytd_02,
WHERE ent = rec_final_update_el.ent
AND center = rec_final_update_el.center
AND post_acct = rec_final_update_el.post_acct;
ELSE
INSERT INTO temp_final_plan VALUES(rec_final_update_el.ent,
rec_final_update_el.center,
rec_final_update_el.post_acct,
rec_final_update_el.sum_avg_mtd_01,
rec_final_update_el.sum_avg_mtd_02,
rec_final_update_el.sum_avg_ytd_01,
rec_final_update_el.sum_avg_ytd_02);
END IF;
END LOOP;
-- Insert / Update final profit plan for final_update query using cursor
FOR rec_final_update IN cur_final_update
LOOP
EXIT WHEN rec_final_update%NOTFOUND;
IF rec_final_update. THEN
UPDATE temp_final_plan
SET sum_avg_mtd_01 = rec_final_update.sum_avg_mtd_01,
sum_avg_mtd_02 = rec_final_update.sum_avg_mtd_02,
sum_avg_ytd_01 = rec_final_update.sum_avg_ytd_01,
sum_avg_ytd_02 = rec_final_update.sum_avg_ytd_02,
WHERE ent = rec_final_update.b_plan_ent
AND center = rec_final_update.b_plan_ctr
AND post_acct = rec_final_update.a_post_acct;
ELSE
INSERT INTO temp_final_plan VALUES(rec_final_update.b_plan_ent,
rec_final_update.b_plan_ctr,
rec_final_update.a_post_acct,
rec_final_update.sum_avg_mtd_01,
rec_final_update.sum_avg_mtd_02,
rec_final_update.sum_avg_ytd_01,
rec_final_update.sum_avg_ytd_02);
END IF;
END LOOP;
-- EXCEPTION handling section
EXCEPTION
-- Fire OTHERS Exception case by default
WHEN OTHERS THEN
-- ROLL BACK Transaction, if any failure
ROLLBACK;
ln_errnum := SQLCODE;
ls_errmsg := SUBSTR(SQLERRM, 1, 100);
-- Log the ERRORS into APP_ERRORS table using SPU_LOG_ERRORS procedure
spu_log_errors(ln_errnum, ls_errmsg, ls_appid, ls_appmsg);
-- End of the stored procedure
END spu_final_profit_plan;
[\pre]I'm not sure what you mean by, 'How to check with table for cursor..?' but I'll offer a comment on your Code Snippet. I think you want to know how to check if a record exists so you know if you need to perform an INSERT or an UPDATE.
Here is a snippet of your code. I'll put my comments in "Comment" style in your code.
-- Insert / Update final profit plan for final_update query using cursor
FOR rec_final_update_el IN cur_final_update_el
LOOP
/* There is no need to test for %NOTFOUND since you are using Cursor FOR Loop!
** This construct automatically exits when the last record is processed. */
EXIT WHEN rec_final_update_el%NOTFOUND;
/* Is this where you would like to know how to Check if the record already exist??
** I asked this because, 'rec_final_update_el.' is not valid syntax. Are you looking for
** an Cursor Attribute or Method you can check here?
** I would suggest a Primary Key or Unique Index on ENT, CENTER, and POST_ACCT
** on the TEMP_FINAL_PLAN table. Then simply perform an INSERT and code an
** Exception to UPDATE when you get a DUP_VAL_ON_INDEX exception. Otherwise,
** you will need to simply run an Implicit or Explicit Cursor to test if the row exists and
** use this return value to determine if you should INSERT or UPDATE. */
IF rec_final_update_el. THEN
UPDATE temp_final_plan
SET sum_avg_mtd_01 = rec_final_update_el.sum_avg_mtd_01,
sum_avg_mtd_02 = rec_final_update_el.sum_avg_mtd_02,
sum_avg_ytd_01 = rec_final_update_el.sum_avg_ytd_01,
sum_avg_ytd_02 = rec_final_update_el.sum_avg_ytd_02,
WHERE ent = rec_final_update_el.ent
AND center = rec_final_update_el.center
AND post_acct = rec_final_update_el.post_acct;
ELSE
INSERT INTO temp_final_plan VALUES(rec_final_update_el.ent,
rec_final_update_el.center,
rec_final_update_el.post_acct,
rec_final_update_el.sum_avg_mtd_01,
rec_final_update_el.sum_avg_mtd_02,
rec_final_update_el.sum_avg_ytd_01,
rec_final_update_el.sum_avg_ytd_02);
END IF;
END LOOP;I hope I've answered your question, but if I haven't please provide more details so we can better understand your request.
Craig... -
How to check the last time a package has been compiled?
How to check the last time a package has been compiled from sqlplus?
LAST_DDL_TIME column in DBA_OBJECTS.
-
How to check call duration for total dialled calls (after resting) on a particular day in iphone 4?
Is there a solution like iphone 5, i.e.Settings > Cellular.if the device is unlocked cellular is called mobile
-
How to grant view privilege for Instant Portal to public users?
How to grant view privilege for Instant Portal to public users?
Oracle Instant Portal was designed to offer secure access to company and departmental information, and it isn't currently possible to make instant portal pages public.
-
How to check granted privileges on role.
Hi,
Can any one explain how to check granted privileges on role.
I have created one role called ALL_SYSPRIVS
but I forgot what privileges granted to this role
Thank you...Hi Vijay,
Last week i saw the following thread:
Finding the privileges assigned to a user
Re: Finding the privileges assigned to a user
From there, you'll be able to find a few scripts that will provide you with an overview of grants assigned to user, or role....
HTH,
Thierry -
How to find Object name for a object?
Hi Experts,
How to find Object name for a particular Object? Is there a Tcode for it?
__Like Object name for__
Material number - materialnr
Goods receipts / return - matbeleg
Accounting documents - rf_beleg
How to find Object name for other Objects? Is there a particular way?
Thanks & Regards
ChandanHi,
You can find objects in SNRO transaction.
In SNRO search by giving long text...
for eg., Service .. for service entry sheet. keep the first letter in capital letter only.
Thanks & Regards,
Anand. -
How to check the privileges assigned to a role
Hi All,
Can you please let me know how to check the privileges assigned to a role in Oracle?
When I query the dba_tab_privs it says no rows returned.
Please help..
Regards,
Danuser9212851 wrote:
Can you please let me know how to check the privileges assigned to a role in Oracle?
When I query the dba_tab_privs it says no rows returned.
When you've checked the manuals and identified the views suggested by other posters you will find that it's still not a trivial problem since a role may be granted to another role - which means you need to do some recursion to uncover all the privileges available to a role.
Pete Finnigan - who specialises in Oracle security - published some appropriate scipts a few years ago; they are probably still relevant. Here's a starting link: http://www.petefinnigan.com/weblog/archives/00001243.htm
Regards
Jonathan Lewis -
How to check IGS version and procedure for upgrading IGS patch level
Hi all,
We are on BIW 3.5 .Iam not clear about how to check the version of IGS and its patch level .I went through various notes but still iam confused with tracing it , can someone plz help out?
Secondly want to upgrade IGS version i went through note 454042 but still confused with doing that , Can someone plz refer other notes or detailed procedure for upgrading IGS.
Our BIW Production and Test are on AIX and Development is on HP-Unix OS .
Points guaranteed for the same. Requested to revert at earliest as this is urgent .
Regards,
SaumyaHi,
Check this link which may help u:
http://sap.ittoolbox.com/groups/technical-functional/sap-basis/igs-upgrade-1455477
The installation/upgrade procedures for the integrated IGS are as follows:
Integrated Version Installation
The integrated IGS is automatically installed with the SAP Web Application Server.
Integrated Version Upgrade
You find the upgrade files for the integrated IGS version on the SAP Service Marketplace:
http://service.sap.com/swdc ® Download ® Support Packages and Patches ® Entry by ApplicationGroup ® SAP Frontend Components ® SAP IGS ® SAP IGS .
There, you find the IGS executables and libraries (igsexe_.sar) as well as the IGS folder structure (igshelper_.sar) containing among others font files.
With the upgrade files of the executables and libraries, proceed exactly like you would with kernel patches (for example, extract the Archive to the same location). More information about kernel patches can be found in the related note 19466 in the section Copying and Installing a Patch.
The upgrade files for the IGS folder structure must be extracted to the instance directory (DIR_INSTANCE). More information can be found in note 1028690.
After a restart of the Web AS the new IGS is up and running.
Information about finding out your IGS patch level is provided in note 931900.
For an upgrade of an integrated IGS please also check note 896400.
For more info check this SAP Help doc:
http://help.sap.com/saphelp_nw04s/helpdata/en/4b/72d43ac66e1f08e10000000a114084/frameset.htm
Hope these helps u...
Regards,
KK. -
How to create object class for a z table
Hi All,
I have a z table and I want to register the changes of fields should be logged to CDHDR and CDPOS table.
Is this possible?
If yes how can I creat an object class for a z table. I have already checked the change document option in z data element.
Please help.
Regards,
Jeetu
Moderator message: standard functionality, please search for available information/documentation before asking.
locked by: Thomas Zloch on Oct 6, 2010 6:16 PMTcode SCDO. You'll need to create a change document for you Z table and then use the FM created to record the changed data.
-
Dear Team,
I want to check Object Code of T_Code:OMJJ.
In T_code:SE93.it not showing .
How I check Perticulater Object Code for Transastion OMJJ
thanks
kallisIn SU24 it show
@5B\QMaintained@ S_CTS_ADMI Administration Functions in Change and Transport System Check NO
@5B\QMaintained@ S_DATASET Authorization for file access Check NO
@5B\QMaintained@ S_DEVELOP ABAP Workbench Check NO
@5B\QMaintained@ S_DOKU_AUT SE61 Documentation Maintenance Authorization Check NO
@5B\QMaintained@ S_GUI Authorization for GUI activities Check NO
@5B\QMaintained@ S_PRO_AUTH IMG: New authorizations for projects Check NO
@5B\QMaintained@ S_PROJECT Project Management: Project authorization Check NO
@5B\QMaintained@ S_TABU_DIS Table Maintenance (via standard tools such as SM30) Check NO
@5B\QMaintained@ S_TABU_RFC Client Comparison and Copy: Data Export with RFC Check NO
@5B\QMaintained@ S_TCODE Transaction Code Check at Transaction Start Check NO
@5B\QMaintained@ S_TRANSLAT Translation environment authorization object Check NO
@5B\QMaintained@ S_TRANSPRT Transport Organizer Check NO
It show So many Object and it standed object .and at last it show NO in Proposal Colom
Thanks
kallis -
[Win-ILL 10]How to check overprint & color for Pattern Swatches?
Hi all,
Im using Visual C++ 6.0 & Illustrator 10.
Please tell how to check whether overprint is applied to an object inside a Pattern Swatch(I dont want to Expand the object)
I also want to get the color for the object inside the Pattern Swatch
.Any Solution for this?
Thanks
myRiazThe reference to port 427 is in any firewall on the computer. Network communication is done over these ports and the job of the firewall is to monitor and block these ports.
This document might also be relevant for the problem.
http://h10025.www1.hp.com/ewfrf/wc/document?docname=c04011652&lc=en&cc=us&dlc=en&product=5199463
I was an HP employee.
Please mark the post that solves your problem as "Accepted Solution" -
How to include objects of a z* package into a single request
Hi Gurus,
The requirement is I need to include all the objects in a z*package into one single request.One way is I find out latest version of each program and include it in request.But there are some 200 objects in the package.Is there any simple way to do it , I mean is there any option wherein I type the package name and all programs get included in the request..........
Helpful answers will be rewarded
Regards,
Raghu.Please try this ..
Goto SE09 ..
Create a transport request ...
Delete the sub-task ..
Now place cursor on main task(request)
click on Include objects(Ctrl+F11)
In the popup check 'Freely selected objects' radio button .. click Ok
Enter the package name ... and any other parameters .. and F8 ..
This will include all the objects in the particular package selected ..
Then release the task ... -
How to check Business Partner for archiving ?
Hi friends,
I want to check the BP for Archiving.
So I am trying to set the Archiving Flag in BP Status Tab
But the Archiving Falg Check box is never in Display Mode and so I am not able to check the BOx. What is the use of that box if it can't be accessed ? Any clues on how to check it ?
Many thanks
C.K.Hi,
You can run DACONTROL transaction to set the deletion flag for business partner.
-Thanks,
Ajay -
How to check a value for paramter query
I am passing a paramter value from my text box to my sql statement and I would like to check if the value is entered into a text box. If you have any idea please share it with me, i have been struggling with this for many days.Code below is how i try to check if the value is entered but I do not know how to check the value in the :VendorName
thanks
If Not txtVendorName.Text = "" Then
Sql = Sql & " AND (Upper(V.VNAMEL) LIKE '%' || Trim(Upper(:VendorName))|| '%') "
End IfSorry guys english is not my first language and i will try to be clear and specific.
I have a search page where customeres can do searching either using a text box or two dropdowns i have on my page. they have the option of doing search either using a text box or dropdowns or both.Everything seems to work fine but if users does not leave the text box blank. but they leave the text box blank and do searching using the two dropdowns then the page comes up empty and i checked my query and i should get a value. Attacehed my code for you to look at it.
<pre>
Sub VendorSearch()
gvSearch.Visible = True
Dim MinPDate As String = drPur.SelectedItem.ToString
Dim MaxMDate As String = drPurM.SelectedItem.ToString
Dim liThisOne As ListItem
Dim strState As String = ""
For Each liThisOne In lstState.Items
If liThisOne.Selected Then
strState = strState & "'" & liThisOne.Value & "'" & ","
End If
Next
Dim Sql As String = " SELECT distinct V.VENDOR ""Vendor Id"",R.ADDRNUM,V.VNAMEL ""Vendor Name"",R.AADDR1,R.ACITY,R.VASST1, "
Sql = Sql & "R.ASTATE State,R.AZIPCODE, to_char(Max(P.DATEPUR),'YYYY/DD/MM') ""Plan Purchased Date"" , "
Sql = Sql & "TRIM (r.aaddr1 || decode(trim(r.aaddr2),null,'',' - ') || r.aaddr2) Address,"
Sql = Sql & " substr(decode(trim(r.vasst1),null, 'N/A','000/000-0000?','N/A','000/000-0000','N/A', r.vasst1),1,12) Fax, "
Sql = Sql & " substr(decode(trim(r.aphone),null, 'N/A','000/000-0000?','N/A', r.aphone),1,12)Phone "
Sql = Sql & "FROM VENDOR V,VENDADDR R, PLANHOLD P "
Sql = Sql & "WHERE V.VENDOR = R.VENDOR AND P.VENDOR = R.VENDOR "
Sql = Sql & " AND (P.DATEPUR >= TO_DATE('1999-01-01','YYYY-MM-DD')) "
Sql = Sql & "AND P.DATEPUR In ( select Max(P.DATEPUR) from PLANHOLD P where P.vendor = R.VENDOR) "
'If txtVendorName.Text <> "" Then
' Sql = Sql & " AND (Upper(V.VNAMEL) LIKE '%' || Trim(Upper(:VendorName))|| '%') "
'End If
If (strState.Length > 0 And lstState.SelectedIndex <> 0) Then
strState = Left(strState, strState.Length - 1)
strState = "(" & strState & ")"
Sql = Sql & "AND R.ASTATE IN " & strState
End If
If (drPur.SelectedIndex <> 0 And drPurM.SelectedIndex <> 0) Then
Sql = Sql & " AND to_number(to_char(p.datepur, 'YYYY')) between " & "'" & MinPDate & "'" & " AND " & "'" & MaxMDate & "'"
End If
' Dim Para As String
' SqlDataSource1.SelectParameters.
If Not txtVendorName.Text = "" Then
Sql = Sql & " AND (Upper(V.VNAMEL) LIKE '%' || Trim(Upper(:VendorName))|| '%') "
End If
'If Not IsDBNull(SqlDataSource1.SelectParameters(":VendorName")).val Then
' Sql = Sql & " AND (Upper(V.VNAMEL) LIKE '%' || Trim(Upper(:VendorName))|| '%') "
'End If
Sql = Sql & " AND V.VOBSOLET = 'N' "
Sql = Sql & "GROUP BY V.VENDOR, R.ADDRNUM,V.VNAMEL,R.AADDR1,R.AADDR2,R.ACITY,R.ASTATE, R.AZIPCODE, R.APHONE, R.VASST1, P.DATEPUR "
Sql = Sql & "ORDER BY V.VENDOR "
Response.Write("Sql " & "<br/>" & Sql & "<hr/>")
SqlDataSource1.SelectCommand = Sql
End Sub
</pre>
Maybe you are looking for
-
To run the java application without jdk package
i would like to know whether possible to make the java .class file as .exe file to run in window environment without the help of jdk package.....if the answer is yes,,,,,is it going to use the jvm???is it come together with window os or not and start
-
I am new to Service module,can anybody give the over view of service module
I am new to Service module,can anybody give the over view of service module including base table and Relation ship with other Oracle Application module.
-
How to implement a parallel approval?
Hi, all. My process has a parallel approval, but I have no idea how to implement it. I have a task which has to be approved by three different managers parallelly. If all of them approve the task, then the task will keep going, otherwise the task fai
-
HT1338 address book, max number of contacts allowed???
I'm importing some Vcards into my macbook air address book, but its stock on 1043, is there a limit for the contacts that can be manage by this application?
-
when i try send a email off my iphone its says my house name is wrong,how do i find out which is the correct name?