Grant All Script

Hi All,
I have a schema called PROD.
I have a user called user_x.
PROD schema has Many different tables.
I would like to write a script to grant select on all PROD tables to user_x,
This is my first time doing such a script, therefore I don't know how to start this.
Usually for a couple of tables I would do the following:
GRANT SELECT ON TABLE_1 TO USER_X;
GRANT SELECT ON TABLE_2 TO USER_X;
GRANT SELECT ON TABLE_3 TO USER_X;
.....But what if I have 100 or 200 tables, I would like to write a script to grant select on all PROD tables to user_x.
Thanks in advance.

Rooney wrote:
Hi All,
I have a schema called PROD.
I have a user called user_x.
PROD schema has Many different tables.
I would like to write a script to grant select on all PROD tables to user_x,
This is my first time doing such a script, therefore I don't know how to start this.
Usually for a couple of tables I would do the following:
GRANT SELECT ON TABLE_1 TO USER_X;
GRANT SELECT ON TABLE_2 TO USER_X;
GRANT SELECT ON TABLE_3 TO USER_X;
.....But what if I have 100 or 200 tables, I would like to write a script to grant select on all PROD tables to user_x.
Thanks in advance.spool capture.sql
select 'grant select on ' || table_name || ' to user_x;' from user_tables;
spool off
@capture.sql

