ORA-01031 Error; please help

hai, iam getting a strange error,
i have this procedure which is created successfully. but giving me insufficient privileges message inserted into error log.
Also when iam writing the create table statement individually, it is creating a table.
create table ACTIVITIES as select * from ACTIVITIES@x_old;
i have dba privilege on the current database
create or replace procedure get_old_tab_scr
is
lv_msg varchar2(500);
lv_code number(10);
begin
for i in (select table_name from user_tables@x_old)
loop
execute immediate 'create table '||i.table_name||' as select * from '||i.table_name||'@x_old';
dbms_output.put_line('create table '||i.table_name||' as select * from '||i.table_name||'@x_old');
end loop;
exception
when others then
lv_code := sqlcode;
lv_msg := sqlerrm;
insert into error_log values('get_old_tab_scr -'||sysdate||lv_code||'-'||lv_msg);
end;
can i get some help regarding this...

Purpose:
~~~~~~~~
Purpose of the document is to show the limitations of roles and privileges under
PL/SQL.
Due to these limitations, you may get errors in PL/SQL procedures/packages when
accessing certain objects or packages, but the same code works in SQL*Plus
The flagged errors are ORA-00942 or ORA-01933 or ORA-01031 and ORA-06512 or
PLS-00201 and ORA-06550 or ORA-28111 with Fine Grained Auditing (FGA)
Note that the generated errors may differ in each release.
Explanation:
~~~~~~~~~~~~
The fundamental misunderstanding with these problems is because of the misconception
that roles that are granted to one user can be applied to another by intermediate
objects such as views or pl/sql procedures, this is not possible, roles exist in
sessions and are associated with a user in an active session only, the privileges
of a role can not be transferred to objects.
If you're accessing tables/views in PL/SQL procedure or package and getting
either ORA-1031 or ORA-942 (or PLS-201), but the same select/update/insert/delete
works ok on SQL*Plus, then you need to check if the privileges have been granted
to the user creating the procedure via a role.
Privileges granted via role are disabled inside stored procedures
Detailed case studies follow:

