How to allow a user to view all the tables from another schema?
I have a 'vic4ever' scheme where I have created all my tables. Now, I create a new user named "nvvp1". So, I want to enable nvvp1 display all tables in a schema vic4ever. But I don't know how to do! Or I need to run this command for each table?Grant select on vic4ever.table1 to nvvp1;
Grant select on vic4ever.table2 to nvvp1;
....
Thank you
Yes, that's what you have to do, but you could speed up a bit:
BEGIN
FOR cur_rec IN (SELECT table_name FROM ALL_TABLES WHERE UPPER(owner) = 'NVVP1')
LOOP
EXECUTE IMMEDIATE 'Grant select on vic4ever.' || cur_rec.table_name || ' to nvvp1';
END LOOP;
END;
/
Tags: Database
Similar Questions
-
Hello
How can I use statistics for all the tables in a schema in SQL Developer? and how long will it take on average?
Thank you
Jay.
Select the connection and right-click on it and select schema statistics collection
-
How to delete all the rows in all the tables of a schema in Oracle?
Hi all
I want to delete all records of all tables of a schema and I think that there should be a statement for this but I don't know how?
can help you?
Published by: user8105261 on November 25, 2009 23:06BEGIN FOR i IN (SELECT table_name FROM user_tables) LOOP EXECUTE IMMEDIATE 'DELETE FROM' || i.table_name; END LOOP; COMMIT; END;
(Y)
-
How to publish a data in the table from another table
Oracle forms6i
Hai All
I created a form in order to generate traffic. I had a problem that I can post that two data
I have two tables, a table is created dynamically the data in the tables are extracted from the text file, and they are divided and stored fields are
Bartime Bardate barcode
000011 0815 01/08/2010 - it came
000012 0816 01/08/2010
000013 0815 01/08/2010
000011 1130 08/01/2010 - he goes for a break
000011 1145 01/08/2010 - it comes once again in
000011 1650 01/08/2010
000012 1655 01/08/2010
000013 1645 08/01/2010 - it home
That I need to transfer this data to the database table, the table name is dail_att and the fields are
Code bars, timein, timeout, breakin, escape, day like I need like this
Barcode Timein Breakin Breakout Timeout Attend_date
000011 0815 1130 1145 1650 01/08/2010
I tried to use some service number and rank of count, but it does not work Pls I give good solutions
The encoding is
declare
The CNT number;
bar_code varchar2 (25);
date of bar_date;
in_time varchar2 (25);
out_time varchar2 (25);
intr_intime varchar2 (25);
intr_outtime varchar2 (25);
Cursor c1 is
SELECT count (*), barcode, bardate, bartime
-ROW_NUMBER() over (order by bartime) RN
of temp_attendance
Group of barcodes, bardate, bartime
order by bardate;
Start
To r1 c1 loop
-Select the barcode, bardate, bartime
-ROW_NUMBER() on the partition by barcodeorder by bartime: nurse
-of temp_attendance
-the Group of barcodes, bardate, bartime
-order by bardate;
If (cnt < = 1) then
Select the code bar, intimate, intrtimein, introuttime, outtime, attend_date in bar_code, in_time, intr_intime, intr_outtime, out_time, bar_date from dail_att where attend_date = r1.bardate - 1;
Update dail_att set outtime = r1.bartime where attend_date = r1.bardate and barcode is r1.barcode.;
elsif (cnt < = 2) then
insert into dail_att(barcode,attend_date,intime,outtime)
values (R1. Barcode, R1.bardate, min (R1. Bartime), Max (R1. Bartime));
-other
-update dail_att set outtime = r1.bartime where attend_date = r1.bardate and barcode is r1.barcode.;
end if;
End loop;
forms_ddl ('commit');
exception
while others then
forms_ddl ('rollback');
message(SQLERRM|| dbms_error_Text);
message(SQLERRM|| dbms_error_Text);
End;
Thanks and greetings
Srikkanth.MYou seem to always have the same problem, but give it different titles. It would be much easier that you would hold a thread open until its resolved. The last time you had this problem that I posted the following code, it didn't help you? (Replace x and y in each if or ELSIF with the calendar you want to watch)
CURSOR cr IS SELECT CODE, DATE, TIME FROM FROM TEMP_ATTENDANCE ORDER BY CODE, DATE, TIME; BEGIN FOR rec IN cr LOOP IF rec.TIME BETWEEN x AND Y THEN -- Update record for last day .. ELSIF rec.TIME BETWEEN x AND Y THEN -- Update record .. ELSIF rec.TIME BETWEEN x AND Y THEN -- Update record .. ELSIF rec.TIME BETWEEN x AND Y THEN -- Update record .. ELSIF rec.TIME BETWEEN x AND Y THEN -- Update record .. ELSIF rec.TIME BETWEEN x AND Y THEN -- Update record .. END IF; END LOOP; END;
-
How to allow multiple users to view alerts generated by a single user
Hello
I created some alerts in the log Insight 3.0 and I want my colleagues to be able to see and modify. Is this possible? If so, how can I do it?
Thank you.
Shared alerts do not exist today. The workaround is to create a shared user that several people can connect to. For more information, see: 3 reasons to use a Service account in the journal Insight - SFlanders.net
-
How to create the table in another schema of database even
Hello..
I have a database DB1
and 2 patterns / users in this...
Usr1 and Usr2...
I created a TEMP Usr1 schema table... and created
Then tried the following declaration in the schema Usr2...
CREATE TABLE TEMP AS SELECT * FROM Usr1.TEMP;
Then it is in error that...
: 00942 TABLE OR VIEW DOES NOT EXIST...
What is the reason for this...
Thank youYou must make this grant on any new table, you create in usr1 and you want to use in the usr2 schema.
Its not desirable, but you can give system privileges
grant select to usr2.
USR2 can select on any table.
-
Expdp tables a schema and all the objects in another schema
Hello
Is there a way we can export tables to a diagram and everything else a diagram? I tried below, but none of them did the job.
Table = A.Table1, A.table2
schemas = b, c
include = table: "in (a. 'Table1'., 'Table2')" "
schemas = b, c
Thank you
The datapump has several modes:
"Full import mode.
"Schema Mode".
"Table mode".
'Space Mode '.
"Transportable Tablespace mode."
It seems that datapump cannot be in one mode at a time.
So you have to choose the mode of table first, then for the following export select pattern mode.
-
How can I view all the users?
Hi all.
I use Oracle 10 g.
How can I view all the users?
Tanx
Alam[ALL_USERS | http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_2.htm#i1593342]
-
My MacBook Pro doesn't start then you want to erase and reinstall iOS. Before doing this I want to back up all my files. If I connect to imac via FireWire I can view all the files, but how can I save it it?
If your MacBook will start in target disk Mode, follow the instructions on how to set up and use...
Share files between two computers with target - Apple Support disk mode
But you do not want to share files, just to save them. You can make a "clone", using disk utility. For cloning utility purposes use a program likeSuperDuper! or double clone.
-
How can I view all the elements of an array?
Hello
I'm learning about the handling of tables. The example finder includes this one, 'build array_forum.vi', which shows the two modes, concatenate and adding, I understand, HOWEVER, I can't understand how they built this vi. For example, I can find the Array function to build, but I do not understand how they created the "digital data table 1" "data table 2" digital... etc, and I can't find the functions on the pallets that cause display "build the CONCATENATE entries table". ". Where are these blue functions?
Where these functions are found in the palette, and how we build them like that?
The other vi indicated here, 'for loop array_forum.vi' is my attempt to reproduce, but it doesn't show all the elements of the array; However, it only displays a SINGLE element, the last element of the array. How can I view all the items in the table I am creating using the FOR LOOP?
Thank you
Dave
I think I posted this in the wrong place. I reposted it on the forum of Labview.
Dave
-
How to view all the files on my computer from big to small
Hello
could someone tell me how to view all the files on my computer from big to small
There should be thousands of them. music movies photos the entire batch.
THX
Hello
I suggest that you sort files by size and check if that helps.
Reference:
Behavior and change folder views
http://Windows.Microsoft.com/en-us/Windows-Vista/change-folder-views-and-behavior
Work with files and folders
http://Windows.Microsoft.com/en-us/Windows-Vista/working-with-files-and-folders
Demo: Working with files and folders
http://Windows.Microsoft.com/en-us/Windows-Vista/demo-working-with-files-and-folders
Let us know if it helps.
-
How to allow a user to save their form to fill out (that I created in Adobe Acrobat DC) so that the fields are more editable when they return the form by e-mail?
If you submit a script, ASP.net server (see example below), you can merge and/or "Flatten" the form of PDF with iTextSharp for .NET platforms. You can also flatten the PDF with iText JAVA platform. You can also create Adobe's JavaScript action button validate before submitting it to an email that goes through the fields, making them 'read-only '; but, the ReadOnly property can easily be retroconcu.
Note: Submission to a script on the server also side bypasses software email client side and send the request using an SMTP account.
See the #3 example:
www.pdfemail.NET/examples/
-
How to value all the sequence all the table schema/user
Hello
I use the Oracle 11 g server. I have a table close to 100. I want to know all the current sequence value ("Currval")
of all the paintings in particular schema/user
Please help me how can I get with this query
Thanks in advance
karmayanordine B wrote:
Try this...SELECT sequence_name, last_number FROM all_sequences where lower(sequence_owner) = '
'; HTH
Vanessa B.Published by: Vanessa B December 3, 2012 13:25
It is not always correct (again that depends on the condition)
create sequence seq1 cache 100; SELECT sequence_name, last_number FROM all_sequences where sequence_name = 'SEQ1'; SEQUENCE_NAME LAST_NUMBER ------------------------------ ----------- SEQ1 1 select seq1.nextval from dual; NEXTVAL ------- 1 SELECT sequence_name, last_number FROM all_sequences where sequence_name = 'SEQ1'; SEQUENCE_NAME LAST_NUMBER ------------------------------ ----------- SEQ1 101 --"Showing 101" select seq1.currval from dual; CURRVAL ------- 1 --"CURRVAL is different"
-
How to view all the questions in the same page in OTM
Hello
I created 20 OTM numbers but I can see only 10 questions at once. So, how can I view all the topics in the same page.Hello
Connect to OTM, then you can see 'tools' in the top right more click on it and select options. In the window options, select 'Preferences of tree' change the number of nodes.
Concerning
Rajesh -
How to copy all the tables, triggers, etc, from a schema from one user to another
Hello everyone!
I'm looking for a QUERY or a stored procedure to copy the tables of a schema of the user to a different schema.
Should resemble the kind of: copy (select * from object where owner = 'UserIwantToCopyFrom') user = "UserIwantToCopyTO".
I'm sure that my example is rubbish, but I tried to explain what I want to do.
Then there is a chance to do in sql code? I have to build a model of a schema of the user with hundreds of tables, triggers, etc. and copy it into several other user patterns.
Thanks for your advice!
JanThere are many examples available.
What you generally want to do is:For the export, use the job_mode-online option "SCHEMA".
Example of exporthttp://www.oracle-base.com/articles/10g/OracleDataPump10g.php DECLARE l_dp_handle NUMBER; l_last_job_state VARCHAR2(30) := 'UNDEFINED'; l_job_state VARCHAR2(30) := 'UNDEFINED'; l_sts KU$_STATUS; BEGIN l_dp_handle := DBMS_DATAPUMP.open( operation => 'EXPORT', job_mode => 'SCHEMA', remote_link => NULL, job_name => 'EMP_EXPORT', version => 'LATEST'); DBMS_DATAPUMP.add_file( handle => l_dp_handle, filename => 'SCOTT.dmp', directory => 'TEST_DIR'); DBMS_DATAPUMP.add_file( handle => l_dp_handle, filename => 'SCOTT.log', directory => 'TEST_DIR', filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE); DBMS_DATAPUMP.metadata_filter( handle => l_dp_handle, name => 'SCHEMA_EXPR', value => '= ''SCOTT'''); DBMS_DATAPUMP.start_job(l_dp_handle); DBMS_DATAPUMP.detach(l_dp_handle); END; /
for import, you can use the remap_schema option with:
DBMS_DATAPUMP.METADATA_REMAP ( handle IN NUMBER, name IN VARCHAR2, old_value IN VARCHAR2, value IN VARCHAR2, object_type IN VARCHAR2 DEFAULT NULL);
There are many more details in the document as provided Thierry.
Maybe you are looking for
-
I get "error: TypeError: boxOverlay_AVG is null." What is going on?
Whenever I connect to the internet (Google) a pop [JavaScript Application] box indicating "error: TypeError: boxOverlay_AVG is null. Don't know what's going on? I note that I cannot print some pages of websites.
-
(I'm really sorry to bother again by opening another thread right after the other, but if it's better to separate this issue from my previous ones for other users who might have the same doubts.) So I get my new NB550D-108PT next week, and in all the
-
Ive been trying to access the USDOJ Correo electronico (* address email is removed from the privacy *), but every time I try I get a local saying cannot access because my default mail client is not properly installed what is a DMC AND how DO I FIX PR
-
As well as a few other people here, I got the above message trying to connect for sharing (with my Sony Bravia TV) media. This is the first time I tried to use the media sharing. I went through the under process, but at step 4. There is no file [secu
-
I can't upload pictures to Ebay, error Code ME 005, ME200 and 11011.
I can't upload pictures to Ebay... and 11011 ME 005, ME200 error codes?