Similar Messages

  • Grant all privs of one schema

    Hi,
    how i can grant all previleges for user to another user
    say i have 2 user A and B
    how we can provide all priveleges to user A on user B
    Thnaks

    That is not really what you said in your original posting. You really need to be a little clearer on your requirements....
    Do you want them to have select, update, delete privileges on all the tables?
    Do you want them to be able to do execute on any procedure?
    Do you want them to be able to select off of any sequences?
    Do you need them to be able to access the tables through synonyms?
    No matter what you are doing you can probably create a script through the different objects view that will create its own script to grant whatever you want.
    Example:
    SQL> connect tsb/password
    Connected.
    SQL> select 'grant select, update, delete on '||object_name||' to scott;' from user_objects
    2 where object_type='TABLE';
    'GRANTSELECT,UPDATE,DELETEON'||OBJECT_NAME||'TOSCOTT;'
    grant select, update, delete on RATE_FACT_TAB to scott;
    grant select, update, delete on DIST_RATE_TAB to scott;
    grant select, update, delete on CNFGTR_TDE_DIST_RATE to scott;
    grant select, update, delete on TIMSJOBS to scott;
    grant select, update, delete on TIMSLOCATIONS to scott;
    grant select, update, delete on STAGING_TABLE to scott;
    grant select, update, delete on STAGING_TABLE_CBINDS to scott;
    grant select, update, delete on STAGING_TABLE_CPLANS to scott;
    If you spool this then you can execute these as a script or individually.
    You can do similar grants with other object types.
    The issue will always be that you could run into problems with things such as nested tables and user defined types.
    Regards
    Tim

  • Find users with grant all privileges

    Hello,
    I am trying to figure out how to query for all users who might have grant all privileges.
    Any ideas or scripts?
    thanks

    Hi,
    Please check this out,
    http://www.petefinnigan.com/tools.htm
    There are a lot of good scripts, maybe one of them can show what you are looking for.
    Cheers,
    Marcello M.

  • Missing from "Tools"- "Photoshop"-& all Scripts!

    When I select "Tools"->"Photoshop" and image processor and all scripts etc are missing. Not greyed out but completly gone!! Any suggestions?
    I am running CS@ on OSX10.4.6 I have reinstalled etc...
    Cheers Patrick

    Hi Patrick,
    This forum is for BridgeScripting and I'm not sure from the information you give that this is the correct forum for you.
    That being said let me offer the following.
    Make sure you have downloaded and installed all of the current updates. In Bridge click Help > Updates then download and install any available updates.
    Can you recall any changes that were done between the last good run and the now missing menu condition? Things like creating your own or modifying one of the existing Adobe Java Scripts.
    It would also be helpful to know if "Script Manager" is present under the Bridge menu (it will be the item right above Preferences).
    If this is not present then one of the startup scripts has encountered a problem and is blocking other scripts from loading.
    Cheers,
    O'Neal

  • How grant all the privilege of a specific schema to a user?

    How grant all the privilege of a specific schema to a user?
    I already create a new schema and import the neccessary data for that schema.
    Now I want to assign all the privilege for that schema to user HR (let user HR become the owner of that schema). How to deal with it?
    Edited by: qkc on May 13, 2011 10:45 AM

    qkc wrote:
    How grant all the privilege of a specific schema to a user?
    I already create a new schema and import the neccessary data for that schema.
    Now I want to assign all the privilege for that schema to user HR (let user HR become the owner of that schema). How to deal with it?
    Edited by: qkc on May 13, 2011 10:45 AMThere is no way - by definition - that one user can "become the owner" of another schema. A schema is, by definition, the collection of objects that belong to one owner.
    but perhaps that is just semantics in the context of what you really want.
    use sql to build sql:
    spool doit.sql
    select 'grant select on someuser.' || table_name || ' to someotheruser;'
    from dba_tables
    where owner = 'SOMEUSER';
    spool off

  • How to remove all scripts on object instances?

    I'm looking for any kind of solution here, besides disabling the warning.
    I hate it when I'm converting someone else's AS2 project to AS3, and there's code buried on an onstage instance somewhere, which gives me the warning:
    "Actions on button or MovieClip instances are not supported in ActionScript 3.0. All scripts on object instances will be ignored."
    How can I:
         A) Find which instances have code on them.
              or
         B) Remove all code on all instances.
    Idea:
    Can I save as a different format/version/something and lose this data somehow. Then I could convert it back its current FLA format?

    YES!!! So awesome!!  Thanks

  • Looking for Suggestions on granting all users access to an application *except a subset of users*

    This might not be the right forum for this question, but since it is related to an App-V application I figured I would try since this may have come up for some of you.  I am looking for the best way to grant all Domain Users access to an application
    except for Domain Admins.  Using the Full App-V infrastructure, I want to grant access to the App-V UI via User Targeting, but I don't want to allow Domain Admins access.  The reason for this is because when we make updates to provisioned
    server cores (stateless), we login with our Admin accounts to make modifications to the cores, and I would like to reduce the steps that need to be taken at the end to ensure that all AppV applications are removed before sealing up the core. 
    Currently, Domain Admins do not have access to any App-V applications, so this process is fairly clean.  All applications are User Targeted. 
    Packages are cached on a persistent D drive on each server, so the issue is that the registry, programdata, and packageinstallationroot become out of sync if packages are pulled down during core modifications after the core is attached to other servers (hence
    other D drives).  Because of this, Machine Targeting is not an option for this either.
     

    This would be so much easier with a "Configuration Manager" like feature where you could create a collection query to accomplish the same thing.  Are there other tools out there that will do the same thing?

  • Play-All scripting question

    Hello everyone. I need some advice as soon as possible for a DVD I'm making I hope you can help.
    Is it possible to make a play all button that will affect a whole track (using markers) or do I need to break my one track into smaller tracks in order to make a play all script like the one described in the manual?
    I'd really appreciate help on this as I'd prefer to keep my track in one piece rather than break it up.
    Thanks.

    Use stories:
    http://www.kenstone.net/fcphomepage/stories_dvdspstone.html

  • Calc all script running since 20hrs in BSO

    Hi All,
    I have saved a new updated outline and executed the Calc All script....but i is running since 23hrs...i have noticed that my drive memory is decreasing...
    please advice...
    Regards,
    Prabhas

    Everything looks same...as prod..server...^^^What is the difference in size?
    but i have noticed one thing here...db->edit properties->General checked : Aggrigate missing values which is unchecked in prod...
    that is the reason why its taking this much time?
    What will happen if i uncheck during the calculation ?^^^Aggregate Missing Values will tell Essbase to do just what it says -- aggregate #Missing up. If anything, it should make your calc faster and the final output smaller. When that is not checked, Essbase will not overwrite upper level blocks with #Missing if the children have #Missing values. This equals more upper level blocks and slower processing. Personally, I never use it.
    If you uncheck it nothing will change. I believe you have to stop the database for it to take affect.
    Are you sure that the compression method is the same if the drive space being used is more in dev than it is in prod? Could it be RLE in prod and Bitmap or None in dev?
    I'm not going to address the speed issues you're seeing as that can be laid at the feet of hardware specs.
    Regards,
    Cameron Lackpour

  • Travel Schema:grant all privileges

    I have a request to add the travel schema to one of our 9202 databases. Fairly straight forward. I got the *.dmp file from your site:
    http://www.oracle.com/technology/sample_code/tech/java/travel/travelschema.htm#system
    I created the user travel and used the system tablespace as the default. As for privileges, I noticed that I should "grant all privileges" to travel. Is this wise? What's the minimum amount of privileges that I can grant to travel?

    Is this wise? You are quite right to be concerned. Granting ALL PRIVILEGES is a dodgy thing to do. In mitigation I might say that the TRAVEL schema is a sample piece of code and so should only be installed on a development database, where the damage can be limited.
    But I think the real problem is that the sample code was developed by Java programmers who couldn't be bothered to work out exactly what privileges were needed. Shocking, yes, but hardly uncommon. And the poltroons have also included instructions on how to
    To Download and install the travel schema into the SYSTEM tablespace:
    No no no! No application objects go into the SYSTEM schema. What's the point of us non-Oracle people banging on about best practice if their own employees are allowed to post stuff like this on OTN? Sack these bozos!
    What's the minimum amount of privileges that I can grant to travel? I have absolutely no idea. I think the safest thing is to build a new database instance, so that the potential for damage is limited. Alternatively, grant CONNECT and RESOURCE and see how far that goes. You may have to grant additional powers. I see they also grant JAVASYSPRIV and JAVAUSEPRIV. Horrible, simply horrible.
    Cheerse, APC

  • Adobe Story - All scripts missing

    I have been working on multiple scripts for quite some time, saving frequently. Today, Adobe story updated and now ALL my scripts are missing. The only script that is still there is the sample script, which I deleted long ago. It's like it reset to default settings.
    I have made sure I was logged into the correct account, and tried logging in on the desktop and online versions. Anyone else have this problem or a solution??

    Just spent the last three days on the phone to Adobe support about the exact same issue only to be told at the end of a 40 minute conversation (most of which was on hold) that it's not supported over the phone. Great, thanks. Couldn't you have told me that three days ago before wasting my phone bill and time? So I guess we are all going to make the same 2 minute movie about a wizard then...
    Sometimes my scripts appear when I am offline and not logged into to the Adobe account, if I try and go online it asks me to log out and log into the Adobe account and bammo, all scripts gone with good ole Paladin staring me in the face.
    Please help me sort this out, please, please, please!!!

  • Sprite ignoring all scripts except beginSprite...

    This is a weird one. I've got a sprite - one of 10 identical
    sprites, which
    is not executing its code at all. The other 9 all work
    perfectly fine, and
    they all have the exact same behavior on them. This one guy
    executes his
    beginSprite code, and that's it. The mouse-events, exitFrame,
    and custom
    handlers on the thing don't even respond. (I tried using
    "put" commands in
    each of the other behaviors to see if it's even reading the
    code, but it
    isn't.) It has all its properties from the behavior (set in
    the
    beginSprite - the only one that runs on this one for some
    reason), and they
    can be altered via run-time scripts and checked via Message
    Window/Object
    Inspector. I'm not doing anything nutty like messing with
    scriptInstanceLists or puppetSprites or anything. (And if I
    were, I'd
    imagine that even if I'd somehow killed its
    scriptInstanceList, its
    properties given by that script would not be accessable
    anymore, and that's
    not the case.) As far as I can see, this sprite is being
    treated exactly
    like its 9 brothers, but for some reason, their code works
    and his doesn't.
    I've tried removing and reapplying the behavior, even
    deleting the sprite
    and copy/pasting one of the others into it's location, moving
    it to another
    sprite channel, etc. Nothing seems to make a difference.
    I realize this isn't much to go on, but I couldn't begin to
    explain all the
    scripts going on on this thing, and I doubt any of you would
    have the
    patience to go through that much code anyhow. (It's a
    somewhat long script,
    though not unusually complicated.) I'm just wondering if
    anyone else has
    had something like this happen where a sprite just suddenly
    stopped
    responding to all scripts for no discernable reason...

    D'oh. Never mind. After all that - save, quit, reload made it
    go away.
    Should've considered the possibility that it was the program
    screwing up and
    not me... Oh well. Still really annoying when that happens...

  • All scripts are missing from scripts tab

    I dont know why but all the scripts that were in my scripts tab are missing.  This happened once before and I found a fix but cant locate the steps to that again.  I remember it had something to do with backing up a few files and have ID recreate them or something.  Any ideas?

    Follow this link and try resetting your indesign prefrence.
    Shonky

  • Play All Script does not Play All !!

    i need to be able to add a Play All button to the various menu pages on my project.
    I tried using the sample scripts in the manual, and aside from changing the movie file names, it was letter and space perfect. Yet when i tried testing it using the Simulator the first movie played through but then instead of jumping to the next movie it just went back to the menu.
    Is there a problem with the script in the manual, or perhaps simulator does not simulate this particular function? ideas how i should tackle this?
    thanks
    adam

    If you have muliple tracks in DVDSP, I usually use stories to handle play all behaviors. This allows you to let each track end jump back to the menu, but specify a different and jump for the stories, to go from one story to the next track's play all story.
    If you are using scripts, you need to set the end jumps to the scripts. I find using scripts as pre-commands on a track doesn't always work, particularly if you press the "next" button on the remote. So the flow would go something like this:
    menu: jump to script "play all, which sets your "play all" gprm to 1
    script jumps to track, which jumps to script "after track so-and-so" which says if play all=1, then play next track, otherwise, return to menu.
    each track needs to jump to a new script which tells it what to do by checking for the play all gprm

  • View all script labels and find an object by its script label

    Hello,
    I have an InDesign document in which many objects get a script label. I know how to view and edit the script label of an object, but is it possible to:
    1 - See a list of all the script labels of the document (as can be done with the styles for example)?
    2 - Search an object in the document by its script label?

    If you are using OSX this AppleScript displays a list of document labels:
    global labels
    set labels to []
    tell application "Adobe InDesign CS6"
        set x to every page item of active document
        repeat with i in x
            if class of i is group then
                my checkGroup(i)
            else
                my getLabel(i)
            end if
        end repeat
        display dialog labels as string
    end tell
    on checkGroup(g)
        tell application "Adobe InDesign CS6"
            set gi to all page items of g
            repeat with a in gi
                if class of a is group then
                    my checkGroup(a)
                else
                    my getLabel(a)
                end if
            end repeat
        end tell
    end checkGroup
    on getLabel(pageitem)
        tell application "Adobe InDesign CS6"
            if label of pageitem is not "" and label of pageitem is not in labels then
                set labels to labels & label of pageitem
            end if
        end tell
    end getLabel

