insufficient privileges when you create sequence using the procedure

CREATE OR REPLACE PROCEDURE schema1.proc1 AS
BEGIN
EXECUTE IMMEDIATE 'DROP SEQUENCE schema1.add_ins_seq';
EXECUTE IMMEDIATE 'CREATE SEQUENCE schema1.add_ins_seq MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 1000 NOORDER  NOCYCLE';
END;

This procedure is created to schema1 by schema1.

Schema1 boasts a CREATE SEQUENCE privilege.

When I run this procedure through SQL Developer after the Cup to schema1, the error is thrown in insufficient privilege to CREATE SEQUENCE, however, DROP SEQUENCE is executed. I can create the sequence without the procedure call.

If I add AUTHID CURRENT_USER so I don't get the error of insufficient privileges.

Why it gives this error when the owner and the applicant of the procedure is schema1?

Hello

1st thing to know: when a procedure is defined (and updated), any privileges granted through ROLE is not taken into account. This is because these privileges can be active or not at the level of the session (as happens if for example a user has active 'role A' in session 1 but not in session 2 and if this role has been used to define a procedure?) The proecedure must at the same time be VALID in session 1 and INVALID session 2? Is not possible.

Thus, for instance in a situation of 'standard': user SYSTEM has 'DBA Rôle', so you can for example make a sqlplus session "SELECT * v $ instance;", but you would write a procedure owned by system making instance_name SELECT INTO l_variable OF v$ instance;  "then"surprise": the procedure cannot be compiled because of the ORA-904 Table or view does not exist..." To be able to create the procedure, a DSS system needs to be done.

2nd thing for your special case, a little more complex: default for a procedure is 'AUTHID DEFINE', but once more: it means "privileges of the author creating the procedure", so without taking into account the acquired privileges through roles... Your user name is 'sequence create' through a role, it cannot use the privilege within the procedure.  But... but when you define the procedure with AUTHID CURRENT_USER, privileges are evaluated at run time, and thanks to the active ROLE in the session by calling the procedure, at this time, the user can create the sequence.  If try again you but with 'The VALUE NONE ROLE' in the session before the call, you will again have the question.

Conclusion: If you need to do the action, you must grant the user the necessary privilege directly.

Best regards

Bruno Vroman.

Tags: Database

