Update Assembly which is a Procedure/Function in Oracle
Hi everybody,
I have developed some Procedures and Functions in c# 2.0 for Oracle 10.2 and deployed them with the Oracle Deployment Assistent.
After some problems they work!!!! Even as Triggers!!!
Now my question is, how I can simply Update an Assembly which is already in use on Oracle?
When I try to redeploy it, I only receive the message that the xxx.dll file is write protected. When I try to delete the file manually on the Oracle Server it is also not possible.
I didn´t find any hint for this.
Thanks a lot for your help.
Kind regards
Markus
You need to stop extproc.exe by using Oracle[i]OracleHomeNameClrAgent service on your database server before you redeploy an assembly again. (where OracleHomeName represents your Oracle home.)
Similar Messages
-
How to trace the flow of plsql procedures/functions in oracle 10g
Hi All,
Recently I came to know that there is dbms_hprof PL/SQL built-in package in Oracle 11g which can be used to trace PL/SQL calls in a Hierarchical way. (acts as a PL/SQL Hierarchical Profiler).
Steps are given in -
http://www.oracle-base.com/articles/11g/PlsqlHierarchicalProfiler_11gR1.php
I would like to know whether there is a similar package in Oracle 10g because I want to trace the flow of plsql procedure and function calls in order to generate an output in a hierarchical way (for debug purposes).
The following example shows the flow of procedure calls when I execute PACKAGE_A.Proceudure_A. I want to generate that kind of an output.
Ex -
PACKAGE_A.Proceudure_A
----|_PACKAGE_A.Proceudure_B
----|------|_PACKAGE_B.Proceudure_C
----|_PACKAGE_B.Proceudure_M
----|------|_PACKAGE_A.Proceudure_B
----|-------------|_PACKAGE_C.Proceudure_C
----|_PACKAGE_Z.Proceudure_Z
If there is no similar package in *10g* I would really appreciate if someone can provide me directions to get the job done using the exsting packages and tables in Oracle 10g. Thanks in advance.
Edited by: user8326781 on Nov 28, 2008 8:57 PM
Edited by: user8326781 on Nov 28, 2008 8:58 PM
Edited by: user8326781 on Nov 29, 2008 12:19 AMI am not sure that this would serve the purpose or not but still, I guess its worth to atleast be mentioned,
http://www.oracle-base.com/articles/9i/DBMS_TRACE.php
HTH
Aman.... -
Cancel/Break Stored PL/SQL-Procedure/Function from Oracle Forms
Hello !
If i call in Oracle Forms a PL/SQL-Programm stored in the dabase is there a way to break/cancel this programm from Oracle Forms ?
Thanks in advance !
Thomas<p>All I want to say is, you need to "prepare" the PL/SQL code to accept interruption, like dealing with the DBMS_APLICATION_INFO</p>If this code is not present in your PL/SQL code you won't stop it, except killing the session (that is a really dangerous option).
Francois -
Kill a stored procedure/function
Hi Experts,
I have requirement to kill or terminate the stored procedure/function through UI.
Is there anyway to kill or terminate the stored procedure/function in oracle.
Note:-it shouldn't impact the other running Stored procedures/functions.
Thanks in Adavnce!!!Some basics first.
You do not kill a procedure or function. You kill the process executing it.
The ALTER SYSTEM KILL SESSION command does not kill a process (session). It requests that process to terminate by communicating with the process via the SGA. If that process is in a synchronous kernel call (and waiting for that call to complete), the process is unable to even check the SGA, never mind respond to a kill-yourself instruction. Which means it cannot terminate itself.
User (application) code does NOT need the ALTER SYSTEM priv. That will be a very serious security violation. So if you do want to allow user code to make use of that priv to kill user sessions/processes, then you need to wrap that into a secure interface that user code can use. Such as a SYS owned KillUserSession() procedure, executing with definer rights, and ensuring the caller can only kill sessions that it owns (e.g. if caller is schema SCOTT, then only SCOTT sessions can be killed).
Last comment. Killing user sessions is kind of stupid. As that means you loose. You cannot design properly. You cannot code properly. And to establish some kind of sanity in processing, The Very Large Hammer needs to be employed. Killing sessions does NOT fix the problem. It treats the symptom. The problem is still there.
And to add a treat-the-symptom-by-killing-the-session button on a .Net (or any other) application? That is, IMO, four-letter-words epic lame.
What is the real problem? -
Is is possible to create Socket using Java Stored Procedures/Function(Ora)?
Hello Friends,
Is is possible to create Socket using Java Stored Procedures/Function in Oracle?
OR
How I can send a message from oracle to Java Desktop Application which is working like server program?
Please Guide !!J3Ganesh wrote:
Hello Friends,
Is is possible to create Socket using Java Stored Procedures/Function in Oracle?No, Oracle was very careful to take that feature out of the JDK provided in Oracle 10/11, but you can buy that feature back for, if I remember correctly, about 5000 dollars. (I actually raised a service request on this and then told my rep what I thought about the answer I received--some thing along the line of money grubbing so and so....)
How I can send a message from oracle to Java Desktop Application which is working like server program?You can make a table and poll it from time to time from the Java side and write and commit what ever you want to the table. I do not know any way to send a signal from Oracle DB an external Java application--Java or PL/SQL stored procedure. -
Assemble Web Services from database functions and procedures?
Web Service Assembler can assemble Web services from PL/SQL packages.
Can it be used to assemble Web services directly from functions or procedures?
Thanks,
JimHi,
No, it relies on a package and takes each of the publishable functions and procedures as the web serivce methods.
Have you also tried using JDeveloper? It uses WSA under the covers but gives you a great GUI for selecting and working with your code
rgds
Susan -
Status report from Procedure/functions
All,
I have procedures /functions in my database. I need to return a status value back to the call procedures/functions to report the sub_procedure/function executed successfully.
What is the status value if a procedure/function executed successfully? And what is the value for un_successful execution? Where I can get it from?
Thanks a lot!This is really a design choice that you have to make in your application. PL/SQL stored procedures / functions do not return any implicit status codes on there own. In your PL/SQL code, you can check the SQLCODE built-in function for the status of the last SQL statement executed, but this is hardly the same thing (and really designed for use in exception handlers).
You may choose to design you applications such that every call must return a status value. In this case, the values used to represent success or failure are up to you (I might suggest 0 for success and the error code - which will be non-zero - for failure). You can either use functions which always return a number (probably not a good idea to place this limitation on your application); you might design all stored procedures to return an output parameter which indicates success or failure.
But, in general, your client code should be designed to correctly handle all Oracle exceptions - if no exception is raised, then success, else failure. And your PL/SQL should avoid bad practices like exception handlers which trap WHEN OTHERS and don't re-raise the exception. -
updated iTunes to 12.0.1 on XP after updated recieved error message "The procedure entry point ADAdPolicyEngine_DidEnterStation could not be located in the dynamic link dll" "itune not installed correctly error 7 (windows 127). reinstalled same error. Tried suggested steps
Remove all of these items in the following order:
iTunes
Apple Software Update
Apple Mobile Device Support (if this won't uninstall press on)
Bonjour
Apple Application Support
Still getting same error message. Can anyone help meFor general advice see Troubleshooting issues with iTunes for Windows updates.
The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
tt2 -
Hi All
I am trying to create a stored procedure that will return a line from a table.
The basic brief I have is that we have a bunch of tables that set up the user security and they link back to a our_systems table which holds info about all internal systems.
I need a stored procedure which can be called with a username and a system id. If the user has rights to the system then the line from the our_system table will be returned along with a rights level.
The hard part is I want to stop the users from seeing all the tables in this section. The original idea is to denie access to the tables but allow access to a stored procedure. Would this work?
The second point is how can I get this working? I am used to MS SQL Server and this would easily be done by creating the procedure and then doing
SELECT * FROM spCheckRights('dave',1)
But Oracle (9i is the version I am using) says that a function / procedure can't be placed there.
I have 2 version of my procedure
FUNCTION spCheckRights (login_name In varchar2, drxsystem_id In number)
return sys_refcursor
AS
l_cursor sys_refcursor;
BEGIN
open l_cursor for SELECT ds.NAME FROM drx_systems ds WHERE ds.system_id = 1;
return l_cursor;
END;
OR
FUNCTION spCheckRights (login_name In varchar2, drxsystem_id In number)
return drx_systems%ROWTYPE
AS
drxsys drx_systems%ROWTYPE;
BEGIN
SELECT * INTO drxsys FROM drx_systems ds WHERE ds.system_id = 1;
return drxsys;
END;
As you can see neither do all the check rights stuff yet, I wanted to test the basics first. Any views on which method is better for returning a row?
Any help would be appreciated
Thanks in advance
Dave RAs long as the owner of the function has rights to the tables, the users calling the function do not need to have any rights on the table, only execute on the function.
The choice of using a procedure or a function (in Oracle they differ) and whether to return a cursor, a collection type or a record type really depends on your front-end requirements, and the number of values you want to return.
A function can only return a single value. That value can be a cursor or a collection of some kind (think array), or it can be a scalar variable. A procedure can return, through out parameters, multiple values. This set of types that can be returned is the same as for a function.
So, for a function returning a cursor, you would do something analagous to:
curvar ResultSet;
curvar = f(p1, p2);in the language appropriate way. For testing in sqlplus, that would be something like:
VAR curvar SYS_REFCURSOR;
exec :curvar := f(p1, p2);
print curvar;Note, the colon in front of curvar in the exec is required. As long as your calling code can define a variable of drx_systems%ROWTYPE to recieve it, then the second version should work similarly.
If you will only be returning values from a single row, and if the number of coumns is relatively small, you could also consider a procedure something like:
PROCEDURE spcheckrights (p_login_name IN VARCHAR2,
p_drxsystem_id IN NUMBER,
p_name OUT VARCHAR2,
p_allowed OUT VARCHAR2) AS
BEGIN
SELECT ds.name, ds.allowed
INTO p_name, p_allowed
FROM drx_systems
WHERE system_id = 1;
END;Then call it passing in variable to get the results. Again, in sqlplus that would look something like:
VAR name VARCHAR2(30);
VAR allowed VARCHAR2(1);
exec p(p1, p2, :name, :allowed);
print name, allowed;Again, in sqlplus, the colons before name and allowed in the exec call are required.
HTH
John -
Enhanced Approval Procedure Functions- authorization issue
Dear Expert,
I have activated the enhances approval procedure function as per below screen shot:
Granted authorization as mention in New ChaRM Feature with SP 10: Enhanced Approval Procedure Functions by Michael. With SM_APP_AP with 02, 22 and 75.
But the Request for change procedure selection and approval steps was disabled
The requestor able to change the approval procedure and approval steps only if i granted the user with 70 (administer).
Please help as i want the requestor to be able to select the approval procedure and approval steps but not approving the CR. Im following the chart below but seem like is not working.
Role
SAP standard roles
Activity for
Change Manager
SAP_CM_SMAN_CHANGE_MANAGER
37 (approve) approval step, 75 (delete approval step), 22 (add approval step), 02 (change approval procedure assignment)
Potential Approvers
SAP_CM_SMAN_DEVELOPER
SAP_CM_SMAN_OPERATOR
SAP_CM_SMAN_TESTER
37 (delivered inactive)
Power User, Administrator
SAP_CM_SMAN_ADMINISTRATOR
70 (administer), 37 (approve) approval step, 75 (delete approval step), 22 (add approval step), 02 (change approval procedure assignment)
Thanks
Regards,
JunnieHi Jansi,
I have added activity 22 (add approval step) and 02 (change approval procedure assignment) but the approval procesure and approval step are disabled and not allow the requestor to select /add/ male changes.
So im not sure which part is going wrong.
Thanks
Regards,
Junnie -
No procedure/function decomposition in packages in Rel 2
I noticed that one of the changes since the last release was:
"View Package Spec and Body - now decompose to display procedures and functions "
I tried doing this in Rel 2 but there is still no decomposition of procedures/functions.Maybe I have misunderstood what was being said ?
Also, if you click the package spec, a subfolder labelled "loading..." appears which just stays there ...
Platform: Xp SP1
Raptor version:1.0.0.07.96Thats a very good point about navigating to the point in a package spec of body where the sub-object resides.
In cases where packages are thousands of lines long and have numerous procedures/functions, debugging code is difficult if you cant jumpt to points in code that the navigator shows you are there.
This is one of the few things that plsql navigator does better than Toad in my opinion and I'd happuily use Raptor over both of these if it can emulate what was asked in the last post.
Am using build 08.97 -
Have been using SQL Server since 1998, and been wondering why MS cant better the GUI , in terms of ease of use, as its done in Visual Studio and other such tools, though there are some enhancements like multiple window etc, would expect few more for easy
working for developers.
1) A search text box, in the SSMS interface, for searching stored procedures, functions, tables etc would be very useful, instead of expanding the entire tree and going through a long list to find your procedure or table, especially when you have a large
list of them.
2) Also a code search tool, like to find a keyword in the entire stored procedures, triggers and functions would be useful, currently we had to generate whole script and then find the keyword, and this is cumbersome, as you have to move back and forth to
find which stored procedure or function has that keyword etc.
Thanks.1. You already have feature in SQL management studio to search for objects using full names or patterns through object explorer
See
http://visakhm.blogspot.in/2013/02/object-filtering-using-ssms-object.html
2. For this you can use the catalog view sys.sql_modules and fire a query on it
see
http://visakhm.blogspot.in/2012/03/advantages-of-using-syssqlmodules-view.html
http://visakhm.blogspot.in/2013/01/systemsqlmodules-and-allsql-modules.html
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Stored Procedure: Function returns Array
I was just wondering if following scenario is possible in a stored procedure.
I have a package, which includes 4 different functions and 1 procedure. Procdure uses ref cursor to return values in my reporting tool. What I am trying to do is to write a function which takes input and return array of varchar. Something like..
Package ABC
Function student_classes (student_no in Varchar2) return [array]
begin
select class_nbr into [array]
from student_table
where student_nbr = student_no;
return [array];
end student_classes;
procedure students_info (rpt_cursor IN OUT rpt_type)
begin
OPEN rpt_cursor FOR
select
student_name,
student_nbr,
student_address,
student_classes (student_nbr) --returns array
from student_table;
end student_info; --end of procedure
end abc; --end of pacakge.
I used [array], as I am ont sure how to define (syntax) it in spec part of package or in body. I will really appreciate if someone could help me with this function.
Thank youThanks for the reply Tonguc Y.
I declared an array in my package declaration
CREATE OR REPLACE PACKAGE rpt_TESTING_pkg
AS TYPE rpt_type IS REF CURSOR;
TYPE DIAGARRAY IS VARRAY(20) OF VARCHAR2(6);
FUNCTION DIA_CODES (MNO IN VARCHAR2) RETURN DIAGARRAY;
PROCEDURE member (rpt_cursor IN OUT rpt_type);
END rpt_TESTING_pkg;
but then when I try to use it in my function it gives me error that I should declare DIAGARRAY.
CREATE OR REPLACE PACKAGE BODY rpt_TESTING_pkg
as
FUNCTION DIA_CODES (MNO IN VARCHAR2)
RETURN DIGARRAY AS diags DIGARRAY;
begin
<sql block>
end dia_codes;
end rpt_TESTING_pkg;
Any suggestions. -
Package/procedure/function calls done with in a package
Hi Experts,
Can anybody suggest me the table/ a query to find the package/procedure/function calls (with in the same db or remote) done with in a package.
It would be great if we can provide a tree like structure of the objects being called/used.
btw.. dba_dependencies will provide me the info about the global procedures only not the local ones used with in the package body.
Appreciate your time..
Thanks
Manjumanjukn wrote:
Hi Experts,
Can anybody suggest me the table/ a query to find the package/procedure/function calls (with in the same db or remote) done with in a package.
It would be great if we can provide a tree like structure of the objects being called/used.
btw.. dba_dependencies will provide me the info about the global procedures only not the local ones used with in the package body.
Appreciate your time..What database version do you have?
11g I think provides some sort of fine grained dependency information which can detail packages, but prior to 11g you can only get dependencies on the database objects themselves of which functions/procedures within a package are not, as the package itself is the object.
I don't think there's any easy way to find out from any tables or views and I think third party tools would have to parse the code to determine such things themselves, so that may be one of your only options. -
How can I create packages procedure & function in user-define Library
hi.
i am already created packages procedure & function in database and use so on.
now i would like to create these in library file.
please anyone give me example of any procedure or function to store in library.
thanks
Ali<FONT FACE="Arial" size=2 color="2D0000">> please send me one simple example for create library
then create any function in library.
2nd is any package can be create in library or not??
Thanks S.K
AliHave you checked the link?
A simple example is provided.
I think What I understood from your post is that, you want to put function/ Proc and want to call that as Library ..
Which is not possible.
For exampel an external routine is a third-generation language procedure stored in a
dynamic link library (DLL), registered with PL/SQL, and called by the DBA to perform
special-purpose processing.
In Unix a dynamic link library is known as a shared object (so).
At run time, PL/SQL loads the library dynamically, then calls the routine as if it were a
PL/SQL subprogram. To safeguard our database, the routine runs in a separate address
space, but it participates fully in the current transaction. Furthermore, the routine can
make a call back to the database to perform SQL operations.
To identify a DLL we have to use CREATE LIBRARY command.
The CREATE LIBRARY command is used to create a schema object, library, which
represents an operating-system shared library, from which SQL and PL/SQL can call
external third-generation-language (3GL) functions and procedures.
Learn something more on External Procedures
-SK
</FONT>
Maybe you are looking for
-
Hello ! I'm using a javax.microedition.lcdui.TextField to enter a few digits. These digits were shown very small... Is there any way to change the font-size in the text field? Greetings Micha
-
Why won't Aniweather load to browser 5.0 upgrade?
Aniweather will not load onto 5.0 upgrade. I also received a "confirm this question" e-mail with a link that takes me to "we are having a problem" screen. I clicked on the link you provided and that is what it did..here's the link: https://support.mo
-
I have two partitions and want to choose which to login to. Cannot remember the key combination to hold on power up
-
Hi, I have a JScrollPane that manage a view with very large components and therefore user can view only a small part of components at a given time. In the drawComponent method of the visualised components, I draw a scale using long lines (g.drawLine
-
Greeting One of application which using my CSS has problem to work with my CSS11506 after the application upgrade. It does not regconize CSS' keepalive check and give error "broken pipe" on the backend server. (it treat the keepalive traffic as sessi