Maybe you are looking for

  • How to get the size of a string in bytes

    Morning, I'm trying to get the length in bytes of a string, the characters below are 3 byte UTF-8, but when I display The length of either int, looks like is double I got 120 and I think it should be 60. Any idea String requiredMsg = "όόόόόόόόόόόόόόό

  • Messages have disappeared

    Hello, I use webmail, based on Sun Java System Messenger Express 6.1. Today I noticed all my mesages disappeared in all folders except inbox. To tell the truth, I didn't notice the exact time- three weeks ago they all were at their places. Perhaps se

  • RBO vs CBO : Are you going to maintain RBO in DBMS?

    Hello, Oracle? I'm facing many critics about the type of SQL optimization from customer. I'm still using RBO in application SQL because, sometimes, your automatic optimization (analyze) make the execution plan of performance-oriented SQL worse and th

  • Error when install Connection manager

    OS : windows 7 32 bits Ora: 11GR2 32 bits After installing the oracle. I run the universal installer that is on the Oracle home and choosing to install the Connection Manager(CMAN) (this because the pretty boy does not automatically install) and retu

  • Java programme to implement a simple parser

    the following syntax shows how an arithmetic expression may be constructed in a simple language.... <expression> ::= <term> | <addop><term> | <expression><addop><term> <term> ::= <primary> | <term> <multop> <primary> <primary> ::= <digit> | <letter>