Similar Messages

  • Ora-12514 error - please help

    Hi,
    I get this error and i really don't know what to do..
    C:\Documents and Settings\Sorin>sqlplus /nolog
    SQL*Plus: Release 11.2.0.1.0 Production on Sat Jul 2 19:03:43 2011
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    SQL> conn system/password@scoala
    ERROR:
    ORA-12514: TNS:listener does not currently know of service requested in connect
    descriptorCan you advise me of what to do?
    Edited by: Roger22 on 02.07.2011 19:05

    Roger22 wrote:
    Yes, probably they have been asked (e.g. ora-12514 error) and i already have googled it. But maybe i have a problem that i did not found already on google or on this forum. And maybe here i can get helpThis particular error is not arcane or difficult to debug. Did you read the link I gave you? There's really only 3 steps
    on the client - tnsping - to see where the connection request is going and what service is being requested.
    on the server - lsnrctl - to see what services the listener supports.
    If the listener supports no services, the database needs to be register itself with the listener.

  • JPub giving ORA-29545 error - Please Help!

    All,
    I am trying to consume Java Web Services for 9.2.0.1 RDBMS. While I run JPub, I get the following error:
    E:\Ora9i\OraHome92\bin>jpub -user="SCOTT/TIGER" -sysuser="SYS/TIGER" -proxywsdl="e:\IMyFloatWebService.wsdl" -dir=ShowPi -plsqlpackage=soap_callout_wrpr_pi -proxyopts="soap,tabfun"
    Note: ShowPi\MyFloatWebServiceProxy.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    ShowPi\MyFloatWebServiceProxyJPub.java
    ShowPi\plsql_wrapper.sql
    ShowPi\plsql_dropper.sql
    ShowPi\plsql_grant.sql
    ShowPi\plsql_revoke.sql
    Executing ShowPi\plsql_dropper.sql
    Executing ShowPi\plsql_wrapper.sql
    Executing ShowPi\plsql_grant.sql
    Loading ShowPi\plsql_proxy.jar
    Error while creating class java/lang/StringBuilder
    ORA-29545: badly formed class: User has attempted to load a class (java.lang
    .StringBuilder) into a restricted package. Permission can be granted using dbms
    java.grantpermission(<user>, LoadClassInPackage...
    errors : class MyFloatWebServiceProxyJPub
    ORA-29521: referenced name java/lang/StringBuilder could not be found
    errors : class MyFloatWebServiceProxy
    ORA-29521: referenced name java/lang/StringBuilder could not be found
    The following operations failed
    class MyFloatWebServiceProxyJPub: resolution
    class MyFloatWebServiceProxy: resolution
    class java/lang/StringBuilder: creation
    exiting : Failures occurred during processing
    Could somebody suggest me some way to go around this - I have been sitting on this since three days - any help is appreciated.
    Regards,
    Leslie, A

    Hi,
    I am having the same problem. Did u get this to work.
    Thanks.

  • ORA-01031 error...need enter password prompt

    Hi.
    I'm creating a form which kills a session, using this command:
    Forms_DDL('ALTER SYSTEM KILL SESSION'|| :v_$session.sid|| ',' ||:v_$session.serial# );
    in my when-button-pressed trigger. But I get ora-01031 error insufficient privileges. So I'd like to prompt the user to enter his password when he tries to kill a session, because only the administrator should be able to kill a session. Thanks in advance.
    -K

    Hi Kristine:
    First I would ask you why can't they just use the normal logon to establish their access level?
    Then, let me say there is no way to just popup the logon screen in forms, however, it is relatively simple to create a signon screen. Just create a dialog popup with two fields for username and password, and a button with a label maybe "Signon". Then in the WHEN-BUTTON-PRESSED associated with Signon button, you use the code like following. Please test it and modify as needed, because I do not have a database to test it with. Note I use ... as needed to indent because the forum strips leading spaces.
    DECLARE
    ..V_CONNECT_STRING VARCHAR2(100) :=
    ..........GET_APPLICATION_PROPERTY(CONNECT_STRING);
    BEGIN
    ..LOGOUT;
    ..LOGON(:B1.UN, :B1.PW ||'@'|| V_CONNECT_STRING, 'TRUE');
    ..EXIT_FORM;
    END;
    Hope this helps,
    Thomas

  • Windows - No Disk Error - Please help!

    Windows - No Disk Error - Please help!
    Hi,
    I have the following set up:
    * Lenovo T-61p
    * Windows XP Pro, SP 3
    * HP Photosmart 8250 printer (with nothing plugged into the various card readers, and USB slot in the printer)
    I am getting the following error:
    Windows - No Disk
    Exception Processing Message 0xc0000013 Parameters 0x75CE023C
    0x84C40C84 0x75CE023C
    I have done a lof experimenting and thru process of  elimination, and believe I have determined that this only happens when the HP Photosmart 8250 printer is plugged in to the USB slot of the computer.
    I can stop it from happening by safely removing hardware, and removing the drive that the 8250 creates on your computer when you plug it in.  In my case, this is drive E.  I'm guessing if there was something in the the various card readers, and USB slot in the printer, that's what those would be, but I don't those use those functions of the printer.
    I understand there is more at work than simply the printer, because I did not used to get this error, so some software changed as well, that is scanning all ports, and finding a drive that has no disk, and producing the error.
    A simple google search finds a lot people all over the world having this problem, and are solving it in different ways, because the suspected source is different: Norton, HP, etc.
    I have tried everything I have read, and the only thing that works was my own idea, of manually safely removing the drive the printer creates each time I plug in the printer.
    Anyone every any better, more permanent solutions?  Or know what the real root of the problem is?  What is scanning all the drives and being showing an error message because it found an empty drive?
    Thanks and Happy Holidays/New Year!

    I've been getting the same error on my 4G nano for the past week. I've had my nano for about a month and the first few weeks were fine. Tried it on 2 different computers (Vista and XP) and same problem. Tried it on a 3rd (XP) and it started ok. Problem started coming back after a day.
    I was able to find a quick fix though. I noticed that sometimes the message says something like "iexplore.exe... no disk..." even if I don't even use IE. What I do is end iexplore.exe on task manager before running iTunes and syncing my nano. I don't get the error whenever I do this, but one drawback is that the contents of my nano suddenly pops up in a window - even when disk use is not enabled.
    I've reset/restored my nano dozens and dozens of times to make sure it's clean. Leads me to believe it's a driver issue. Either that or I have a friggin malware problem I can't seem to find.
    I'll be posting updates every now and then. I'm no expert so I'm hoping an Apple expert also steps in to give some input.

  • My ipod generation 5 will not come out of recovery mode. i was simply updating my software and this happened. it will not let me restore it comes up with and error. please help, thanks.

    my ipod generation 5 will not come out of recovery mode. i was simply updating my software and this happened. it will not let me restore it comes up with and error. please help, thanks.

    Hey erinoneill24,
    Thanks for using Apple Support Communities.
    Sounds like you can't update your device. You don't mention an error that it gives you. Take a look at both of these articles to troubleshoot.
    iPod displays "Use iTunes to restore" message
    http://support.apple.com/kb/ts1441?viewlocale=it_it
    If you can't update or restore your iOS device
    http://support.apple.com/kb/HT1808?viewlocale=de_DE_1
    If you started your device in recovery mode by mistake, restart it to exit recovery mode. Or you can just wait—after 15 minutes the device will exit recovery mode by itself.
    Have a nice day,
    Mario

  • I cannot use iCloud on Windows 7, as it won't recognize my apple ID when i try to sign in to icloud it i get error saying "you can't sign in because of a server error (please help some one)

    I cannot use iCloud on Windows 7, as it won't recognize my apple ID when i try to sign in to icloud it i get error saying "you can't sign in because of a server error (please help some one)

    Although your message isn't mentioned in the symptoms, let's try the following document with that one:
    Apple software on Windows: May see performance issues and blank iTunes Store

  • Ora-01031 error: insufficient Priviliges

    hi experts,
    im was completely enervated by a simple error for which im hanging out for plenty of hours. kindly advice me what to do to eradicate it.
    i have a Redhat Linux AS 4 server and 9.2.0.4 database version.
    The problem is, when im trying to connect database as sysdba with netservice name, i.e using remote authentication method, i was thrown ora-01031 error: insufficient priviliges. But when i tend to connect it locally using OS authentication method it permits me to do it.
    for example,
    Sql> connect sys@<sid> as sysdba
    Enter password:
    ERROR: insufficient priviliges
    where as,
    Sql>conn sys as sysdba
    connected
    sql>
    i've configured oracle in Linux environment as per the documentation. i can't figure out the exact problem. the sqlnet.ora file contains SQLNET.AUTHENTICATION_SERVICES=none
    kindly tell me where im missing out?
    Thanks
    SM

    yes. i've Password file in its appropirate location,
    which is named as orapw$ORACLE_SID
    and the parameter, remote_login_passwordfile is set
    as EXCLUSIVE.This should be fine.
    Try
    - select * from v$pwfile_users; to check whether oracle sees the password file
    - recreate the password file, if possible (it can get corrupted sometimes)
    - delete sqlnet.ora to go with the defaults (of course, backup it first)
    - check whether you can connect as usual user using the net service name (and check whether you connect to the proper database, just to be sure)
    - try to connect from a different machine
    - check that TWO_TASK and TNS_ADMIN environment variables are not set.

  • HT201442 I did this but still i am getting the same error , please help me .

    I did this but still i am getting the same error , please help me .
    <Email Edited by Host>

    Look at http://support.apple.com/kb/ts4451
     Cheers, Tom

  • ORA-01031 Error When starting Database

    I have installed Oracle 11gr2 on my laptop having OS ubuntu 10.04, after installation i am receiving ORA-01031 error when try to log in with the command
    sqlplus / as sysdba what should i do to resolve it...

    Hi,
    there are a lot of possibilities why this can be wrong. Look at Oracle Support for note 233223.1, "Checklist for Resolving CONNECT AS SYSDBA (INTERNAL) Issues". This gives links to notes which leads you to maybe the solution.
    Possibilities are:
    - you are root, which is not allowed. You should connect with the oracle user
    - your user is not part of the dba group
    - permissions on files
    - and many more
    Herald ten Dam
    http://htendam.wordpress.com

  • I am not able to update my iphone 4 ,when ever i tried to update it its show 1309 error...and at times 9006 error ,please help me ..

    i am not able to update my iphone 4 ,when ever i tried to update it its show 1309 error...and at times 9006 error ,please help me ..

    Hey alkarim2008,
    If you are having an issue with being unable to update or restore your iPhone, I would suggest that you troubleshoot using the steps in this article - 
    Resolve iOS update and restore errors in iTunes - Apple Support
    Thanks for using Apple Support Communities.
    Happy computing,
    Brett L 

  • My iphone won't pass the connect to itunes. when i try to restore is says that there is an error. please help!

    hi my iphone is broken. it won't pass the connect to itunes. when i try to restore is says that there is an error. please help!
    thanks,
    jg2013
    <Subject Edited by Host>

    Hello, 02633. 
    Thank you for visiting Apple Support Communities. 
    If your iPhone is disabled, you will need to process the steps in the article below.
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    Cheers,
    Jason H.

  • HT4623 I have updated my iphone with the current software but it is showing you need to connect to  of itunes to activate your phone, when i did that it is continuously showing an error.please help me to get through.

    I have updated my iphone with the current software but it is showing you need to connect to  of itunes to activate your phone, when i did that it is continuously showing an error.please help me to get through.
    Kindly Activate my phone.

    Rajan Gupta wrote:
    ...it is continuously showing an error.
    See here  >  http://support.apple.com/kb/TS3424
    Also see this discussion.
    https://discussions.apple.com/message/21189708

  • I need the drivers for earl 2011 macbook pro 13 inch i7 4 gigs for windows 7 64 bits i tried downloading with bootcamp butt it never completes allways ends up with an error please help

    i need the drivers for earl 2011 macbook pro 13 inch i7 4 gigs for windows 7 64 bits i tried downloading with bootcamp butt it never completes allways ends up with an error please help if any one has the drivers or knows were i can download them

    Doug...
    If you don't have it for reference, the manual might come in handy > US/Boot_Camp_Install-Setup.pdf
    After it loads, Command + F to find information regarding the drivers.

  • HT201210 hi i just bought my new iPhone 4s yesterday and when u opened it was not updated so when i tried SO MANY TIMES to update it on the devise and on my new mac it said that there was a unknown error please help me :)

    hi i just bought my new iPhone 4s yesterday and when u opened it was not updated so when i tried SO MANY TIMES to update it on the devise and on my new mac it said that there was a unknown error please help me

    Please tell us what kind of computer you have, what operating system and what version of iTunes. Not just "the latest version of iTunes", the exact version number.

Maybe you are looking for

  • How to view adobe flash? how to save pdf opened in safari?

    I am new user on vista. Safari is cool. got addicted but have toughtime getting used to it. 1. Flash files won't run. Adobe do not have flash plugin for safari http://www.flickr.com/photos/8869854@N04/545930914/ for reference 2. PDFs open in Safari w

  • Document is being distributed - changes are not possible

    Dear Guru's I have an issue when making a quotation transaction. After i saved the quotation transaction, i would like to change the window into edit mode. So i have to click the display or change button and then after i click that button, there is a

  • Cant Set windows PDC

    hi hope some one can help im now trying to promote my os x 10.4.11 server to a windows PDC, the server has been running for sometime as a directory master with no probs, when i then try and save the PDC setting i just get error while writing settings

  • Bapi for customer master update

    hi everybody.... can anyone tell me the bapi structure for table KNVV and KNVI. My requirement is to update the fields below using bapi... KUNNR     VKORG     VTWEG     SPART     BZIRK     VKBUR     VKGRP     KDGRP     KONDA     KALKS     PLTYP     V

  • Bought a macbook, how can I use the built-in isight?

    Would anyone be able to give me advice on the above matter? As far as I found out I can take pics in photobooth, but are there other possibilities with the camera? I heard that you can videotape yourself also? (I am about to take an oral exam so I th