Similar Questions

  • When you try to use the repair your computer from the advanced boot option option, it only shows a different user account and my username and password does not work

    Original title: when you try to use the repair your computer from the advanced boot option option

    When you try to use the repair your computer from the menu option options advanced startup, when it comes to the screen to select the user account it shows only a "another" user account and my username and password does not work, and the 'OTHER' this account is not on my list of user accounts... what should I do?

    Hi kennympeek,

    1. why you try to do the Startup Repair?

    You can try to perform the commissioning of repair using the audit and the disk Installation of Windows Vista.

    For estelle information links:

    What are the system recovery options in Windows Vista?

    http://Windows.Microsoft.com/en-us/Windows-Vista/what-are-the-system-recovery-options-in-Windows-Vista

    Startup Repair: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows-Vista/startup-repair-frequently-asked-questions

    Hope this information is useful.

  • How can I accept terms of use Live when you try to use the Windows 7 parental control features?

    * I have already connected to fss.live.com and https://familysafety.microsoft.com. This solution does not remedy the issue.* *.

    When you try to use the Windows 7 parental control features, it first asks you to connect to Live.  When I do, I get the 8004B3E9 error Code and it asks me to "connect to account.live.com and accept the terms of use.  However, in doing so, there are no terms of use for me to accept.  I also go to fss.live.come and familysaftely.microsoft.com and no option for the conditions of use is available to accept.  In addition, I tried different browsers.

    I can connect on Live.com and view my account easily, but without conditions of use prompt appears for me to accept, so my attempts to use the parental controls are stuck in this cycle, where it won't let me past without accepting conditions that do not seem to exist.

    How can I make sure I am set up as the account 'Parent '.

    Help, please

    3 hours later I'm finally able to access Family Safety. Thank you!

    The correct link to solve the "Terms of use" requirement is:http://g.live.com/0fsenus4/nexusmigrate

  • 2072 AND 2126 ERROR when you try to use the printer

    ERROR 2072 AND 2126 WHEN YOU TRY TO USE THE PRINTER?

    Hello

    1. What is the brand and model of the printer?

    2. What is the exact error message you get?

    3 when was the last time you were able to use the printer?

    4 did you a recent software or changes to the material on the computer?

    Method 1:

    I suggest you to go through the steps mentioned in the link and the Coachman.

    Printer in Windows problems

    http://Windows.Microsoft.com/en-us/Windows/help/printer-problems-in-Windows

    If the issue does not get resolved, then you can move on to method 2.

    Method 2:

    Tips for solving common driver problems

    http://Windows.Microsoft.com/en-us/Windows7/tips-for-fixing-common-driver-problems

    Hope this helps and keep us informed if you need help.

  • When you try to use the clone stamp. a red part appears and the message saying it is a mistake and close photoshop, reopening the same case, no problem there is little time

    When you try to use the Clone Stamp tool, the screen becomes a partial red screen and a message from Windows saying that an error has occurred and close Photoshop.

    The same thing happens again after the reboot, ALL work is lost, this has happened only recently

    Hi all, thanks for your help, I went into preferences and disabled tick graphic, now everything is OK thanks Ben so

  • When you try to use the texture of the paper adobe pro, I get: error a reference to a file / folder: 104

    When you try to use the texture of the paper adobe pro with CC2015, I get: error a reference to a file / folder: 104

    left Adobe Creative Cloud for General Photoshop Discussion

  • ORA-01031: insufficient privileges when you try to run a proc

    I have a procedure called KILL_MY_SESSION that is defined with a value of DEFINE AUTHID

    The schema JOHN belonged procedure. The procedure makes several calls to PL/SQL DBMS_SQL package.
    The last thing that not with DBMS_SQL proceedings concern an ALTER SYSTEM KILL SESSION statement.
    Schema JOHN has privileges to kill a session in the database.
    If I log in the scheme of JOHN, I can issue the statement ALTER SYSTEM KILL SESSION successfully.
    Also, when you are logged in the scheme of JOHN, I can run the KILL_MY_SESSION procedure.

    Now I have the ISTO schema. I got ISTO privileged EXECUTE on the JOHN. Procedure KILL_MY_SESSION.
    Since JOHN. KILL_MY_SESSION is a privilege of rights DEFINERs, if RIGHTS shouldn't be able to execute the procedure correctly and kill a session?

    This is an output of the session of the ISTO when you try to run JOHN. KILL_MY_SESSION:

    SQL > conn oifs@dbname
    Enter password: *.
    Connected.
    SQL > 500 fixed lines
    SQL > select username, osuser, sid, serial #.
    2 session $ v
    3 where username = "OIFS."

    USERNAME OSUSER SID SERIAL #.
    ------------------------------ ------------------------------ ---------- ----------
    OIFS administrator 142 325
    OIFS administrator 139 613

    SQL > exec ('142 ', 325') john.kill_my_session
    BEGIN john.kill_my_session ('142 ', 325'); END;

    *
    ERROR on line 1:
    ORA-01031: insufficient privileges
    ORA-06512: at "SYS." DBMS_SYS_SQL", line 1204
    ORA-06512: at "SYS." DBMS_SQL", line 323
    ORA-06512: at "EIADBA. KILL_MY_SESSION', line 20
    ORA-06512: at line 1


    Someone at - he a clue as to what I'm doing wrong?
    View DBA_PROCEDURES, here's the record for KILL_MY_SESSION


    OWNER
    ------------------------------
    OBJECT_NAME
    --------------------------------------------------------------------------------
    OBJECT_TYPE AUTHID
    ------------------- ------------
    JOHN
    KILL_MY_SESSION
    DEFINE PROCEDURE

    I mean the privilege of system alter directly, not through roles.

    GRANT ALTER SYSTEM TO JOHN;
    

    Please read the articles below, you should restrict the sessions that can be killed, according to what will be your implementation.

    It could be useful.
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:226613885088
    http://DBA-Oracle.com/t_granting_alter_system_kill_session.htm

  • Error when you try to use the webcam: Please plug in a supported WebCam

    camera on my Dell

    When I try to use the camera on my Dell, message says "please connect WebCam supported.  How can I do this?  The device worked and now it isn't.  I must have changed something when I added the new router.

    You need to reinstall the driver for the webcam.

    Visit the Dell Support Web site, download and install the compatible webcam driver.

  • When you try to use the current content, I get the message "network error."

    My photos open in a mixture, but when I try to use the content aware filter, I get the message "network error."

    Can you please try this: logout and log back? Please let us know if the operation is back to normal. We will fix a bug in this area in a future release.

  • After Effects CS6 crashes when you try to use the Preferences submenu

    I have a problem with AE "freeze" or lock in place when you try to use under preferences submenu items. I have to stop with the Task Manager to regain control. I have a PC wintel with 8 GB RAM and 2 TB of disk and a quad-core, do not think that any of those who are a problem. AE is the only child of problem in this entire suite. Any help/advice is greatly appreciated. Thank you in advance for your time and effort.

    Sincerely,

    Vidmist

    1360 x 768.

    That does not meet the system requirements and I think it's safe to say thatr it is the reason for the accident - the program seeks to draw the preferences panel in an invalid area because it cannot properly address the resolution of the screen too small. Increase the screen resolution and everything will probably work.

    Mylenium

  • Error (34.2): PLS-00103: encountered the symbol "END" when you try to compile the procedure.

    Hello

    I get the following error when I try to compile the procedure. I call a package inside this simple procedure. Not sure where I do worng. Here is the error I get.

    Error (34.2): PLS-00103: encountered the symbol "END"?

    Here is my code

    create or replace PROCEDURE BATCH_JOB_CAC_SP

    (

    vstatus OUT NUMBER)

    AS

    vloadserver global_name.global_name%TYPE: = get_dbservername;

    vuseridmod CONSTANT VARCHAR2 (15): = 'SYSTEM '.

    vloadname CONSTANT VARCHAR2 (30): = "BATCH_JOB_CAC_SP";

    v_cnt_upd NUMBER: = 0;

    vrunid NUMBER;

    v_spoutput VARCHAR2 (150);

    CURSOR job_cac

    IS

    SELECT NumCli, job_cac FROM batch_job_cac, batch_recid, jobnum;

    BEGIN

    I'm in job_cac LOOP

    job_cac_pkg.job_cac_valid_sp (i.custnum, i.jobnum, v_spoutput);

    CASE v_spoutput

    WHEN "1" THEN DBMS_OUTPUT. Put_line ('update job ACC');

    WHEN "2" THEN DBMS_OUTPUT. Put_line ('update job ACC');

    WHEN '3' THEN DBMS_OUTPUT. Put_line ('can not update working ACC');

    OF ANOTHER DBMS_OUTPUT. Put_line (v_spoutput);

    END CASE;

    END LOOP;

    EXCEPTION

    WHILE OTHERS THEN

    IF job_cac % isopen THEN

    CLOSE Job_cac;

    END IF;

    ROLLBACK;

    vStatus: = 1;

    LOG_ERROR_SP_NM (vLoadServer, vLoadName, SQLCODE, SQLERRM, vUserIdMod);

    END;

    END BATCH_JOB_CAC_SP;

    Thanks for your help.

    Hello

    You have 2 statements END at the bottom of your code, but only 1 BEGIN statement earlier.

    Losing one of these END States.

  • "Download failed" error message when you try to use the tab create in Expert mode)

    I use PS 11 elements and following a tutorial that instructed me to click on the tab to create, and then select the Photo book in option (in fact, it does not matter which option - they all produce the same error message).

    I get the initial dialogue, to set the number of pages, etc., but when I click on OK, a window opens saying "active download, please wait". This is followed by an error message "failed download. The server is not available or you are not connected to internet"or words to that effect.

    So far I have checked the software for updates, checked my internet connection and looked into this forum to find answers, but so far nothing has worked.

    Anyone else experienced this?

    I think I can solved the problem by renaming a file (which may have had has been corrupted?).

    Here's what I did:

    "I renamed the file" "MediaDatabase.db3" to "OLD MediaDatabase.db3 ' Library\Application Support\Adobe\Photoshop Elements\11.0\Locale\En_US. restart PSE11 folder and clicked on create, using the default value for an object (A place of Sarcelles) and - after a slight pause while the catalog has been rebuilt - it worked! (previously he had not). Tested with other themes and they were all OK too.

    NB: the path of the file above is on an Apple Mac running OS X Lion mountain - he peut vary between versions of Mac OS X and will certainly be different on a Windows PC (see the post of Surendra, above, for a suggestion of where to start).

  • ORA-01031: error of insufficient privileges when I try to use ALERT_QUE

    Hello
    I'm working on SYS. ATTENTION. THAT for system alerts. I use ODP in c# to connect to the Oracle database with username = SYSTEM, but when I try to survey or deque any message from SYS. ATTENTION. Que., its gives an error ORA-01031: insufficient privileges. I am not able to understand how to assign SYSDBA privileges to the SYSTEM and access ALERT_QUE to get alerts of system. I write my code below, please take a look and let me know what is wrong with the code. I am able to connect to the database using the SYSTEM, do I have to use username = SYS for access to the content database ALERT_QUE? Please let me know what is the solution.


    Con OracleConnection = new OracleConnection (constr.);

    Create the queue
    Queue OracleAQQueue = new OracleAQQueue ("sys.alert_que", con);

    Open connection
    con. Open();

    BEGIN txn for enqueue
    OracleTransaction txn = con. BeginTransaction();

    Set the type of message to the queue
    queue. MessageType = OracleAQMessageType.Raw;

    Prepare the message and payload BRUTE
    OracleAQMessage enqMsg = new OracleAQMessage();
    Byte [] bytePayload = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
    enqMsg.Payload = bytePayload;
    Agent [] OracleAQAgent = new OracleAQAgent [1];

    Agent [0] = new OracleAQAgent ("SUBSCRIBER1");
    enqMsg.Recipients = agent;
    enqMsg.SenderId = new OracleAQAgent ("SENDER1");

    Prepare for the queue
    queue. EnqueueOptions.Visibility = OracleAQVisibilityMode.OnCommit;

    Message from the queue
    queue. Enqueue (enqMsg);


    The code throws the exception to the line "queue. Enqueue (enqMsg); "saying: ORA-01031: insufficient privileges

    Published by: 916462 on February 27, 2012 03:31

    You are looking for a connection preferred, which means that you must connect as SYSDBA
    Check this doc on how to do it.
    http://docs.Oracle.com/CD/B19306_01/win.102/b14307/featConnecting.htm

  • Photosmart HP 6520: HP Photosmart 6520 - error message when you try to use the apps

    I can't access is more apps on my Photosmart HP 6520.  I get the error message "error connection server - 1".

    I don't know if this problem just since I recently changed from a Windows PC on a Mac.

    I very rarely use the apps, so I don't know when it started.

    Everything else seems to work very well I would say.

    Can someone please tell me what could be the cause, or if there is something I can try to sort it out?

    I seem to be going round in circles, and I can't work on what is happening.

    Thanks for your help.

    Hey @TraceyMac,

    Welcome to the Forum from HP Support.  I hope you enjoy your experience here.

    I understand that you are unable to use the pads (Print Apps) on your HP Photosmart 6520 e-all-in-one printer.  I want to help you with this.  A recent installation of printer would not affect your performance of platelets but no loss of connection or wireless Web services could be a factor.

    Note that to access the applications and their use from the front panel of your printer requires two ingredients to be successful: 1) Wi - Fi connection and 2). the ePrint feature (webservices are enabled).

    • Touch the wireless icon () on the front panel of your printer - is the printer connected to your wireless network?  (If not, run the wireless configuration wizard, select your network name/SSID and enter your password wireless reconnect).  If you are connected, proceed as explained below.
    • Tap the icon of webservices/ePrint () on the front panel of your printer.
    • If webservices are not enabled, press OK in order to enable them and allow the automatic updates of printers.
    • This will cause your printer to print an information document describing the characters before @hpeprint.com your printer (ePrint address).  This is known as the claim code.  As another way to use printing applications available for your printer, you can sign in to http://www.hpconnected.com to program applications printing to print and review all the content that ideally will reappear on the front of your printer.
    • From there, you can click the devices tab and use the claimcode to add your printer to the site and take advantage of the available applications, it.

    If these basic steps to respond to a resolution, please, try the following:

    When users encounter this type of problem in general, I suggest from scratch with wireless printer, webservices, and apps printing configuration.  You can clear all of these parameters in a swoop by the factory default restore * your printer.

    Here's how:

    * Note that this step resets the setting up your printer wireless, address ePrint and other custom print settings. If you have created a custom address @hpeprint.com it is permanently erased. For more information about custom addresses ePrint, click here.

    • Front panel of the printer, arrow down and select Tools
    • Select restore default

    Then touch the wireless icon, run the Wireless Setup Wizard to restore your network connection, and then tap the Webservices () and reactivate your webservices.

    If you are able to successfully reactivate your webservices, tap on the icon of your printer wireless () and make a note of the IP address of the printer.  Then, follow these steps to configure a manual DNS:

    • Enter the printer's IP address in a web browser (Chrome, Firefox, Safari, Internet Explorer) and press ENTER to go directly to this page.
    • Click the network tab.
    • In the submenu on the left, click Networking.
    • Then click on the network (IP) address.
    • Click Manual DNS server.
    • DNS preferred as 8.8.8.8 manual entry
    • Auxiliary DNS server entry as 8.8.4.4
    • Click on apply to finalize this change.

    No none of the suggestions above restored the functionality you're looking for?  Please let me know the result of your troubleshooting by responding to this post.  If I helped you to solve the problem, feel free to say "You rock!" by clicking the "Thumbs Up" icon below and by clicking to accept this solution.

    Thanks for posting in the Forum from HP Support.  Have a great day!

  • When you create keyframes on the timeline, why it sometimes to add Bezier handles and sometimes not?

    OK, so one of the key steps in my workflow is to make a manual pass audio "normalizing." Yes, I get the feeling that it could be automated tools that could do a better job, but I'm also listening to the content.

    But what makes me a little crazy right now, is that sometimes, the ctrl-click adds a normal keyframe and other times, it adds a handful of order for a Bezier curve. It is especially common when you are speed bumps, but it is just so inconsistent it makes me crazy.

    I'm working on a script and in the middle of the sequence, there is a clip where he also adds Bezier curves. And when I try to drag the keyframe down, he grabs the Bezier handle instead, creating this weird S-curve.

    I don't know what I'm doing differently in this segment compared to other places. Hundreds, if not thousands of changes such as this and I have not encountered a problem like this.

    Undo and do that again causes the same thing.

    But one segment, creating keyframes does not create Bezier handles.

    ????????

    Production Premium CS6

    If you click ctrl you add a linear keyframe TI you ctrl click (accidental?) again in this key frame, it turns into an auto Bezier

