GRANT SELECT to TEMP(by procedure)..... ALL tables and views of OWNER....
hi ,
I want to privelege only Grant SELECT ALL tables,views....
I have written A procedure.....given below....
CREATE OR REPLACE PROCEDURE GRANT_SELECT_ALL_PROC
IS
l_obj VARCHAR2(60);
l_obj_type VARCHAR2(60);
CURSOR Cur_Obj IS
SELECT OBJECT_NAME,OBJECT_TYPE
FROM USER_OBJECTS
WHERE USER ='OWNER';
BEGIN
For i in Cur_Obj Loop
l_obj := i.OBJECT_NAME;
l_obj_type := i.OBJECT_TYPE;
IF l_obj_type IN ('TABLE','VIEW')
THEN
EXECUTE IMMEDIATE 'GRANT SELECT ON' || l_obj ||'TO TEMP’;
ELSIF l_obj_type IN('FUNCTION','PROCEDURE','PACKAGE') THEN
EXECUTE IMMEDIATE 'GRANT EXECUTE ON'|| l_obj ||'TO TEMP’;
END IF;
END LOOP;
END GRANT_SELECT_ALL_PROC;
procedure is working fine.....
OWNER there are some table and views......
But After creation of User name TEMp....
When I m giving GRANT SELECT to TEMP(by procedure)..... ALL tables and views of OWNER....
when I coonecte to TEMP...
Not getting table,view List...
not even data of table or Views.....
can anybdy help me.......advance thanx ...
sanjay
hi ,
I want to privelege only Grant SELECT ALL
tables,views....
have written A procedure.....given below....
CREATE OR REPLACE PROCEDURE GRANT_SELECT_ALL_PROC
IS
l_obj VARCHAR2(60);
l_obj_type VARCHAR2(60);
CURSOR Cur_Obj IS
SELECT OBJECT_NAME,OBJECT_TYPE
FROM USER_OBJECTS
WHERE USER ='OWNER';
BEGIN
For i in Cur_Obj Loop
l_obj := i.OBJECT_NAME;
l_obj_type := i.OBJECT_TYPE;
IF l_obj_type IN ('TABLE','VIEW')
THEN
EXECUTE IMMEDIATE 'GRANT SELECT ON' || l_obj ||'TO
TEMP’;
ELSIF l_obj_type IN('FUNCTION','PROCEDURE','PACKAGE')
THEN
EXECUTE IMMEDIATE 'GRANT EXECUTE ON'|| l_obj ||'TO
TEMP’;
END IF;
END LOOP;
END GRANT_SELECT_ALL_PROC;
procedure is working fine.....
OWNER there are some table and views......
But After creation of User name TEMp....
When I m giving GRANT SELECT to TEMP(by
procedure)..... ALL tables and views of OWNER....
when I coonecte to TEMP...
Not getting table,view List...
not even data of table or Views.....
can anybdy help me.......advance thanx ...
sanjayQuery SELECT * FROM USER_TAB_PRIVS_MADE from the user from which you are executing the procedure
and Query SELECT * FROM USER_TAB_PRIVS_RECD from the TEMP user.
Similar Messages
-
How to find all table and views in the database
Hi,
I want to find all table and view name form the database can u tell me syntax.
i.e. I am able to find out table name and view name in sql server ...like
FOR VIEW :
select table_name from information_schema.views where table_name not like 'sys%'
FOR TABLE :
select table_name from information_schema.tables where table_name not like 'sys%' and table_type='Base table'
Thanks & Regards,
ShirishHello,
Take a look at "dba_tables" and "dba_views" both of which are documented here:
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14237/toc.htm
- Mark -
EXPORT SCHEMA 'S ALL TABLES AND PROCEDURES BY EXPDP
how i can export schema's all tables and procedures using expdp.
when i am giving expdp usr/pass schemas=scott directory=export_dir dumpfile=280606.DMP logfile=280606.log tables=*
but it is giving error.
pls help
regards
PrabhakerYou only need to specify parameter USER or TABLES , no need of both
specify USER=SCOTT then it will export all objects in SCOTT -
Extract schema/metadata - names for all tables and attributes
Hi, I am quite new to Oracle DB (only been doing dev mostly with sqlserver before). Is there a way to extract schema (names for all tables and attributes) for 10g and 11g in application code (either java or .net) or pl/sql?
Thank you,
-TonyThere are built in views that start with DBA_, ALL_, and USER_. All means all the user can see, user means all the user has, and dba means everything, which generally means the same as the others plus an owner. So you can desc user_tables to see what-all that view has, then select columns from the view with ordinary sql. See the doc set for all the views available, interesting ones are ...views, ...objects, ...tab_cols and so forth.
There are also built in procedures for getting metadata, google for details.
Many tools have easy GUI's for this too. EM has ways on the administration screen to get to various objects, and then you can show the ddl. Maybe sqldeveloper has something too. -
Calling procedures from table and apex
Hi
I have a stored procedures and I want to put my stored procedures in table and I want to call store procedure from table in apex. how can I do this?
For example
I have stored procedures like Students(year number,birimno number)
GPA(birimno number,studentno number ) Student Procedure and GPA proecdure retrieve name and lastname
and I want to create a table
table has
Id Package Procedurename Arguments Header
1 GPA birimno, studentno name, lastname
2 Students year, birimno name,lastnameSo how can I do like this ? I want to call storeprocedures on APEX with selectlist. Selectlist will has a storeprocedures .
Edited by: esra aktas on 06.May.2011 01:48
Edited by: esra aktas on 06.May.2011 01:48
Edited by: esra aktas on 06.May.2011 04:08I am beginner pl/sql .
I had searched execute immediate for helping my problem.
My purpose is that I want to collect all of procedures in one table. And I must retrived which I select procedure on APEX Selectlist.
So I started to create a table which name is procedures and I put my procedures names on it.
Now how can I execute to procedures that name is in table?
create or replace
procedure "ISINIF_BASARI"(normalyariyil number,birimno number )
IS
ogrenci_no VARCHAR2(12);
ders_kodu VARCHAR2(12);
ders_adi VARCHAR2(50);
harf_kodu VARCHAR2(4);
CURSOR c_basari IS
select dk.ogrenci_no,da.ders_kodu,da.ders_adi,dk.harf_kodu
into ogrenci_no,ders_kodu,ders_adi,harf_kodu
from ders_aktif da,ders_tanim dt, ders_kayit dk
where da.ders_kodu like birimno ||'%'
and (dt.normal_yariyili=normalyariyil
OR dt.normal_yariyili=normalyariyil+1)
and (da.acildigi_donem='1' or da.acildigi_donem='2')
and dt.ders_kodu = da.ders_kodu
and dk.acilan_ders_no = da.acilan_ders_no
BEGIN
FOR I IN c_basari LOOP
dbms_output.put_line(' OGRENCI NO '||I.OGRENCI_NO||' DERS KODU '|| I.DERS_KODU||' DERS ADI '||I.DERS_ADI||' HARF KODU '||I.HARF_KODU);
end loop;
end;I have procedure like that.
and I have a procedures table. And I put the procedure's name in table.
procedure
id procname
1 ISINIF_BASARI
Now I want to call procedure using this table .
When I call yhe procedures from table I wrote like this. But it has faults.
create or replace
PROCEDURE CALLSPFROMTABLE as
v_sql_exp VARCHAR2(100);
BEGIN
v_sql_exp :='begin'||'select p.procname from procedure p where id=1'||'end;';
end;Edited by: esra aktas on 07.May.2011 02:19 -
mod_plsql: ORA-942 Execute(Temp BLOB) ORA-00942: table or view does not exist
This is the error I get in the Apache log. On the page:
"The requested URL /pls/apex/wwv_flow.accept was not found on this server."
I am sure this is just a configuration issue. I installed v1.6 with the http server off the companion cd with the db (10.2.0.1). After I had it working (did not test everything) I upgraded to 3.0.1.
I get this message when I am trying to import an application that I just exported! I am testing this for pushing code up to our production environment.
My dads.conf file looks like:
Alias /i/ /oracle/product/apps/htmldb/images/
AddType text/xml xbl
AddType text/x-components htc
<Location /pls/apex>
SetHandler pls_handler
Order deny,allow
Allow from all
AllowOverride None
PlsqlDatabaseUsername APEX_PUBLIC_USER
PlsqlDatabasePassword xxxxxx
PlsqlDatabaseConnectString 192.168.2.195:1521:idpdev ServiceNameFormat
PlsqlDefaultPage apex
PlsqlDocumentTablename wwv_flow_file_object$
PlsqlDocumentPath docs
PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
PlsqlAuthenticationMode Basic
PlsqlNLSLanguage AMERICAN_AMERICA.WE8ISO8859P1
</Location>
marvel.conf file is empty
There is a log file for pl/sql.... it has the following text in it that seemed pertinent: Attempting to logon with '(unknown)'
Also a log that says this and seems to have a "special character" in it that may be causing an issue:
<1133864024 ms>6565646261636b206f6e a70726f6d707420202e2e2e646f6e65 a
<1133864024 ms>-----------------------------2444716671664
<1133864024 ms>^M
<1133864024 ms>UploadBlobDoc: readahead 27 bytes into 82f5e5c
<1133864024 ms>UploadBlobDoc : Inserting piece OCI_NEXT_PIECE
<1133864024 ms>UploadBlobDoc:Attempt to write 2048 bytes(offset 249857)
<1133864024 ms>UploadBlobDoc:OCILobWrite for 2048 bytes (offset 249857)
<1133864024 ms>UploadBlobDoc: Read-Ahead buf 82f5e5c has 27 bytes
<1133864024 ms>UploadBlobDoc : Inserting piece OCI_LAST_PIECE
<1133864024 ms>UploadBlobDoc:Attempt to write 27 bytes(offset 251905)
<1133864024 ms>UploadBlobDoc:OCILobWrite finished for 27 bytes
<1133864024 ms>ORA-942 Execute(Temp BLOB) ORA-00942: table or view does not exist
<1133864024 ms>Stale Connection due to Oracle error 942
<1133864024 ms>/pls/apex/wwv_flow.accept HTTP-404 ORA-00942: table or view does not exist
<1133864024 ms>(wpu.c,594) longjumping back to the beginning
<1133864024 ms>(wpu.c,457) cleaning up before longjmp
<1133864024 ms>(wpu.c,461) doing a rollback
<1133864024 ms>(wpcs.c, 76) Executed 'rollback' (rc=0)
<1133864024 ms>(wpcs.c, 76) Executed 'begin dbms_session.reset_package; end;' (rc=0)
<1133864024 ms>(wpd.c,1816) Going to close cursor
<1133864024 ms>Freed BLOB
<1133864024 ms>DeinitCursor
<1133864024 ms>(wpx.c,690) Shutdown has been called
<1133864024 ms>(wpx.c,702) Going to logoff
<1133864024 ms>Logoff: Closing connection due to stale connection
<1133864034 ms>[ReqEndtime: 2/Oct/2007:15:38:11]
<1133864034 ms>[ReqExecTime: 80 ms]
I did go in and update the permissions to the wwv_flow_file_objects$ table to give PUBLIC full access to that table to see if that was the problem... it wasn't.
Probably information overload, but just wanted to be thorough. Anyone have any ideas?I also have another issue... probably more of a clarification....
I run the following to stop the process:
"/oracle/product/apps/opmn/bin/opmnctl stopproc ias-component=HTTP_Server"
then
"/oracle/product/apps/opmn/bin/opmnctl startproc ias-component=HTTP_Server"
But, at that point, it says that opmn is not running.
So I try:
"/oracle/product/apps/opmn/bin/opmnctl stopall"
then
"/oracle/product/apps/opmn/bin/opmnctl start"
then
"/oracle/product/apps/opmn/bin/opmnctl startproc ias-component=HTTP_Server" and it still says that opmn is not running.
Once I start running the stops and starts, it will eventually start correctly.
I think that I am trying the steps too fast and that I probably need to wait a bit between steps since that seems to work better that way. -
Where do i see all the default tables and views in oracle 10g
hi,
I have installed oracle 10g in the linux os.
I just wanna see the list of deffault tables and views created by oracle.
can anyoone hlep me on this
thanx in advance....Check DBA_OBJECTS for all seeded objects in an Oracle database. For tables, check DBA_TABLES. For views, check DBA_VIEWS. All of this is documented in the fine documentation - take some time out to read thru it.
http://docs.oracle.com/cd/E11882_01/server.112/e25513/statviews_4156.htm#REFRN23146
http://docs.oracle.com/cd/E11882_01/server.112/e25513/statviews_5056.htm#sthref2482
http://docs.oracle.com/cd/E11882_01/server.112/e25513/statviews_5085.htm#sthref2521
HTH
Srini -
Tables and views greyout in selection of data source
Hi
I have setup Data Gateway and data sources to a on-prem SQK server in Power BI for Office 365. I have connected to the onsite database but some of the tables and views are greyed-out. The warning relates to the tables not supporting oData but I am not
sure what I need to do from here. Most of the tables are OK and I cant see what would be causing some of them to not be supported.
Please advise
JasonGenerally speaking, there are two possible common reasons.
all columns in table is nullable.
Or you have an unsupported column data type in table. Please check here.
http://office.microsoft.com/en-us/office365-sharepoint-online-enterprise-help/supported-data-sources-and-data-types-HA104149785.aspx?CTT=5&origin=HA104079172 -
Pkg execution session id in all tables and Session Id of each interface
Hi
I am have one master package executing all interfaces for Staging and Target. Each staging interface loads the data from source to staging tables and target interface loads data from staging to Target. Each table has a column named ETL Batch Id and ETL Session Id. Our designer asked us to populate the ETL Batch Id with the Pkg execution id which will be same in all tables and also the ETL Session Id with the respective interface scenario execution session id which will be different in each table.
Question: 1. What is the purpose and advantage of storing ETL Batch Id in each table?
2. What is the purpose and advantage of storing ETL Session Id in each table?
3. Do I need both? (1 and 2)
BTW the ET design is for Star Schema (Data mart)
Thanks
OBIEE FanThis is really a question for your designer - there may be valid reasons why you'd want to store the session ID - maybe to help with break analysis or data quality monitoring. If you store the session ID in a table then you should be able to work out the "batch ID" by looking at the work repository/operator. But again, whether you "need" them is a question for your designer.
ODI may update rows as well as insert, so there may be considerations there as to how you tell the difference.
Edited by: _Phil on Oct 9, 2012 9:45 AM -
i connected my iphone 4 to the itunes and then i just select Backup. now i lost all songs and photos in my iphone. how can i do?
See: How to Restore from a backup here > iOS: How to back up
-
Hii guys, this is a very interesting question and i hope that it will have ample amount of answers.
My requirement is to know the number of tables and views and backend functions/procedures which are used in the code written in the oracle forms 6i,
all i want is to display whole views, tables or functions/procedures which are written in the code of a particular fmb, i do have the path of that fmb and i want to read the code and search through it's entire code for the tables/views/backend procedures/functions written in the code. So how to search through the entire code of a particular form (6i) and make it display through another form.
I am using oracle forms 6i.
Please help me out....
With Regards:
Ankit ChandraHere is a modified dealForm.jsp that merges the 2 steps - both symbol submission and Yahoo convert is done by it. Play with it and add your DB code to it:
<html>
<head><title>IPIB Database Selection</title></head>
<body bgcolor="#DFDFFF">
<H1><CENTER>IPIB Database Selection</CENTER></H1>
<font size=4>
<%@ page language="java" %>
<%@ page import="java.net.*,java.io.*,java.util.*" %>
<%
String symbol = request.getParameter("symbol");
if (symbol != null) {
String urlString = "http://finance.yahoo.com/download/javasoft.beans?SYMBOLS=" + symbol + "&format=ab";
try {
URL url = new URL(urlString);
URLConnection con = url.openConnection();
InputStream is = con.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String line = br.readLine();
StringTokenizer tokenizer = new StringTokenizer(line,",");
String name = tokenizer.nextToken();
name = name.substring(1, name.length()-2);
String price = tokenizer.nextToken();
price = price.substring(1, price.length()-2);
%>
<p>
Original line from yahoo <%= line %>
</p> <p>
Name: <%= name %>
</p> <p>
Price: <%= price %>
</p> <p>
Pub DB processing code from dealLoad.jsp here
</p>
<%
} catch (IOException exception) {
System.err.println("IOException: " + exception);
} else { %>
<form action="dealForm.jsp"method="GET">
<p>Enter Symbol: <input size="20" name="symbol">
<inputtype="submit" value="Submit">
</p></form>
<% } %>
</font>
</body>
</html> -
The Relation between tables and views in oracle financial
Dears
I am work in oracle e business r12
and i need to build report as xml
when run my select its need big time to view data i have a huge of data so i need to clear the relation of this tables if there is miss and if there another technique in select statement
this is my select statement
select
j_hdr.je_header_id je_header_id,
hdr.VENDOR_NAME supplier,
SEGMENT1||'-'||SEGMENT2||'-'||SEGMENT3||'-'||SEGMENT4||'-'||SEGMENT5||'-'||SEGMENT6||'-'||SEGMENT7||'-'||SEGMENT8||'-'||SEGMENT9 Account_number,
hdr.gl_date gl_date,
j_hdr.CURRENCY_CODE CURRENCY_CODE,
inv_lin.DESCRIPTION DESCRIPTION,
j_lin.ENTERED_DR ENTERED_DR,
j_lin.ENTERED_CR ENTERED_CR,
j_lin.ACCOUNTED_DR ACCOUNTED_DR,
j_lin.ACCOUNTED_CR ACCOUNTED_CR,
j_hdr.JE_SOURCE JE_SOURCE,
j_hdr.DEFAULT_EFFECTIVE_DATE Transaction_DATE,
hdr.INVOICE_NUM INVOICE_NUM,
QUICK_PO_NUMBER PO_NUMBER,
null ASSET_CATEGORY_ID,
hdr.VENDOR_ID VENDOR_ID
from gl_je_headers j_hdr,gl_je_lines_v j_lin,ap_invoice_distributions dist,ap_invoices_v hdr,ap_invoice_lines_v inv_lin
where code_combination_id = DIST_CODE_COMBINATION_ID
and hdr.invoice_id = inv_lin.INVOICE_ID
and dist.invoice_id = inv_lin.INVOICE_ID
and j_hdr.JE_HEADER_ID = j_lin.JE_HEADER_ID
and j_hdr.status = 'P'
and nvl(:P_SOURCE,'Payables') = 'Payables'
and je_source = 'Payables'
and j_lin.CODE_COMBINATION_ID between ( select CODE_COMBINATION_ID
from gl_code_combinations_kfv
where CONCATENATED_SEGMENTS = :P_FROM_COMBINATION_CODE)
and ( select CODE_COMBINATION_ID
from gl_code_combinations_kfv
where CONCATENATED_SEGMENTS = :P_TO_COMBINATION_CODE)
AND TRUNC(dEFAULT_EFFECTIVE_DATE) BETWEEN NVL(:P_FROM_DATE, DEFAULT_EFFECTIVE_DATE) AND NVL(:P_to_DATE, DEFAULT_EFFECTIVE_DATE)
Thanks in advanceWelcome to the world of complicated Oracle Application queries. Didn't fully understand your question, so a few guesses -
I think that you are asking how to make your query faster? I would reference the FAQ section on how to post a question regarding performance.
Your title indicates you want to understand the relationship between tables and views. In general, Oracle Applications uses views for 2 reasons - to join data from multiple tables for display, and to differentiate data from different organizations. (I am still on 11i and have heard organizations are handled differently in 12 so I can't speak to that for sure).
To understand the relationship between tables in a view, you can access the view's source code, either through a development tool such as PL/SQL Developer or TOAD (I'm guessing Oracle's tool does this also, but have never used it), or by querying the source from the dba_source table.
select * from dba_source where name = (name of view) and type = 'VIEW' order by line;without the ( ) just the view name, in all capital letters i.e. , 'GL_JE_LINES_V'
Good luck! -
Tables and Views are not displaying any objects.
I have tried both Filtered and non-filtered for tables and view but it won't list any tables or view.
I can run a query and it shows all the tables/views in the query window.
SELECT table_name FROM dba_tables
select view_name from all_viewsWho owns the objects?
The browser only shows objects owned by the current logged in user in the main section. You need to go into the Other Users node to find objects owner by other users. -
Oracle Internet Expenses related tables and views
In Oracle 11i when we go for internet expenses how to get the table and view details
user12180635 wrote:
Thanks for your reply. But didn't find any Schema or Tables related to Internet Expenses in eTRM. Can any one please specify them.IINM, it should be under AP/APPS schemas.
SQL> select owner, object_name, object_type
from dba_objects
where object_name like 'OIE%';Thanks,
Hussein -
Tables and views relevant to concurrent program parameters
I'd like to know all the tables and views relevant to concurrent program parameters.
As far as I know, fnd_descr_flex_col_usage_vl, fnd_flex_value_sets, and fnd_parameters are such kind of tables or views. They can not provide enough information I want. As I guess that for some parameters, their values are queried from tables. Where can I find the information about how such parameters are queried?
Thanks in advance!Hi,
I'd like to know all the tables and views relevant to concurrent program parameters. See these tables:
FND_CONCURRENT_QUEUE_PARAMS
FND_RUN_REQUESTS
FND_CONC_REQUEST_ARGUMENTS
FND_CONCURRENT_REQUESTS
FND_CONCURRENT_PROGRAMS
More details about these tables can be found in eTRM website.
eTRM
https://etrm.oracle.com
> They can not provide enough information I want. As I guess that for some parameters, their values are queried from tables. Where can I find the information about how such parameters are queried?
What information you are looking for?
You could get the query executed from the application by following the steps in (Note: 259722.1 - HOWTO Determine Table and Column Name from a field in a form in 11i) -- Query the concurrent program, then check the value of "SYSTEM.LAST_QUERY".
Regards,
Hussein
Maybe you are looking for
-
Disconnect/Reconnect Media (replacing low res stock)
I have a handful of stock video in a my project. I have been using the watermarked preview files from the stock media site, and now I have my purchased non-watermarked files that I need to replace in my edit. What is the easiest way to do this? FCP7
-
Why are all my Widescreen ratio being displayed in 4:3?
Hi all, I just bought my Apple TV and All was well until I synced my photos. All my photos have the dimension of 2592x1944 (jpegs), they're all landscape. After suncing them to Apple TV, I go to the "Photos" menu and View these photos, they show up w
-
Hi Can anyone of you please give me some information or any links explaning step by step procedure on: 1. How to copy a query 2. How to insert query in Workbook Many Thanks
-
How to convert Flash EXEs to run on a Mac?
The government where I'm working has distributed DVDs with teacher's guides and course materials to teachers and volunteers working on a new environmental education project. When I loaded the DVD into my Mac, the DVD title showed up under "Devices"
-
Can I upgrade Sun ONE Identity Server 6.0 schema v1.0 to schema v2.0
I'm have Sun ONE Identity Server 6.0 now I install Sun Java Communications Suite 5,but I'm copy dssetp to Sun ONE Identity Server 6.0 host, i'm run pl comm_dssetup.pl Welcome to the Directory Server preparation tool for Sun Java(tm) System communicat