granting of privileges to the schema for several tables at the same time... any script?

Hello gurus,

I have about 25 tables in the ABC scheme

I want to give all privialges to the XYZ schema for all tables of 25 which is in the pattern ABC... So is there is SQL statement or a script, I can run to grant privileges to all tables.

Something similar to these...

  SELECT 'create synonym ' || table_name || ' for ' || table_name
  FROM user_tables  {code}
 
So i get all the table names ....then i can run as a script.... U r help is greatly appriciated gurus!!!


Thank you!!!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

Administrator:

set head off
set pages 0
set feed off
spool myscript.sql
Select 'grant select, insert, update, delete on abc.'||table_name||' to xyz;'
  from dba_tables
 where owner = 'ABC';

Select 'create synonym xyz.'||table_name||' for abc.'||table_name||';'
  from dba_tables
 where owner = 'ABC';

spool off;

Obviously this does not all new table that will be created in the future on ABC schema...

Max
[My Italian blog Oracle | http://oracleitalia.wordpress.com/2010/02/07/aggiornare-una-tabella-con-listruzione-merge/]

Tags: Database

Similar Questions

  • On a five year MacPRo, when you try to open a document all stored documents seem to open at the same time, any attempt to stop them results in the cigarette or the seizure of MacPro... of ideas is what the cause/solution?

    On a five year MAcPro, when you try to open a document, all stored documents seem to open at the same time and any attempt to close results in the MacPRo gel for a long period. Ideas for cause and ideas for a solution?

    You have a Mac Pro or a MacBook Pro?

  • find roles that grant privileges to the same owner


    I did an impdo and I saw on a lot of these types of errors:

    ORA-39083: Type than object_grant cannot be created with the object error:

    ORA-01749: you cannot GRANT/REVOKE privileges to yourself

    Because sql is:

    GRANT SELECT ON "SMART." "" SOURCE_SYSTEM_DIMENSION "TO"SMART ".

    Smart notice to smart...   Can someone give me a SQL that will allow me to generate a file that I can run to eliminate these types of cases.

    Notte is should show the operatation in this "select" cases where it has failed.

    Thank you all

    It looks like a privileged granted user privileges on the tables of smart chip, which is absurd, but legal.

    SQL > create an identified by a tablespace default user user

    2 unlimited quota on users;

    Created by the user.

    SQL > grant create table, create a session to one.

    Grant succeeded.

    SQL > conn a/a.

    Connected.

    SQL > create table t (ID, descr varchar2 (10));

    Table created.

    SQL > conn /.

    Connected.

    SQL > grant select on Abdel to one.

    Grant succeeded.

    dev1 > select table_name, privilege, constituent, dealer

    2 of dba_tab_privs

    3 where dealer = "A";

    DEALER PRIVILEGE TABLE_NAME GRANTOR

    ------- ------- --------- ----------

    A A T SELECT

    dev1 > revoke select on a.t a;

    Revoke succeeded.

    dev1 > conn a/a.

    Connected.

    dev1 > grant select on t for one;

    Grant select on t for a

    *

    ERROR on line 1:

    ORA-01749: you cannot GRANT/REVOKE privileges to yourself

    To reverse the invalid grant, you can use something like this to generate a script:

    Select "revoke". privilege: ' on ' | conceding |'. ' ||

    table_name |' a ' | dealer | « ; »

    of dba_tab_privs

    where dealer = constituting;

    Or you can use a similar query in an anonymous block, immediate use of execute to execute the revoke command.  The user will have full privileges on the objects that they own.

    John

  • If I buy the adobe cc then can I use it on several laptops at the same time? I use two different computers for my work. as a photoshop and illustrator, for example.

    If I buy the adobe cc then can I use it on several laptops at the same time? I use two different computers for my work. as one for photoshop and Illustrator for example.adobe

    This excerpt from: terms of conditions of use Adobe software should help to clarify the terms for you:

    ..... You can activate the software on up to 2 devices (or virtual machines) at the same time, if these activations are associated with the same Adobe ID for the same person, except http://www.adobe.com/go/activation_fr. However, you cannot use the software on these devices simultaneously.

    You can also see:FAQ: where can I find the terms of membership and the terms of use?

  • Matching color race for several objects of different colors at the same time

    Hi people,
    I was wondering if anyone knew a way to change the stroke color to match the fill color (or add a stroke color in the case of no current line) for several objects at the same time when the objects in question have a variety of different fill colors.
    I can't seem to find a way and doubt one exists, but maybe I missed something or there is a suitable script.
    Any help much appreciated.

    Thank you. !

    (With the help of: Illustrator CC 2014 for Mac)

    try this script,

    // matchStrokeToFillColor.jsx
    // carlos canto 07/01/2014
    // https://forums.adobe.com/thread/1511792
    
    function main(){
    
        var idoc = app.activeDocument;
        var sel = selection;
    
        for (a=0; a		   
  • Update of Smartphones from blackBerry to OS 4.5 for updating at the same time to several Blackberrys.

    I was wondering if there was a way to update multiple BlackBerry operating system at the same time? or is there a different software that can do?

    -Salman

    Yes, you can update several at once, according to the number of USB powered ports on your PC.

    So, if you have two of the rear USB ports, you can update both at the same time, using the "loader.exe". Do not use some 08/04/16 ports USB hub, just the main PC usb ports.

    1. download the OS files to the PC then install on the PC by running (double click) the downloaded file.
    2. go in c:\program files Research in motion\apploader and delete the file named "vendor.xml."
    3. plug in the BB and double-click on "Loader.exe." It is located in the same place as the above vendor.xml file.

  • [After Effects] How to use "Convert Vertex Tool" for several vertex at the same time?

    Hey guys,.

    I used the "Convert Vertex Tool" to create a curve on a step of stairs and by mistake it curve all the point of my staircase which is what I wanted to do but point by point. I didn't know it was possible to point (s) at the same time.

    And now I keep it again. I want to convert all the points as a curve at the same time.

    If someone has the magic shortcut, please let me know.

    See you soon.

    uncurved.JPGall-curved.JPG

    It's all using the right tools.

    1. Select the layer with the path
    2. Select the tool pen (g)
    3. Press and hold Ctrl/Cmnd and place the cursor on any part of the path to select - you will see a solid filled small arrow
    4. Release the Ctrl/Cmnd key and move the path tool, so you can drag a selection around the verticies
    5. Hold Down the Ctrl/Cmnd key to reveal an arrow small white selection
    6. Drag your selected verticies
    7. Release the Ctrl/Cmnd key and press the Alt/Option key to reveal the convert vertex tool
    8. Click on any vertex to change linear to Bezier or vice versa

    This allows you to convert all the selected vertices. You can't click and drag, but you can convert it to a symmetrical set of Bezier curves.

  • Change the location of several pictures at the same time?

    I see how to change the location of a photo at a time. Is it possible to change the location of several pictures at the same time?

    Thank you

    Phil

    Select the photos and info - enter the location (or any other field of the info) and it is applied to all photos

    This is described in using Photos - a good place to get help with Photos

    View and add information about the photos

    To view or change information for the photos, you select one or more photos, and then open the information window.

    • Open the Info window: Double-click a photo to view it, and then click the Info button in the toolbar or press on command I.
    • Add or change information: Change the following.

      • Title: Enter a name in the title field.
      • Description: In the Description field, type a caption.
      • Favorite: Click the Favorites button to mark the photo as a favorite. Click the button again to deselect.
      • Keywords: Enter the keywords in the keywords field. When you type, Photos suggest keywords that you have used before. Press enter when you have finished a keyword. To remove a keyword, select it and press DELETE.
      • Faces: Click on and type a name to identify a face. Click on several times, and then drag the identifier of the face different faces to identify many faces in a photo.
      • Location: Enter a location in the location field. When you type, Photos suggest places you can choose. To change a location, you can search a different location or change the location by dragging a PIN on the map. To remove location information, delete it or choose Image > location, then choose Remove location or back to the original location. You cannot assign a location if your computer is not connected to the Internet.

    LN

  • all play them at the same time with several videos tabs

    When I have several tabs open tabs with videos that all try to play at the same time

    Hi crazychief,

    Some Web sites will have this default tag value for their videos. You can try:

    • Enter about: config in the address bar and press to enter.
    • Agree that you will be attentive
    • Search for media.autoplay.enabled
    • Double click to change the false value

    Hope this helps!

  • Highlight one several files at the same time

    I would like to highlight several files to delete at the same time. Through Windows highlight you or click on the first file with the mouse and click on the last file and everything in-between becomes highlighted for deletion. Is there a way to do the same thing with my Mac without clicking on each file individually?

    OS X does not have an iota of code Microsoft Windows. Do not expect that it works in the same way.

    1. You have the choice on OS X. You can click and drag the file icons that you want to remove, then right-click on one of them and select move to trash.
    2. You can select the first icon in the file and then pressing the SHIFT key or order, select the following icons. Then click on any place in the trash.
    3. Step 2, but using the arrow keys for the selection of additional directional file icon.
    4. Combine [1, 2, 3] to add or subtract icons from file.
  • [ShareIt] I hope that ShareIt can share the files on several receivers at the same time.

    If ShareIt can share the files on several receivers at the same time, it will save a lot of time for me when I want to share files with a group of friends.

    Good idea.

    He will be brought back to the development team.

  • At the same time Record several channels in DAQ

    I'm currently configured to play two channels in data acquisition using DAQ Assistant. I wonder what would be the best way to go on the sampling of these channels at the same time, or as close as possible. The vi that I currently use is attached.

    Thank you

    Sawyer

    DAQmx manages the calendar under the hood and does it quite well.  If you want to change advanced sync settings you can, but of course, you will have to abandon the DAQ ASSistant and write a LabVIEW code.

    I assume you are using a multiplexing card right?  The only real solution for true simultaneous sampling is to buy a card that has several a/d converters like the S series cards.

    For the second poster: you do not have the same problem as the op.  It can be implemented in multiple channels.  If you want to help, you must provide further information that "it gives an error.

    EDIT: I bet you are trying to use separate tasks for each entry, aren't you.  If you do, you'll get a resource conflict error.  You must use a SINGLE task and set up several channels in this task to collect more than one signal.

  • to run several DAQmx AO tasks at the same time

    Is there a reason any cannot perform several tasks DAQmx AO at the same time?

    It's a bunch of questions that you listed there. I strongly suggest that you spend some time reviewing the many tutorials available for acquisition of data here: http://www.ni.com/white-paper/5434/en. You will need to get a better understanding of the work equipment, and reading some of these articles will help you considerably.

  • HP PRINTER device feeds on several sheets of paper at the same time.

    All of a sudden my HP printer sends several sheets of paper at a time taking the printer performed at several sheets at once is it possible to put more pressure on paper printers do pick up a sheet at the same time as it allows to do?

    Hello

    1. What is the model of your printer?

    2 did you change on your computer before this problem?

    3. what operating system is installed on your computer?

    What version of the operating system Windows am I running?

    http://Windows.Microsoft.com/en-us/Windows7/help/which-version-of-the-Windows-operating-system-am-i-running

    You can read the article and check.

    Multiple Pages feeding through the printer

    http://h10025.www1.HP.com/ewfrf/wc/document?DocName=c00190540&LC=en&cc=UK&DLC=en

    If the problem exists, you can contact the manufacturer of the printer for assistance.

    http://WWW8.HP.com/us/en/support-drivers.html

  • How to tune a myself to several files/folders at the same time?

    • I have a lot of music and video files that have suddenly become unresponsive to any media player after a connection Xbox Media Center (music/videos appear, but no action follows after that as they are accessible, media players and the Xbox Media Center don't always work correctly).
    • I can play one song/video after changing its properties (security permissions), which gives full control to me, the administrator manually. -Too much work for 4000 + files.
    • My current media player is iTunes, but also Windows Media Player fails to play the music/videos.

    Thanks for the reply, but I need to know how to proceed for several files/folders at the same time.  This particular set of directions only explain how to set permissions to a single.

    In Windows Explorer, select all the folders that you want to change the property on, then right click on ONE of these folders (your selections will remain)
    Choose Properties > Security > advanced > owner > edit
    Make your changes and do not forget to check the "Replace owner...". "downstairs.

    With thousands of files, it may take a few minutes. VP Tech Services

Maybe you are looking for