Maybe you are looking for

  • Satellite C660-11K - keeps freezing and unable to access the windows

    Recently purchased by Satellite C660 11 K and load a game on it, after a few hours it froze (ctrl alt del wouldn't work) I stopped and he started up and I got a message saying some software or hardware was the stoppage of work Windows. I restored it

  • On the Satellite L650-116 product key recovery

    Hello I am owner of laptop Toshiba Satellite L650-116. I bought my laptop with Windows 7 Home Premium 64 bit (OEM license) original. Unfortunately I am forced to reinstall my Windows 7 system, but I realized that my product key sticker is wiped out (

  • How to ensure that the graph of the image is registered before you add it to a report?

    Hello! I have a VI (comprehensive graphic image recording) that records the image of a graph with an invoke node. Then, I set this image in an excel report. However sometimes the image is saved and sometimes not. Usually, if I use a probe inside the

  • system restore fails unspecified error

    Dear Windows answers, Recently, I tried to restore my system to a restore point created. I received the error message: unspecified error fails the system restore. The source of the problem may be that I have backed up before my files on D: / drive fo

  • Leaves of telepresence RRA

    Hi, I'm trying to find an excel spreadsheet that will show me the exact requirements for RRA'ing some telepresence systems. Need one of a series of telepresence 3000 for now. Need a form that gives exact measurements etc power supply. I have a Cisco