How to compile and execute procedure from hr to scott
Hi all ,
I am trying to compile and execute a stored procedure from hr user to scott user.
first i gave grant command to hr.
By using:- grant create any procedure to hr;
After i compile a procedure from hr to scott.
create or replace procedure scott.sp_hr
is
begin
dbms_output.put_line('run by scott user');
end;
but it says :-
ORA-01031: insufficient privileges
01031. 00000 - "insufficient privileges"
any one help me.
it works for me
20:29:29 SQL> 20:29:29 SQL> connect / as sysdba
Connected.
20:47:41 SQL> grant create any procedure to hr;
Grant succeeded.
20:48:01 SQL> connect hr/hr
Connected.
20:48:07 SQL> create or replace procedure scott.sp_hr
is
begin
dbms_output.put_line('run by scott user');
end;
20:48:21 2 20:48:21 3 20:48:21 4 20:48:21 5 20:48:21 6
20:48:23 7 /
Procedure created.
20:48:25 SQL>
Similar Messages
-
How to compile and execute lex,yac,c and java programs
its the 3rd day on my New MacBook pro..
as i just migrated from windows to mac i love to work on this..
The main problem is i DON't know .......
how to compile and execute
1) lex and yac programs
2) c program
3) java program
so please help me
THIS is the error i got a1.l is a program
i got the same error when i used gcc
$ lex a1.l
$ cc lex.yy.c
Undefined symbols:
"_yywrap", referenced from:
_yylex in cc8QDQjW.o
_input in cc8QDQjW.o
ld: symbol(s) not found
collect2: ld returned 1 exit statusIs the problem that you don't know how to compile and execute these programs on a Mac, or just that you don't know how to compile and execute them?
Mac OS X is really just a version of BSD Unix, as far as programs like like bison, flex and gcc are concerned...and even when Apple specific versions are provided in the Developer Tools, there are symlinks in the usual places in the Unix file hierarchy.
For problems with lex and yacc, I suggest you start with their own references, for example, here.
Or you could just use %option noyywrap, if you only have one file to scan.
Or you could link to libfl.a using -lfl and use the default version from that library.
But you really should (as Keith Barkley was subtly hinting at) learn how these tools work and why they work that way. -
How to compile and execute programing languages
its the 3rd day on my New MacBook pro..
as i just migrated from windows to mac i love to work on this..
but i my main problems is i DON't know .......
how to compile and execute
1) lex and yac programs
2) c program
3) java program
so please help me
THIS is the error i got a1.l is a program
i got the same error when i used gcc
$ lex a1.l
$ cc lex.yy.c
Undefined symbols:
"_yywrap", referenced from:
_yylex in cc8QDQjW.o
_input in cc8QDQjW.o
ld: symbol(s) not found
collect2: ld returned 1 exit statusYou're trying to build something that depends on a library you don't have, or haven't referenced. This sort of question belongs in the Developer forums.
Developer Forums: Apple Support Communities -
Help on How to compile and execute awt programs
can any1 say how to compile and execute awt programs
Edited by: 863765 on Jul 18, 2011 3:29 AMEJP wrote:
The answer is the same for anycode.Oh, but it's not. If he starts with MyClass.java, and we tell him
javac MyClass.java
java -cp . MyClassthen that advice won't work when he creates MyClass2. The poor guy will be left lost and alone, with no clue how to proceed! {noformat};-){noformat} -
How to compile and execute a Pro*C program on Unix?
Hello Gurus,
I am new to Pro*C. I just wrote a sample Pro*C program 'first.pc' to read some information from some tables and print it on screen.
I am not sure how to compile it and execute it to see the output of my very first program.
After searching a lot I tried following ..
-- Step 1 compile the program into .c program
$->ls -lrt first.pc
-rwxrwxrwx 1 sqloper4 staff 1069 Oct 31 03:39 first.pc
$->proc first.pc
Pro*C/C++: Release 8.1.7.0.0 - Production on Sat Oct 31 05:43:35 2009
(c) Copyright 2000 Oracle Corporation. All rights reserved.
System default option values taken from: /oracle/app/oracle/product/8.1.7/precomp/admin/pcscfg.cfg
$->ls -lrt first*
-rwxrwxrwx 1 sqloper4 staff 1069 Oct 31 03:39 first.pc
-rw-r--r-- 1 sqloper4 staff 0 Oct 31 05:43 first.lis
-rw-r--r-- 1 sqloper4 staff 6648 Oct 31 05:43 first.c
$->
-- Step 2 Generate the .o file
$->cc -I${ORACLE_HOME}/precomp/public -c first.c
first.c: In function 'main':
first.c:154: warning: return type of 'main' is not 'int'
$->
$->ls -lrt first*
-rwxrwxrwx 1 sqloper4 staff 1069 Oct 31 03:39 first.pc
-rw-r--r-- 1 sqloper4 staff 0 Oct 31 05:43 first.lis
-rw-r--r-- 1 sqloper4 staff 6648 Oct 31 05:43 first.c
-rw-r--r-- 1 sqloper4 staff 3709 Oct 31 05:45 first.o
$->
-- Step 3 After that link the .o to libraries and produce the exe
$->cc -o exe_name -L $ORACLE_HOME/lib -lclntsh
ld: 0711-317 ERROR: Undefined symbol: .main
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
$->
$->ls -lrt first*
-rwxrwxrwx 1 sqloper4 staff 1069 Oct 31 03:39 first.pc
-rw-r--r-- 1 sqloper4 staff 0 Oct 31 05:43 first.lis
-rw-r--r-- 1 sqloper4 staff 6648 Oct 31 05:43 first.c
-rw-r--r-- 1 sqloper4 staff 3709 Oct 31 05:45 first.o
$->After all above still I am not sure how to proceed and 'execute' the program.
Could you please help me with the steps to 'Compile and execute' a Pro*C program ?
Oracle DB Version : Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
OS : Unix
Thanks in advance!Hi All,
After reading Pro*C Question thread I have tried below steps to compile my .C program, but failed with the given errors
$->cc -I$ORACLE_HOME/precomp/public -L$ORACLE_HOME/lib first.c -o sample
ld: 0711-317 ERROR: Undefined symbol: .sqlcxt
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit statusAfter receiving above error I tried below command as an alternative
$->cc -I$ORACLE_HOME/precomp/public -L$ORACLE_HOME/lib first.c -o first -lclntsh -lsql10
collect2: library libsql10 not foundCould you please help in resolving above error? Whats missing exactly? -
How to compile and execute servlet file in j2ee
In j2ee server when iam compiling servet i am getting error messages like package javax.servlet,and javax.servlet.http does not exist like that.
i hsve set path like this.and i gave path for j2sdk .
set CPATH=.;%J2EE_HOME%\lib\j2ee.jar
javac -classpath %CPATH% AdderServlet.java
can anybody tell me where to place
servlet and how to compile it.
Thank u,
RenugaMake sure that '%J2EE_HOME%\lib\j2ee.jar' is existing. Where is your J2EE_HOME pointing to?
The best thing I can suggest is, create your own bat file to compile the servlets. Like this,
Save the lines below as "MyCompiler.bat" file.
@echo off
set JDK_HOME=<path to you jdk home upto bin directory>
set J2EE_HOME=<path to you je22 home>
set CLASSPATH=.;%J2EE_HOME%\lib\j2ee.jar
%JDK_HOME%\javac %1
Use the command,
MyCompiler AdderServlet.java
You can improve this MyCompiler.bat further, can add additional jar files to the classpath whenever you want. You can put this bat file in System's path, so that you can invoke it just by the name (MyCompiler) without giving the full path to it (like C:\mydir\MyCompiler).
Hope this helps.
Sudha -
How to compile and execute a generated file
Hi,
Can somebody help me please? My program goes like this:
I'm creating a program wherein there are two TextArea, left and right, and a button. The role of the left TextArea is where I will type a Java code (what i mean is a class). After typing, the next thing is to press the button. The role of the button, in a user side view, is to show the output of the written java code from the left TextArea to the right TextArea. To have an idea of the program I am creating please refer at this link, http://w3schools.com/html/tryit.asp?filename=tryhtml_tables. This is similar to what im doing.
My idea is to transfer all what are written in the left TextArea in a file using FileOutputStream and name the file by default as "Testing.java". Definitely the user shall be forced to write a class named Testing.java in the left TextArea. My question is, how am I gonna compile the generated Testing.java, run it at once and post the output at the left TextArea?
I hope somebody could help me regarding this matter. Below is my code I've done:
import java.io.*;
import java.awt.*;
import java.awt.event.*;
public class Test extends Frame implements ActionListener
private TextArea ta_code; //where the java code is written
private TextArea ta_output; //where the output of the java code will be printed
private Button btn_ExecComp; //compiles the program written in the ta_code. Execute's the generated class and print the result in the ta_output
private Panel btn_panel;
private Panel ta_output_panel;
private Panel ta_code_panel;
private Panel ta_panel;
private Panel main_panel;
private String str_code;
private String str_output;
public Test()
initialize();
setupObj();
public void initialize()
String text = "public class Testing \n";
text = text + "{\n";
text = text + " \n";
text = text + "public static void main(String args[]) \n";
text = text + "{ \n";
text = text + " //insert your code here \n";
text = text + "} \n";
text = text + "\n";
text = text + "} \n";
ta_code = new TextArea(text);
ta_output = new TextArea();
btn_ExecComp = new Button("Execute Code");
btn_panel = new Panel();
ta_code_panel = new Panel();
ta_output_panel = new Panel();
ta_panel = new Panel();
main_panel = new Panel();
public void setupObj()
btn_ExecComp.addActionListener(this);
btn_panel.setLayout(new FlowLayout());
ta_code_panel.setLayout(new FlowLayout());
ta_output_panel.setLayout(new FlowLayout());
ta_panel.setLayout(new FlowLayout());
main_panel.setLayout(new FlowLayout());
btn_panel.add(btn_ExecComp);
ta_output_panel.add(ta_output);
ta_code_panel.add(ta_code);
ta_panel.add(ta_code_panel);
ta_panel.add(ta_output_panel);
main_panel.add(btn_panel);
main_panel.add(ta_panel);
this.add(main_panel);
this.pack();
this.setVisible(true);
public void actionPerformed(ActionEvent ae)
if(ae.getSource() == btn_ExecComp)
str_code = ta_code.getText();
try
byte[] byte_code = str_code.getBytes();
FileOutputStream fos = new FileOutputStream("Testing.java");
fos.write(byte_code);
System.out.println("Testing.java successfully written");
* How am i be able to compile, run the generated class file and post the output at the right TextArea namely ta_output?
System.out.println("compiling...");
System.out.println("compiling successful");
System.out.println("executing...");
catch(Exception e)
e.printStackTrace();
public static void main(String a[])
Test t = new Test();
}Hi All,
After reading Pro*C Question thread I have tried below steps to compile my .C program, but failed with the given errors
$->cc -I$ORACLE_HOME/precomp/public -L$ORACLE_HOME/lib first.c -o sample
ld: 0711-317 ERROR: Undefined symbol: .sqlcxt
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit statusAfter receiving above error I tried below command as an alternative
$->cc -I$ORACLE_HOME/precomp/public -L$ORACLE_HOME/lib first.c -o first -lclntsh -lsql10
collect2: library libsql10 not foundCould you please help in resolving above error? Whats missing exactly? -
How to compile and execute a Jython script with parameters (?)
I am writing a scripting extension mechanism for a big server project we've built over the last year and a half.
What I want to acheive is:
- system authors upload scripts (via a web front end)
- the system checks and compiles the script
- stashes the compiled script away against a named event.
When the event occurs the compiled script is called by the server with a list of parameters (current user id, various numbers describing the system state).
Now I can upload and compile the script just fine using :
PyCode somePyCode = __builtin__.compile ( script, "<>", "exec");
...and deal with any errors ...and stash the script away against a named event...etc.
And it is easy enough to call this code with
aPythonInterpreterInstance.exec ( somePyCode );
but that doesn't pass my parameters through.
It seems to me there's three obvious ways to do this:
(1) specify that each script has a named target:
def onEvent(eventid , userid):
... and use one of the PyCode.call() methods
- but these aren't sensibly documented in the javadocs so it could take a while to figure out what's really going on.
(2) specify that each script contains a class def and implements a __call__ method - but I can't see how to get the PyClass object out of the PyCode object returned by __builtin__.compile
(3) put the variables into the local namespace and then execute the script (without a named method or class) - but this means that I would have to clean down the local namespace each time (- and anyway what is it local to?).
(Did I mention execution speed is important to this app and I need to service multiple threads?)
Thanks in advance,
Tony
ps. hope this isn't o/t to you.Some days you just know the synapses aren't talking.
Of course when you exec() py code with def'd functions and class definitions in you're not executing the function(s) but defining them. Meaning that my question was all back to front in the first place.
All four copies. -
How to compile and run a .java file from another java program
hello,
can any one tell me how to compile and run a *.java* file from another java program which is not in same directory?Well a smarter way of implementing this is by using a solution provided by Java Itself.
If you are using J2SE 6.0+ there is an in built solution provided along with JDK itself and inorder to go ahead with solution the below are set of API which you;d be using it for compiling Java Programs (Files)
http://java.sun.com/javase/6/docs/api/javax/tools/package-summary.html
How do i do that ??
Check out the below articles which would help you of how to do that
http://www.ibm.com/developerworks/java/library/j-jcomp/index.html
http://www.javabeat.net/javabeat/java6/articles/java_6_0_compiler_api_1.php
http://books.google.com/books?id=WVbpv8SQpkEC&pg=PA155&lpg=PA155&dq=%22javax+tools%22+compiling+java+file&source=web&ots=XOt0siYe-f&sig=HH27ovuwvJgklIf8omTykUmy-eM
Now once we are done with compilation.In order to run a Specific class all you ought to do is create an object and its specific methods of a specified class included in the CLASSPATH which you can manage it easily by usage little bit reflections.
Hope that might help :)
REGARDS,
RaHuL -
How to compile and creat JAR with native function
Hi there,
I wrote some native function for J2ME. But it seems like using J2ME wireless Toolkits, we can not compile native function. Is it right?
Is anyone knowing how to compile and make JAR with J2MEWTK or command line?
Thanks,
Merry Christmas!![zack327],
JNI like or native interfaces APIs is not supported in the CLDC/MID Profile 1.0 specification. If you have J2ME code that includes JNI code, the J2MEWTK tool will not compile successfully for you.
To package the compiled code to a MIDlet suite .jar file, use the 'Package' command in the J2MEWTK toolkit. It is found on the top menu bar 'Project' option as item on the dropdown list.
To package the MIDlets into a MIDlet suite .jar file from the command line, you can execute the usual jar file command:
jar cf MyMIDletSuite.jar Midlet.class
You will also need to create a MIDlet .jad Application Descriptor file as well.
HTH.
Allen Lai
Developer Technical Support
SUN Microsystems
http://www.sun.com/developers/support/ -
How to compile and register a Java CFX tag with multiple class files?
All-
If this is the wrong forum for CFX questions, please let me
know.
I need to determine how to compile and register a Java CFX
tag that contains multiple class files. One class file implements
the CustomTag interface and the other class files implement various
supporting classes. All of the documentation that I have found
talks about using a single class file. I am assuming that a JAR
file will be involved, but I am not sure of the specifics.
Thanks in advance for your help.
-JoshYes, it will involve a jar. Use your java IDE (eclipse,
etcetera ..) to create a jar containing all of the classes. Check
your ide's documentation for how to create jar files. After you
have created the jar, place the jar in the CF class path so CF will
recognize it. For example the {cf_root}/WEB-INF/lib directory. CF
must be restarted before it will detect the new jar. After
restarting CF, register the CFX tag in the ColdFusion Administrator
using the name of the class that implements the CustomTag
interface.
Though it is worth noting you can also instantiate java
classes directly from ColdFusion (ie without using a CFX
tag). -
How to create and execute a function whose return value is a table
hi folks ,
i would like know how to create and execute a function whose return value is a table ,
am new to pl/sql ,
my statement for the function is
SELECT ct.credential_code, c.expiration_date
FROM certifications c, credential_types ct
WHERE ct.crdnt_id = c.crdnt_id
AND c.person_id = person_id;
i would like to have the result of the above query as return value for the function.
Thanks in advance ,
Ashok.chi Ps ,
Can you please do small sample ,
that would help me in clear understanding
thanks in advance
ashok.c -
How to compile and run java files on a mac using command line?
can someone tell me or link me to some article on how to compile and run java files from command line on a mac? I have mac OS X leopard
What do you mean by "where to put them" ? What do you want to put anywhere ?
Have you read Peter's comment in brackets ? Perhaps you have a classpath problem ?
Edited by: Michael_Knight on Aug 31, 2008 4:23 AM -
How to compile a java source from a java program
Hi .
I would like to know how to compile my java source from inside an execution of a java program.
Is there another way than rather use :
Runtime.getRuntime().exec("javac myFile"); ?you can and cann't use the source code of javac... or maybe use jikes...
-
Is there such thing as a "compile and execute statement" in Java?
I wanted to know if there's any way to compile and execute a program "within" another program.
Yes, but the classes to do so aren't officially supported by Sun as far as I know.
And you must be able to assume a thing or two about the stuff you compile, such as existing constructors or factory methods etc, otherwise it gets hairy.
Here's some example code (haven't tried it, so excuse any spelling errors etc) to compile the source code in a file called MyClass.java:
ByteArrayOutputStream baos = new ByteArrayOutputStream();
new sun.tools.javac.Main(baos,null).compile("MyClass.java");
String theMsg = baos.toString();
if (theMsg.length() > 0)
// NiftyErrorHandlingHere
}After that, you can load it with a simple ClassLoader.loadClass() call and create instances of it.
It must be compiled with the tools.jar file in the classpath, to find the sun.tools.javac.Main class.
However, for any such dynamically compiled class to be of any use to you, you must be able to assume something about it, such as implementing interfaces or whatever, otherwise it's a kind of pointless exercise.
HTH,
F
Maybe you are looking for
-
Adding Windows folders to iTunes library
Having some trouble figuring out how to add preexisting mp3's into the iTunes library. The mp3's are ripped from my own CD collection using Windows Media Player. For discussion let's say I have 50 mp3's in a folder I created called iPod1. I go to iTu
-
Can we Hide Measure Folders from a Read Only Session?
Hi , I have implemented security on my workspace by scoping the dimensions and hiding the cubes.It worked. For hiding measure folders, i did similar to hiding of cubes, but it did not work. It threw an error message : ERROR: (ORA-34706) ACCOUNT_BW.ME
-
icloud isnt letting me open my ipad i need it and its saying that i need to back it up but i cant, please anyone help me with this its very frustrating
-
C309A PRINTER GIVES FALSE "OUT OF PAPER" MESSAGE AND WILL NOT PRINT WHEN TRYING TO PRINT ENVELOPES
When trying to print an envelope, I get an error message - "out of paper" and cannot proceed.
-
64 bit real - 32 bit or bitstream
hav a look at the vi ..can someone help me to convert the 64-bit real output to 32-bit ot to bitstream.... Regards Attachments: 64.vi 18 KB