473,769 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error in PL/SQL block

26 New Member
Hi,

While executing the following block i am getting error as Insuffiecient privilege.

CREATE OR REPLACE PROCEDURE ddl_create_proc (p_table_name IN VARCHAR2)
AS
l_stmt VARCHAR2(200);
BEGIN
DBMS_OUTPUT.put _line('STARTING ');
l_stmt := 'create table '|| p_table_name || ' as (select * from emp )';
EXECUTE IMMEDIATE l_stmt;
DBMS_OUTPUT.PUT _LINE('end ');
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT _LINE('exceptio n '||SQLERRM || 'message'||sqlc ode);
END;

exec ddl_create_proc ('TEMP');

STARTING
exception ORA-01031: insufficient privilegesmessa ge-1031.

Please help me regarding this error.

Thanks,
Dilip
09337877895
Jun 19 '07 #1
3 1615
debasisdas
8,127 Recognized Expert Expert
There could be 2 possible reasons.

1. The user does not have create table previliges.
2. The user does not have select previleges on the emp table.
Jun 20 '07 #2
dilippanda
26 New Member
Hi,

EMP table has been created in SCOTT user.
I am able to create and select tables in that user.So that user has create table privileges and select privileges.

Is there any other problem?

Thanks,
Dilip
There could be 2 possible reasons.

1. The user does not have create table previliges.
2. The user does not have select previleges on the emp table.
Jun 21 '07 #3
debasisdas
8,127 Recognized Expert Expert
Log in through the sys user and grant CREATE TABLE previleges to scott user or ask your DBA to do the same for you.

It should work for you.

I can't figure out any other problem

Please try the above and do post back.
Jun 21 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
74328
by: Ike | last post by:
Anyone knows what cuases this under 6.0 ? -Ike
1
2311
by: gemel | last post by:
I wish to implement error recovery using the Exception mechanism However, I'm not sure I fully appreciate some of the detail in which this works. The code that contains a potential error is included in the Try block. The Catch block is used to catch this exception. The Finally block will then execute after the Exception has been handled. My questions are: 1. If the Exception is caught in the Catch block is this referred to
17
7611
by: ahaupt | last post by:
Hi all, I'm currently writing a load of class libraries, but not the main application iteslf. I want to provide some method for reporting errors back to the main application. At the moment I have a bool errBl and a string errMsg in my classes. When errBl is ture, one could see what the error was in errMsg.
0
2646
by: Benny Ng | last post by:
Hi,All, When i deploy Enterprise library with my application ,i used XCOPY to deploy it into my test server. But when application runs, shown some error related registry. (But actually I haven't any method or component to wrote registry) After I used "InstallUtil" to registry Enterprise Library (those DLLs) to the deployment server, the application runs smoothly. Now I wonder why i need to registry those Enterprise Library DLLs into
4
3639
by: Saverio Tedeschi | last post by:
Hi all gurus, I'm getting a strange behaviour in Web services design: when I try to open a connection, or to fill a DataSet, I get the error in subj (totally unrelated to the actual error). I've tried SQL Server connection, SSPI integrated or not, OledB (mdb) connection with enclosed password in the connection string, but I get consistently the same error. I've even tried to deinstall/reinstall Framework (1.1 SP1), IIS (5.1), S.O.(WXp SP2)...
1
1872
by: GS | last post by:
Any points of what would be the good error handling design for application? User error handling in Application_OnError and throw() new errors on conditions through the code? I'd like utlimiately to consolidate all error_handling in one method which I'll be able to easily modify to write to event log or text file etc instead of error hanlding scattered through the code. Thanks, GS
5
1343
by: Mark Jerde | last post by:
Can someone recommend a commercial error handling package I can add to my C# programs? (VS .NET 2003.) I'm not finding any googling. I know I could write my own or adapt something off the interet but time is of the essence and I prefer supported software. Thanks. -- Mark
8
3332
by: Alvin | last post by:
I'm making a very simple game in SDL, and I'm not asking for SDL help I hope - this looks like something C++ related, so I'll ask here. I have a class for a simple block, or tile, in the game, which can be either on or off. I'm having trouble with the constructor though. class block { private: SDL_Surface *screen;
1
5734
by: dewi | last post by:
Dear All, I am trying to compile a C code using Visual C++. Can anyone explain how to solve it? Thank You. #include <math.h> #include <string.h> #include "RV2AJFRONT_NEW.h" #include "RV2AJFRONT_NEW_private.h"
2
1884
by: Omar Abid | last post by:
Reason of this project: Error handling is one of the most difficult thing that may afford a programmer. It isn't as easy as you think and handling errors in a program some time can make errors occur! Project details: 1- New solution for handling errors in .net 2- Try...Catch...Finally Block 3- Error handling sample
0
9579
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9416
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9981
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9850
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8862
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7396
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5293
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5436
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.